Math 170A, Winter 2016

The picture is a sparse matrix given by discretizing the Laplacian via the finite element method. It is about 850x850, but only 7692 of the approximately 730,000 entries are nonzero. How do we solve equations using this matrix?

Finals Week

Weeks 8-10

Weeks 6-7

Weeks 4-5

Weeks 1-3

Instructor: Chris Tiee
Office: AP&M 5121
Office hours: Tuesdays and Thursdays at 1:00p-2:00p, or by appointment.

Printable version of this page (the syllabus):

Class Forum and Email Policy:
The best way to keep up-to-date about the course is via this course's Piazza page. Sign up for this class on Piazza here. (Or look for an activation email from Piazza: data from TED was transferred over and you have been sent an invitation; check your official UCSD email address.) Piazza includes a discussion forum to ask general questions that can be answered by the instructor, TAs, or fellow students. To help accommodate people who may feel uncomfortable posting with their identities, anonymous postings are also allowed. Piazza also has an equation editor that allows display of math notation not available in email.

Because of these available resources, and the anticipated large size of the class, please check Piazza first (and maybe ask there), and then this webpage, before sending emails. Any such email answerable by other means will not get a response. Many questions about homework assignments will require in-depth responses, which are more appropriately answered in office hours; in that case, email should primarily be used to set up appointments in case you cannot make it to an office hour. Please be considerate and remember that I am a fellow human who has other life responsibilities outside of work, so not every email, especially those out of reasonable working hours, can be expected to receive a prompt response.

There is also TED for this course, though it will only be, for our purposes, a place to check your grades. Piazza will still be the main place for discussion.

Lecture Meeting Times and Location: MWF 12:00p-12:50p in Pepper Canyon Hall (PCYNH) 106
Sections and TAs: Discussion section is important for you to get practice with the homework and to get clarifications. The section times and locations are as follows:

A01W 5:00p-5:50pFrancesca GroganAP&M 2301
A02W 6:00p-6:50pYi LuoAP&M 2301
A03W 7:00p-7:50pJeremy SchmittAP&M 2301
A04W 8:00p-8:50pJeremy SchmittAP&M 2301
A05W 4:00p-4:50pFrancesca GroganAP&M B412

Analysis of numerical methods for linear algebraic systems and least squares problems. Orthogonalization methods. Ill-conditioned problems. Eigenvalue and singular value computations. Three lectures, one recitation. Knowledge of programming recommended.

Textbook: Fundamentals of Matrix Computations, Third Edition, by David S. Watkins.
Prerequisite: Math 20F (knowledge of programming basics or MATLAB basics, which should have been covered in 20F, is highly recommended [but see below in Lab Information and Grading and Exam policies])
Lab Information: As mentioned above, computer programming is an essential component of the course. That said, you are not expected to have a very advanced knowledge of programming and MATLAB techniques, nor do we claim that you will acquire such expertise in this course. MATLAB is available on AP&M lab computers (in B432 to be precise). It is also accessible via See ACMS computing services (AP&M 1313) for details (or visit and Also, a number of open source (i.e., free) MATLAB alternatives are available, like GNU Octave. You simply need some programming environment to complete the assignments; it doesn't matter which.

There will be 5 homework assignments, assigned from the textbook. Some of the problems involve a computer programming component, using MATLAB (for people who have not done MATLAB or haven't taken Math 20F, e.g., transfer students, here is a quick crash course and here are the MATLAB projects for Math 20F, which teaches MATLAB to you from the ground up; also do Exercise 1.1.8, part of Homework 1, anyway, in the book to refresh yourself).

There are two midterms (on Friday 1/29/16 and Friday 2/26/16) and a final exam (on Wednesday 3/16/16). The grading breakdown is as follows:

Midterm 115%
Midterm 215%

Here are the main points to remember about exams: There will be five homework assignments, due on Fridays at 11:59pm every other week. Homework will be submitted electronically through Gradescope. You will automatically be enrolled in it using your official UCSD email. If you need to sign up manually (for example, if you are on the wait list), the entry code is 96KPKM. Submission is easy, and there are a number of short videos there demonstrating how to do it (basically: scan your homework, or take photos with any mobile device: it does NOT have to be high-resolution).
The homework will be from the textbook, and will include a number of exercises in MATLAB. No late homework will be accepted except for medical reasons. The electronic submission system won't count it if it is late, so due dates will deliberately be placed late at night.

AssignmentDue DateDescription
Homework 0 Friday 1/8 11:59PM This is not a "real" assignment to get you all familiar with Gradescope and procedures: Turn in a pdf to containing your name and the message "Hello World!"
Homework 1 Friday 1/15 11:59PM NOTE: For this and all following assignments, note that the book sprinkles the exercises throughout each chapter, rather than collects a bunch of exercises at the end of each chapter. This is to encourage active reading of the material. The exercises are numbered within each subsection, and they are numbered along with everything else: if there's an exercise after, say, Theorem 1.2.3, it will be called Exercise 1.2.4. Similarly, Exercise 1.1.8 follows Equation 1.1.7 (written (1.1.7) in the text). This, while seeming less logical, makes it easy to find an exercise: simply follow the numbering (regardless of what gets numbered) until you find the right one.

Here are the exercises: 1.1.8 (copy/paste the output of the randn's and the matrix multiplication in that problem for your answer), 1.1.10 (use the code in 1.1.9 to get yourself started; the part (b) is simply replacing the line b=A*x), 1.1.25, 1.2.4, 1.3.4, 1.4.15, 1.4.16, 1.5.9. Note that 1.6.4, 1.7.10 will be moved to the next homework..

Homework 2 Monday 2/1 11:59PM 1.6.4, 1.7.10, 3.1.5, 3.2.8, 3.2.14, 3.3.7, 3.3.10, 3.4.22, 3.5.23 . (Note that we are skipping Chapter 2 for now and then coming back to it, because Least Squares is just that important.). 3.5.23 is actually easily doable using the Normal Equations (covered in lecture on 1/22). The relevant theorem for that is 3.5.21, and the general discussion on page 241.
Homework 3 Friday 2/12 11:59PM 2.2.6, 4.1.6, 4.1.15, 4.2.8, 4.2.12, 4.3.8, 4.3.9 [Hint for the last one: Definitely use the condensed version. One column is very obviously a multiple of the other, therefore it is rank-deficient, the rank being only 1. This means the Σ will be a 1 × 1 matrix. Its value must compensate for all the normalization that goes on into making orthonormal basis vectors].
Homework 3.5 Friday 2/19 11:59PM 8.1.9, 8.1.12, 8.2.4, 8.2.12, 8.2.24 I will probably do substantial portion of two of those in class, so go to class!
Homework 4 Wednesday 3/2 11:59PM 8.4.7a, 8.4.8a, 8.4.12, 8.4.22 (remember, $A$ is SPD, so eigenvalues are just its singular values and $U=V$ in its SVD), 8.3.14 (Suggestion: Prioritize 8.4 homework problems over 8.3 problems for midterm study. Use without proof $\rho(G)$ in Table 8.5 in the textbook, right between Exercises 8.3.12 and 8.3.13) Optional: Write an algorithm in Matlab implementing (8.3.15) and (8.7.1).
Homework 5 Wednesday 3/9 11:59PM 5.1.19 (I did some of this in lecture), 5.2.6, 5.2.17 (The relation of Eigenstuff and SVD), 5.3.6 (use the code from 5.3.10), 5.3.10 (your "lab assigment").
The following is an approximate schedule for the class. Adjustments may occur as things come up during the quarter; see the Announcements section as well as Piazza to stay up to date.

Week Topics Covered
Week 1
1.1-1.5: Brief review of background and notation, Cholesky Factorization.

Week 2
1.4-1.6 More Cholesky factorization, block algorithms, and banded/sparse matrices.
Homework 1: 1.1.8, 1.1.10, 1.1.25, 1.2.4, 1.3.4, 1.4.15, 1.4.16, 1.5.9.

Week 3
[Note: MLK Jr. Day is on 1/18, and there will be NO CLASS]
1.7, 3.1-3.2: LU Factorization, and Intro to Least Squares.

Week 4
3.3-3.5, More Least Squares, review, and Midterm: Covering Chapters 1-3.
Homework 2: 1.6.4, 1.7.10, 3.1.5, 3.2.8, 3.2.14, 3.3.7, 3.3.10, 3.4.22.
Midterm 1. Covers: 1.1-1.7, 3.1-3.4.

Week 5
2.1, 4.1-4.2: The Singular Value Decomposition (SVD)

Week 6

4.3, 8.1-2 The Moore-Penrose Pseudoinverse; Intro to Iterative Methods
Homework 3.

Week 7
[Note: Presidents' Day is on 2/15, and there will be NO CLASS]

8.2-8.4: Iterative Methods.
Homework 3.5.
Week 8

Review and Midterm: Covering Chapters 4 and 8.

Midterm 2. Covers: 4.1-4.3, 8.1-8.4

Week 9

Homework 4. 8.7, 5.1-5.2: Wrap-up of Iterative Methods, Eigenvalues and Eigenvectors.

Week 10

Review for Final: Covering Main Parts of Chapters 1-5 and 8.
Homework 5.

WED 3/16
(Location TBA)

Final Exam: Covers: Main Parts of Chapters 1-6 and 8.
In particular: Covers Homeworks 1-5.
Very specifically: Covers sections 1.1-1.7, 2.1, 3.1-3.5, 4.1-4.3, 5.1-5.3, 8.1-8.4, 8.7.
Review Sessions:

Saturday, March 12 from 2pm-4pm in AP&M B402A (calc lab)

Sunday, March 13 from 3pm-5pm in PCYNH 106 (the usual room) Please try to attend this one if possible; the others have limited capacity.

Also beware of Daylight Saving Time ("Spring Forward"), which removes Sunday's 2am.

Monday, March 14 from 5pm-7pm in AP&M B402A (calc lab)

Extra Office Hours:
Sunday 3/13 from 5pm-6:30pm and Monday 3/14 from 9:30am-11am

Francesca: Tuesday 3/15 10am-12pm

Chris: Tuesday 3/15 12pm-2pm