a logo for the course

Matrix Computations

David Gleich

Purdue University

Fall 2024

Course number CS-51500

Tuesday-Thursday 10:30-11:45pm.


CS 51500 Syllabus

Course information

Fall 2024
BHEE 235 10:30-11:45 https://www.cs.purdue.edu/homes/dgleich/cs515-2024

Instructor

David F. Gleich
Lawson 1207
dgleich@purdue.edu
https://www.cs.purdue.edu/homes/dgleich

Office hours

Fridays at 12:30-1:30pm in Lawson 1207.

Teaching Assistants

Marc Tunnell mtunnell@purdue.edu

Office hours

Thursdays at 12:30 - 2 in DSAI B061.

Piazza vs. EdDiscussion

In the past, I've used Piazza and Campuswire. I strongly prefer Piazza to Campuswire. But, Purdue has some arrangement with EdDiscussion / EdStem. So we are going to do a poll on EdDiscussion to see if the class has any preference.

Right now, we have to add you to either, so if you aren't on our instance yet, please do ask!

Gradescope

We will use Gradescope for all homework submissions, you should have received an email about joining our Gradescope.

If you join class after the first day, we will sync the rosters to add you soon

Description

This course is an in-depth study of numerical linear algebra and the matrix computations that arise in solving linear systems, least squares problems, and eigenvalue problems for dense and sparse matrices. It will cover many of the fundamental algorithms such as the LU decomposition, the Cholesky decomposition, the conjugate gradient method, and the GMRES method. The course is designed for those who wish to use matrix computations in their own research.

From 2018-2022, I was introducing new material in the class and revising the presentation. At this point, we have a fairly comprehensive set of notes that have been assembled into a proto-textbook. This is the best reference for the class! See the readings page for per-lecture references and notes. Also, watch the videos.

Prerequisites

This class is an in depth graduate lecture class. You (the student) should have taken a mathematical course on linear algebra that covers vector spaces as well as a numerical analysis course that covers computer implementations of numerical algorithms. David will assume that you have studied many of the basics of these classes.

Goals and objectives

Matrix computations is a large area, but the basics are pretty consistent. My view is that matrix computations are effectively the standard language of mathematical computing. (Incidentally, I don't like that phrase, but I don't have a ready alternative).

When we reach the end of the class, you should be able to:

Changes in 2024 from 2023

Requirements

The formal requirements and percentage of the total course grade are:

There may be extra-credit opportunities throughout the class. Finally, you must meaningfully participate in each of the two components (homeworks, and all exams). Lack of participation in one area may result in a failing grade for the class or a multiple letter grade reduction. (That is, someone who gets a 65% average on the exams and doesn't do any homework might be able to get a D; this policy would reduce their grade to an F; someone who aced both homeworks and the midterm but skipped the final could have gotten a B-, this would reduce them to a C or D. )

Exams: In person

We will have 2 in-person exams. These are mandatory.

Extra credit opportunities.

To promote participation in our class, we will award extra points for the following activities. Maximum 5%

1% - Scribe a lecture piece / video. Scored as 1% - Good job; 0.5% - Usable, but could be improved; 0% - Not usable. You can scribe up to 2 lecture pieces. Lecture piece needs to be >= 25 minutes to count. Notes should be >= 1 page. More like 2-3. Scribing needs to be done within a few days of the posted lecture schedule.

1% - Prepare a 5-10 minute video on something related to class that interests you. This will be posted to the class website.

1% - Prepare a solution set for class. Real life doesn't come with solution guides, so my philosophy is that class solutions should be discussed with us. However, people often want these without the trouble of talking to one of us about them. These are graded like the scribed solutions. Your own homework will likely not count unless it is extremely well explained as you might need to discuss ideas that don't work in a full solution set. They will be password protected.

1% - Help out with a task related to course notes/videos. For instance, I'd love to have little screenshots from the videos synced with the transcript that 'zoom in' on hover in case you want to find a place based on what the board looks like...

Quizzes (Not applicable in 2024!)

This policy does not apply in 2024, but is retained so you understand the recordings

These will be worth 5% of the total grade and are graded as taken/missed. Students can miss up to 5 quizzes with no penalty. Make sure you contact the instructor (David) if you anticipate missing more than 5 quizzes due to any absenses as there may be some accomodation in extra special circumstances. Note that this is an all-or-nothing grade.

Quizzes for distance students (Not applicable in 2024!)

This policy does not apply in 2024, but is retained so you understand the recordings

Distance students are required to submit "magic numbers" announced in class to blackboard in-lieu of submitting the in-class quiz. Again, students can miss up to 5 of these scores with no penalty. Distance students will have up to 48 hours from the start of the lecture to to submit their quiz on blackboard before it is marked "missed".

References

The required/recommended text book is:

Matrix Methods and Programs. David F. Gleich 2024 Notes associated with this class.

Matrix Computations. Gene H. Golub and Charles van Loan. 4th Edition, Johns Hopkins University Press.

Numerical Linear Algebra. Lloyd N. Trefethen and David Bau. SIAM

There are other books that may be useful:

Policies

All the videos are pre-recorded from the last time we did this class! (actually, 2019, but used in 2020, 2021, 2022, 2023 too.)

If you struggle with time management Here's how I think you should take this class if you are at Purdue and worry about time management.

The homework and exams are based on a unit schedule and associated readings.

I really do take them seriously and will try to make you look good for asking a question.

Participation points

One of the challenges with a flipped classroom is that it's easy to feel lost and not have a way to get the help that you need. I also want you to help each other learn and help make the class better. Towards that end, we need to see participation and engagement with the class. In order to get your 5% participation points, we need to see engagement from you in 10 of the 15 weeks of class. What constitutes engagement?

Conduct and Courtesy

A flipped classroom is a slightly different environment. Students are expected to maintain a professional and respectful classroom environment. In particular, this includes:

You may use any non-disruptive personal electronics during class. One exception is during in-class quizzes and tests, for which personal electronics are prohibited.

Announcements

There will be announcements relevant to the course made through the ITaP course email list. This will send an email message to your purdue email address and you are expected to check this account for information related to the class. We will verify that everyone in the class is receiving these messages early on.

Correspondence

The best way to correspond in this class is to post a note on EdDiscussion. (Or Piazza if we switch to that.)

Please feel free to email me with any questions, but please prefix all email titles with the string CS-51500 MC: to aid in filtering email. Also, consider using a private note on EdDiscussion instead.

I will make every effort to respond promptly, however, replies could be delayed due to circumstances outside of my control. In particular, do not rely on a response between the hours of 8pm and 8am.

Please do not attempt to call, google chat, skype, facebook, or tweet with me without prior arrangement.

Assignment clarity

I expect all assignments to be legible and well-written.
Mathematical derivations alone are insufficient and you must explain your reasoning in sentences. For this, I require using a computer to prepare all submitted materials.

If you cannot use a computer and LaTeX to prepare solutions to homeworks, I am willing to consider exceptions to this policy.

Also, using LaTeX can increase the temptation to share answers. All LaTeX must be written individually.

Missing or late work

(2024 policy) No late work will be accepted, except by prior arrangement and/or in unusual circumstances.

Deadlines for HW and Meaningfully Attempted Points

This is a policy that evolved (successfully) from the COVID pandemic. The origin was that deadlines caused me a large amount of stress during the pandemic. And still do! Partially, this is because of uncertainty with regards to childcare in my scenario, and also changing work environments, etc. I expect students are in similar boats.

Aims and justification for the new policy.

(Adopted 2024 policy)

Your HW grade would then be computed by the formula:

    min(your correct points + 100, 
        your total meaningfully attempted points)
    / total homework points

Example: You tried on every problem, but they were hard. So you got around 75% of the homework points (usually around 600). But because you attempted everything, we'd give you (0.75*600 + 100)/600 = 92% instead.

We used this policy in 2020, 2021 (and for another class in 2021 too ). The idea is to take stress off of you and encourage you to start early and keep working.

What is meaningfully attempted?

Well, in short, we know it when we see it; this is our judgement. Some examples to help clarify:

Will we adopt this policy?

Yes!

Exams.

We are doing in-person exams for all students.

Collaboration

Collaboration on homework is allowed.

The final assignments must contain a list of all collaborators. However, students must prepare solutions individually. As an example of the ideal scenario, the following situation is permissible:

A group of students meets to develop the solution to a problem on a white board or zoom chat. Each student records individual notes from this problem solving meeting. All students then prepare solutions individually and without further collaboration. These solutions list the names of all members in the initial group.

The final assignments must contain a list of all collaborators, regardless of if they are in the class or not. Failure to list collaborators will result in a zero on any homework, you must write "I did not collaborate with anyone on this homework'' if you worked on the homework entirely alone.""

Examples of collaborations that are not allowed include, but are not limited to:

AI Tools

ChatGPT is reasonably good at this class. In my evaluations, using the best models (i.e. paid GPT-4 / 4o), it gets around a 50-70% on the homework. It tends to do better on the coding questions. (This makes sense as it can't really reason or think at all; it's best to think of this as a super smart pattern matcher.)

You are welcome to try and use it. I think it's a helpful tool that can help you learn the material better. On the other hand, if you use it as a crutch to avoid learning the material through the homework, you are only doing yourself a disservice for the exam.

If you use AI tools, you also need to disclose what part of the answer what generated with AI tools

Computer codes

The assignments will involve producing computer codes. These need to be documented and written in accordance with best software engineering practices. Failure to follow this advice may result in solutions receiving zero points. Moreover, these should be prepared individually. Groups may discuss implementation strategies, algorithms, and approaches; but codes, like written homework solutions, must be prepared separately.

Debugging

What to do about debugging? That's right, you've gotten the ideas down. You think you have the algorithm right, you coded it. And yet, it still doesn't work. But you can't ask a friend because you can't share code, right? Here is what you should do. Spend 30 minutes working with that code to try and make it work. Write down what you did. If, after that, it still doesn't work. Then spend 15 minutes explaining what your problem is to a friend without looking at the code.

If you are having trouble with debugging, try asking ChatGPT! Even the basic models often have some good ideas you can try. They also might spot some silly errors...

Grading

For 2024, I'm using the bands.

These may be adjusted downward by up to 10% to achieve a reasonable grade distribution.

Academic integrity

Behavior consistent with cheating, copying, and academic dishonesty is not tolerated. Depending on the severity, this may result in a zero score on the assignment or exam, and could result in a failing grade for the class.

Academic integrity is one of the highest values that Purdue University holds. Individuals are encouraged to alert university officials to potential breaches of this value by either emailing integrity@purdue.edu or by calling 765-494-8778. While information may be submitted anonymously, the more information that is submitted provides the greatest opportunity for the university to investigate the concern.

Purdue prohibits "dishonesty in connection with any University activity. Cheating, plagiarism, or knowingly furnishing false information to the University are examples of dishonesty." (Part 5, Section III-B-2-a, University Regulations) Furthermore, the University Senate has stipulated that "the commitment of acts of cheating, lying, and deceit in any of their diverse forms (such as the use of substitutes for taking examinations, the use of illegal cribs, plagiarism, and copying during examinations) is dishonest and must not be tolerated. Moreover, knowingly to aid and abet, directly or indirectly, other parties in committing dishonest acts is in itself dishonest." (University Senate Document 72-18, December 15, 1972)

You are expected to read both Purdue's guide to academic integrety and Prof. Gene's Spafford's guide as well. You are responsible for understanding their contents and how it applies to this class.

Course materials

The course materials (homeworks, slides, lecture notes, etc.) are materials that bear my copyright (except for the videos, those are from Purdue this semester because we are reusing old recordings). These materials may not be posted, shared, redistributed to others who are not registered for this class without my express written permission.

Also, the notes you take in class are "considered to be 'derivative works' of the instructor's presentations and materials, and they are thus subject to the instructor's copyright in such presentations and materials." As such, they also cannot be sold or bartered without my express written permission. This same copyright applies to homework solutions and scribed notes. (Draconian, I know, talk to me if you want to know why!)

Attendance

Students are expected to watch the lectures. Attendance of lectures is not required, but is strongly encouraged. You will have to drop off questions about the lectures to show you are engaged even if you choose not to stay to hear their discussion. I'm going to do my best to record the in-person meetings as well. Recordings of these will be posted. But please don't expect them to be instant. They may also omit pieces I deem irrelevant if no one is asking questions, or if people don't want me to include their question.

Grief Absence Policy

Purdue University recognizes that a time of bereavement is very difficult for a student. The University therefore provides the following rights to students facing the loss of a family member through the Grief Absence Policy for Students (GAPS). GAPS Policy: Students will be excused for funeral leave and given the opportunity to earn equivalent credit and to demonstrate evidence of meeting the learning outcomes for misses assignments or assessments in the event of the death of a member of the student's family.

Violent Behavior Policy

Purdue University is committed to providing a safe and secure campus environment for members of the university community. Purdue strives to create an educational environment for students and a work environment for employees that promote educational and career goals. Violent Behavior impedes such goals. Therefore, Violent Behavior is prohibited in or on any University Facility or while participating in any university activity.

Students with Disabilities

Purdue University is required to respond to the needs of the students with disabilities as outlined in both the Rehabilitation Act of 1973 and the Americans with Disabilities Act of 1990 through the provision of auxiliary aids and services that allow a student with a disability to fully access and participate in the programs, services, and activities at Purdue University. If you have a disability that requires special academic accommodation, please make an appointment to speak with me within the first three (3) weeks of the semester in order to discuss any adjustments. It is important that we talk about this at the beginning of the semester. It is the student's responsibility to notify the Disability Resource Center (http://www.purdue.edu/drc) of an impairment/condition that may require accommodations and/or classroom modifications.

Emergencies

In the event of a major campus emergency, course requirements, deadlines and grading percentages are subject to changes that may be necessitated by a revised semester calendar or other circumstances beyond the instructor’s control. Relevant changes to this course will be posted onto the course website or can be obtained by contacting the instructors or TAs via email. You are expected to read your @purdue.edu email on a frequent basis.

Emergency Preparedness

Emergency notification procedures are based on a simple concept:

if you hear a alarm inside, proceed outside.
if you hear a siren outside, proceed inside.

Indoor Fire Alarms are mean to stop class or research and immediately evacuate the building. Proceed to your Emergency Assembly Area away from building doors. Remain outside until police, fire, or other emergency response personnel provide additional guidance or tell you it is safe to leave.

All Hazards Outdoor Emergency Warning sirens mean to immediately seek shelter (Shelter in Place) in a safe location within the closest building. "Shelter in place" means seeking immediate shelter inside a building or University residence. This course of action may need to be taken during a tornado, a civil disturbance including a shooting or release of hazardous materials in the outside air. Once safely inside, find out more details about the emergency. Remain in place until police, fire, or other emergency response personnel provide additional guidance or tell you it is safe to leave.

In both cases, you should seek additional clarifying information by all means possible: Purdue Home page, email alert, TV, radio, etc. Review the Purdue Emergency Warning Notification System multi-communication layers at http://www.purdue.edu/ehps/emergency_preparedness/warning-system.html

Mental health

Purdue University is committed to advancing the mental health and well-being of its students. If you or someone you know is feeling overwhelmed, depressed, and/or in need of support, services are available. For help, such individuals should contact Counseling and Psychological Services (CAPS) at (765)494-6995 and http://www.purdue.edu/caps/ during and after hours, on weekends and holidays, or by going to the CAPS office of the second floor of the Purdue University Student Health Center (PUSH) during business hours.

Nondiscrimination

Purdue University is committed to maintaining a community which recognizes and values the inherent worth and dignity of every person; fosters tolerance, sensitivity, understanding, and mutual respect among its members; and encourages each individual to strive to reach his or her own potential. In pursuit of its goal of academic excellence, the University seeks to develop and nurture diversity. The University believes that diversity among its many members strengthens the institution, stimulates creativity, promotes the exchange of ideas, and enriches campus life.

Purdue University prohibits discrimination against any member of the University community on the basis of race, religion, color, sex, age, national origin or ancestry, marital status, parental status, sexual orientation, disability, or status as a veteran. The University will conduct its programs, services and activities consistent with applicable federal, state and local laws, regulations and orders and in conformance with the procedures and limitations as set forth in Executive Memorandum No. D-1, which provides specific contractual rights and remedies.

Schedule

See the schedule page.

Instructor absence

David (your instructor) has a few planned absenses this term. We will hold class as usual with another instructor, your TA, or a video lecture.

Makeup classes

If we need to reschedule additional classes, we will do so on an as-needed basis. Our plan is to use video lectures to supplement for any missing class periods.

Changes

This syllabus is subject to change. Updates will be posted on the course website and announced via email.