Seyed Masoud Hosseini · Overview · Study log · Weekly summaries · Ideas · Search · Transcript · RSS feed
Matrix Methods for Data Analysis & ML · Lecture 20 of 36 · 49:00
Lecture 18: Counting Parameters in SVD, LU, QR, Saddle Points
Study guide
What this lecture covers
The lecture opens with a review exercise that ties together the course's factorizations: for each major decomposition of a matrix - LU, QR, eigenvector form, symmetric form, polar decomposition, and SVD - Strang counts the free parameters in the pieces and checks that they add up to the number of free parameters in the original matrix. This builds a concrete sense of how much information each factorization actually carries, including the harder case of a rank-R matrix. The lecture then turns to a new topic, saddle points, starting with the source that comes from constrained optimization.
This sits near the end of the course's linear algebra portion, just before the material shifts to probability and then optimization for deep learning. After watching, you should be able to count free parameters in any of the standard factorizations and explain why a constrained quadratic minimization problem produces a saddle point rather than a minimum.
Key ideas
- Free parameter counting: each factorization of an
N x Nmatrix (N^2parameters) should split its parameters across its factors so the totals add up toN^2, given the constraints each factor carries (unit length, orthogonality, triangularity). - Orthogonal matrix
Q: has1/2 N(N-1)free parameters, since each successive column loses one degree of freedom to normalization and one more to each orthogonality condition with earlier columns. - Symmetric matrix
S: has1/2 N(N+1)free parameters (the upper triangle plus the diagonal), matching the count from its eigendecompositionQ Lambda Q^T. - Rank-
Rmatrix parameter count: a rank-Rmatrix among allM x Nmatrices hasR(M + N - R)free parameters, found by counting the reduced SVD'sU,Sigma,Vpieces. - Rank-
Rmatrices form a manifold, not a subspace: adding two rank-2 matrices generally gives a matrix of higher rank, so the set of fixed-rank matrices is a curved surface in matrix space rather than a vector space. - Lagrangian and saddle points: minimizing a positive-definite quadratic
x^T S xsubject to linear constraintsAx = Bleads to the LagrangianL(x, lambda), whose stationary point is a saddle point, not a minimum, because of the added Lagrange multipliers. - KKT matrix sign pattern: the block matrix
[[S, A^T], [A, 0]]from this Lagrangian has both positive and negative eigenvalues; block elimination shows the first block of pivots (fromS) is positive and the second block (from-A S^{-1} A^T) is negative, and pivot signs match eigenvalue signs.
Walkthrough
Counting parameters in LU, QR, and eigenvector factorizations (1:03)
Strang walks through each factorization in turn: L and U split N^2 parameters as 1/2 N(N-1) and 1/2 N(N+1); the eigenvector matrix X contributes N^2 - N parameters (after fixing a scaling convention) plus N eigenvalues; and the orthogonal matrix Q contributes 1/2 N(N-1) parameters because each column loses one degree of freedom to normalization and more to orthogonality with prior columns. Each case is checked to sum back to N^2.
Symmetric matrices and the polar decomposition (7:15)
The count for a symmetric matrix S is 1/2 N(N+1), matching the parameters in its eigendecomposition Q Lambda Q^T. Strang then applies the same reasoning to the polar decomposition A = Q S, noting its close relationship to the SVD.
Counting parameters in the SVD (10:18)
For a full-rank M x N matrix (M <= N), Strang counts parameters in U, Sigma, and V^T, carefully noting that only the first M columns of V matter since the rest come from the null space. The total works out to MN, matching the original matrix.
Parameters in a rank-R matrix (19:39)
Generalizing to a matrix of rank R less than full rank, the same style of count through the reduced SVD gives R(M + N - R) free parameters. Strang notes that fixed-rank matrices do not form a subspace: summing two rank-R matrices generally increases the rank, so the set of rank-R matrices is a lower-dimensional surface, not a vector space.
Saddle points from constraints (26:51)
Turning to saddle points, Strang sets up the constrained minimization of a positive-definite quadratic x^T S x subject to Ax = B, and introduces the Lagrangian L(x, lambda) = x^T S x + lambda^T(Ax - B). Taking derivatives with respect to x and lambda gives the block system Sx + A^T lambda = 0 and Ax = B.
The KKT matrix and its eigenvalue signs (32:03)
The resulting block matrix, of the form [[S, A^T], [A, 0]], is shown to be indefinite: the zero block on the diagonal rules out positive definiteness. Using a small 2x2 example, Strang demonstrates the eigenvalues split in sign, then uses block elimination on the general matrix to show the first set of pivots (from S) are positive and the second set (from -A S^{-1} A^T) are negative, tying pivot signs to eigenvalue signs for symmetric matrices.
Before you watch
- Review the SVD, LU, and QR factorizations from earlier lectures, since this lecture assumes familiarity with all of them.
- Recall the eigendecomposition of a symmetric matrix and the meaning of positive definiteness.
Check your understanding
- Why does an
N x Northogonal matrix have1/2 N(N-1)free parameters rather thanN^2? - How is the free-parameter count for a rank-
Rmatrix different from the count for a full-rank SVD, and why? - Why is a saddle point, rather than a minimum, the natural stationary point of a Lagrangian for constrained minimization?
- What does the sign pattern of the pivots in the KKT matrix tell you about its eigenvalues?
Vocabulary
- free parameter (noun)
- A number that can be chosen independently, not fixed by other choices.
Strang counts the free parameters in each factorization. - factorization (noun)
- Writing a matrix as a product of simpler matrices.
LU, QR, and SVD are all matrix factorizations. - degree of freedom (noun)
- One independent way a system can vary.
Each orthogonality condition removes one degree of freedom. - orthogonality condition (noun)
- A requirement that two vectors be perpendicular to each other.
Each new column must satisfy an orthogonality condition with earlier ones. - triangularity (noun)
- The property of having zeros above or below the main diagonal.
L and U carry their parameters from triangularity. - manifold (noun)
- A curved surface in a higher-dimensional space, not a flat vector space.
Rank-R matrices form a manifold, not a subspace. - subspace (noun)
- A flat set of vectors closed under addition and scaling.
The set of rank-R matrices is not a subspace. - Lagrangian (noun)
- A combined function used to solve constrained optimization problems.
The Lagrangian adds a penalty for violating the constraint. - Lagrange multiplier (noun)
- An extra variable introduced to enforce a constraint in optimization.
Lambda is the Lagrange multiplier for the constraint Ax = B. - saddle point (noun)
- A point where a function looks like a maximum in one direction and a minimum in another.
The Lagrangian's stationary point is a saddle point. - stationary point (noun)
- A point where the gradient of a function is zero.
Setting derivatives to zero finds the stationary point. - block matrix (noun)
- A matrix divided into smaller sub-matrices arranged in a grid.
The KKT system is written as a block matrix. - block elimination (noun)
- A version of elimination performed on blocks of a matrix instead of single numbers.
Block elimination reveals the sign pattern of the pivots. - pivot (noun)
- The number used to eliminate entries below it during elimination.
The sign of each pivot matches an eigenvalue's sign. - indefinite (adjective)
- Having both positive and negative eigenvalues.
The KKT matrix is indefinite. - review exercise (noun)
- A task designed to revisit and reinforce earlier material.
The lecture opens with a review exercise on factorizations. - concrete (adjective)
- Specific and tangible, rather than abstract.
Parameter counting gives a concrete sense of information content. - eigenvector matrix (noun)
- The matrix whose columns are the eigenvectors of another matrix.
X is the eigenvector matrix in diagonalization. - scaling convention (noun)
- An agreed rule for how to fix the size of a vector.
A scaling convention removes ambiguity in eigenvector length. - null space (noun)
- The set of vectors that a matrix sends to zero.
Extra columns of V come from the null space.
Chapters
- 0:00 <Untitled Chapter 1>
- 3:23 How Many Free Parameters in an Eigenvector Matrix
- 3:52 Choosing the Eigenvector Matrix
- 19:45 The Svd
- 21:42 Matrix Space
- 26:35 Saddle Points
- 27:14 Sources of Saddle Points
- 32:29 Block Matrix Form
- 38:44 Block Elimination
From the YouTube description
MIT 18.065 Matrix Methods in Data Analysis, Signal Processing, and Machine Learning, Spring 2018
Instructor: Gilbert Strang
View the complete course: https://ocw.mit.edu/18-065S18
YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63oMNUHXqIUcrkS2PivhN3k
In this lecture, Professor Strang reviews counting the free parameters in a variety of key matrices. He then moves on to finding saddle points from constraints and Lagrange multipliers.
License: Creative Commons BY-NC-SA
More information at https://ocw.mit.edu/terms
More courses at https://ocw.mit.edu
← Lecture 17: Rapidly Decreasing Singular Values · Lecture 19: Saddle Points Continued, Maxmin Principle →
