Skip to content

mitmath/1806

This branch is up to date with master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

31cdff3 · Mar 3, 2025
Sep 14, 2024
Feb 1, 2022
Mar 3, 2025

Repository files navigation

MIT 18.06, Spring 2025
Linear Algebra

Welcome to MIT 18.06: Linear Algebra! The Spring 2025 course information, materials, and links are recorded below. Course materials for previous semesters are archived in the other branches of this repository. You can dive in right away by reading this introduction to the course by Professor Strang.

Catalog Description: Basic subject on matrix theory and linear algebra, emphasizing topics useful in other disciplines, including systems of equations, vector spaces, determinants, eigenvalues, singular value decomposition, and positive definite matrices. Applications to least-squares approximations, stability of differential equations, networks, Fourier transforms, and Markov processes. Uses linear algebra software. Compared with 18.700, more emphasis on matrix algorithms and many applications.

Instructor: Prof. Nike Sun

Textbook: Introduction to Linear Algebra: 6th Edition.

Lecture Material and Summaries

Lecture 1 (Mon Feb 3 2025)

  • Vectors in R 2 , and generalization to vectors in R N (N-dimensional space).
  • Vector operations: addition and scalar multiplication. Both operations together: linear combinations.
  • The span of a set of vectors { u 1 , , u k } is the set of all linear combinations of these vectors: we covered some examples in class.
  • Definition of matrix times vector: A x where A is an M × N matrix, and x is in R N .

Reading: Strang Chapter 1.

Lecture 2 (Wed Feb 5 2025)

  • Dot product, vector length, cosine formula.
  • The gaussian elimination algorithm for solving a system of linear equations Ax=b: reduce the matrix to row echelon form (REF), and do back-substitution. Worked through an example in class.
  • Definition of matrix times matrix: A B = X where A is M × N , B is N × P , X is M × P .* We explained how to view the gaussian elimination operations as matrix multiplication operations: the steps of gaussian elimination correspond to changing A x = b to ( G 1 ) A x = ( G 1 ) b , ( G 2 ) ( G 1 ) A x = ( G 2 ) ( G 1 ) b , etc.

Reading: Strang 2.1-2.2.

Lecture 3 (Fri Feb 7 2025)

  • Reviewed the gaussian elimination example using matrix multiplications to encode the operations.
  • Gauss-Jordan elimination has a few additional steps which brings the system to reduced row echelon form (RREF) — we did this in the same example, again using matrix multiplications.
  • In the example, the final RREF system was ( G 5 ) ( G 4 ) ( G 3 ) ( G 2 ) ( G 1 ) A x = ( G 5 ) ( G 4 ) ( G 3 ) ( G 2 ) ( G 1 ) b = c . Moreover we found ( G 5 ) ( G 4 ) ( G 3 ) ( G 2 ) ( G 1 ) A = I 3 , the 3 × 3 identity matrix. In this example it allowed us to read off x = c .
  • We reviewed basic rules of matrix multiplication: associative A ( B C ) = ( A B ) C , distributive A ( B + C ) = A B + A C , but not commutative: A B and B A are generally not equal!
  • Inversion: if A is an n × n matrix, it is invertible if there exists a matrix A 1 , also n × n , such that A A 1 = A 1 A = I n , the n × n identity matrix.
  • If A is invertible, then Gauss-Jordan elimination converts ( A | b ) to ( I | c ) . Moreover it converts ( A | I ) to ( I | A 1 ) .
  • Square matrices need not be invertible, and we covered some examples.

Reading: Strang 2.3.

Lecture 4 (Mon Feb 10 2025)

  • The columns of A are linearly dependent if a non-trivial linear combination of the columns is zero: can write this as A x = 0 for x nonzero. If A is a square matrix with linearly dependent columns, then A cannot be invertible. We covered some examples.
  • We defined the column space C ( A ) of a matrix. An m × n matrix A can be viewed as a function/map from R n to R m , sending input x in R n to output A x in R m . The column space C ( A ) is exactly the image of this map. The equation A x = b is solvable if and only if b lies in C ( A ) .
  • We defined general vector spaces and subspaces, and covered some examples.

Reading: Strang 3.1.

Lecture 5 (Wed Feb 12 2025)

  • Defined the null space N ( A ) as the set of vectors x such that A x = 0 .
  • Note that if A is m × n , then C ( A ) is a subspace of R n , while N ( A ) is a subspace of R m .
  • Invertible row operations (such as in Gauss-Jordan elimination) do not affect the null space, so if R is the RREF of A , then N ( A ) = N ( R ) .
  • We covered several examples of calculating N ( A ) . We also noted that in all our examples, dim C(A) + dim N(A) = n.

Reading: Strang 3.2.

Lecture 6 (Fri Feb 14 2025)

  • In this class we covered the general solution for a system of linear equations Ax=b.
  • The basic principle: if b is not in C ( A ) , then there is no solution. If b is in C ( A ) , then there must exist at least one "particular solution," call it x 0 . Then the set of all solutions to A x = b is the set of vectors x 0 + x , where x 0 is the particular solution, and x is any vector from the null space N ( A ) .
  • General recipe for solving:
    • given ( A | b ) , apply Gauss-Jordan elimination to transform to RREF system ( R | c ) .
    • If the RREF system contains a row that says 0 = nonzero, then we have a contradiction, and in this case b is not in C ( A ) and there is no solution.
    • Otherwise, set the free variables to zero to find a particular solution x 0 .
    • Separately, solve for the null space N ( A ) .
    • Then the set of all solutions to A x = b is the set of vectors x 0 + x , where x 0 is the particular solution, and x is any vector from N ( A ) .

Reading: Strang 3.3.

Lecture 7 (Mon Feb 18 2025)

  • Throughout this class, we let v 1 , , v n be list of n vectors, each in the space R m . Let A be the m × n matrix with columns v 1 , , v n .
    • The vectors { v 1 , . . . , v n } are linearly dependent if a non-trivial linear combination of them equals zero: this corresponds to N ( A ) being strictly larger than { 0 } . Otherwise, we say they are linearly independent: this corresponds to N ( A ) = { 0 } .
    • A basis for a vector space V is a list of vectors that span V , and are linearly independent. We covered the standard basis { e 1 , . . . , e n } for the space R n .
    • Let V = span { v 1 , . . . , v n } . Then V is the same as C ( A ) . If { v 1 , . . . , v n } are linearly independent, then they form a basis for V .
  • More generally, perform Gauss-Jordan elimination, and let R = G A be the RREF of A . Then C ( R ) = G C ( A ) .
    • The pivot columns of R form a basis for C ( R ) , and the corresponding columns of A form a basis for C ( A ) .
    • Note that rank(A) = # pivots in R = dim C(R) = dim C(A). Meanwhile # free variables in R = dim N(A).
    • There are n columns total, and each column must be pivot or free, so n = # pivot + # free = dim C(A) + dim N(A): this is the rank-nullity theorem.
  • Lastly, we reviewed that if A is an m × n matrix, then we view it as a map from R n to R m , sending x in R n to A x in R m .

Reading: Strang 3.4.

Note: You should be able to do all of exam 1 using only the information covered in Lectures 1–6, together with the homework, recitations, and reading assigned before exam 1. However, since all the topics of the class are closely connected, material from Lecture 7 might also be helpful to know for the exam, and you are free to use that material on the exam as well. All exams in this class are closed book, closed notes.


Lecture 8 (Fri Feb 21 2025)

  • We started the lecture with the definition of the matrix transpose A t .
    • Note in general ( A t ) t = A , and ( A B ) t = B t A t .
    • If A = A t , then we say that A is symmetric. Only square matrices can be symmetric.
  • We covered the four fundamental subspaces of a matrix, and how to calculate them. Throughout, let A be an m × n matrix, and let R = G A be the RREF. Thus G is an invertible m × m matrix that encodes the Gauss-Jordan row operations.
    • Column space C ( A ) = G 1 C ( R ) . This is a subspace of R m .
    • Null space N ( A ) = N ( R ) . This is a subspace of R n .
    • Row space C ( A t ) = C ( R t ) . This is a subspace of R n .
    • Left null space N ( A t ) = G t N ( R t ) . This is a subspace of R m .

Formal reasoning for the above claims:

  1. Column space: C ( A ) = A x : x R n and C ( R ) = G A x : x R n . Thus b C ( R ) b = G A x  for some  x G 1 b = A x  for some  x G 1 b C ( A ) . This proves C ( A ) = G 1 C ( R ) .
  2. Null space: N ( A ) = { x : A x = 0 } and N ( R ) = { x : G A x = 0 } . Since G invertible, A x = 0 G A x = 0 . This proves N ( A ) = N ( R ) .
  3. Row space: recall R t = ( G A ) t = A t G t . C ( A t ) = { A t x : x R m } and C ( R t ) = { A t G t x : x R m } . Since G is invertible, G t is also invertible. As x ranges over all of R m , G t x also ranges over all of R m . Therefore C ( A t ) = C ( R t ) .
  4. Left null space: (There was a typo on the blackboard, so please read this one carefully.) N ( A t ) = { x : A t x = 0 } and N ( R t ) = { x : A t G t x = 0 } . Therefore x N ( R t ) A t G t x = 0 G t x N ( A t ) . This proves N ( A t ) = G t N ( R t ) .

In class, we calculated the four fundamental subspaces on a small example. We verified that the column space and left null space are orthogonal subspaces of R m , while the row space and null space are orthogonal subspace of R n .

Reading: Strang 3.5.

Lecture 9 (Mon Feb 24 2025)

  • In this class we reviewed the four fundamental subspaces of an m × n matrix A .
  • We went over an example of how to calculate the four subspaces of A , using the RREF R = G A .
  • Dimensions: both column space and row space have dimension r = rank(A). The null space has dimension n r , while the left null space has dimension m r .
  • We covered the fact that in R n , the row space and null space are orthogonal complements of one another. In R m , the column space and left null space are orthogonal complements of one another.

Reading: Strang 4.1.

Lecture 10 (Wed Feb 26 2025)

  • We covered what it means for two subspaces of R n to be:
    • complementary
    • orthogonal
    • orthogonal complements.
  • In particular:
    • If V and W are complementary subspaces of R n , then any x R n can be uniquely written as x = v + w with v from V , w from W .
    • If V and W are in additional orthogonal complements, then v is the orthogonal projection of x onto V , while w is the orthogonal projection of x onto W . Denoted v = proj V x and w = proj W x .
  • We discussed the geometric interpretation of orthogonal projection:
    • v = proj V x is the unique vector v in V that lies closest to x .
    • equivalently, v = proj V x is the unique vector v in V such that ( x v ) is perpendicular to V .
    • We used the latter characterization to calculate proj Y x where Y is the span of a single nonzero vector y in R n .

Reading: Strang 4.2.

Lecture 11 (Fri Feb 28 2025)

  • We covered the general formulas for orthogonal projection.
  • Projection onto a one-dimensional subspace Y = span { y } , where y is a unit vector in R n : proj Y ( x ) = P Y x where P Y = y y t . Note that P Y is an n × n symmetric matrix. Its column space is exactly the one-dimensional space Y , therefore P Y has rank one.
  • Projection onto a general subspace V of R n , where dim  V = r < n : first express V = C ( A ) where A i s a n n × r matrix whose columns form a basis of V . We showed in class that v = proj V ( b ) = P V b where P V = A ( A t A ) 1 A t . This is an n × n symmetric matrix. Its column space is exactly V = C ( A ) , therefore P V has rank r .
    • Claim: If A is n × r with rank r , then A t A is invertible. We stated this fact in class, and used it to define P V . We did not yet give a justification of this fact, and will do so in a future lecture.
    • Note that v = A x where x = ( A t A ) 1 A t b . This achieves the minimum distance A x b , and we call this the least squares solution.
  • Lastly we went over some examples of the projection matrix formula:
    • In the one-dimensional case Y = span { y } where y is a unit vector, we take A = y and recover the formula P Y = y y t .
    • If we have an orthonormal basis { u 1 , . . . , u r } for V , then P V = P 1 + . . . + P r where P j = u j ( u j ) t is the orthogonal projection onto span { u j } .

Reading: Strang 4.3.

Lecture 12 (Mon March 3 2025)

  • As we learned previously, the equation A x = b does not have a solution if b does not lie in column space C ( A ) . In this case, one can instead ask for the least squares (LS) solution: the choice of x that minimizes
A x b 2 = i [ ( A x ) i b i ] 2
  • This means v = A x should be precisely the projection of x onto C ( A ) , so from what we previously learned, we see that v = A ( A t A ) 1 A t b , and consequently x = ( A t A ) 1 A t b .
  • Application: given a data set ( a i , b i ) for 1 i 1000 , we covered how to find:
    • The straight line with no intercept that achieves the least squares fit: b = x a where x is the slope;
    • The straight line with intercept that achieves the least squares fit: b = x 0 + x 1 a where x 0 is the intercept and x 1 is the slope;
    • The cubic function that achieves the least squares fit: b = x 0 + x 1 a + x 2 a 2 + x 3 a 3 .

Reading: Strang 4.3.

Reading for upcoming lectures: we will continue through Strang Chapter 4.