Docsity

The Four Fundamental Subspaces: 4 Lines, Lecture notes of Linear Algebra

Toggle sidebar
bg1
The Four Fundamental Subspaces: 4 Lines
Gilbert Strang, Massachusetts Institute of Technology
1. Introduction. The expression “Four Fundamental Subspaces” has become familiar
to thousands of linear algebra students. Those subspaces are the column space and the
nullspace of Aand AT. They lift the understanding of Ax Dbto a higher level—a subspace
level. The first step sees Ax (matrix times vector) as a combination of the columns of A.
Those vectors Ax fill the column space C.A/. When we move from one combination to
all combinations (by allowing every x), a subspace appears. Ax Dbhas a solution exactly
when bis in the column space of A.
The next section of this note will introduce all four subspaces. They are connected
by the Fundamental Theorem of Linear Algebra. A perceptive reader may recognize the
Singular Value Decomposition, when Part 3 of this theorem provides perfect bases for the
four subspaces. The three parts are well separated in a linear algebra course! The first part
goes as far as the dimensions of the subspaces, using the rank. The second part is their
orthogonality—two subspaces in Rnand two in Rm. The third part needs eigenvalues and
eigenvectors of ATAto find the best bases. Figure 1 will show the “big picture” of linear
algebra, with the four bases added in Figure 2.
The main purpose of this paper is to see that theorem in action. We choose a matrix of
rank one, ADxyT. When mDnD2, all four fundamental subspaces are lines in R2. The
big picture is particularly clear, and some would say the four lines are trivial. But the angle
between xand ydecides the eigenvalues of Aand its Jordan form—those go beyond the
Fundamental Theorem. We are seeing the orthogonal geometry that comes from singular
vectors and the skew geometry that comes from eigenvectors. One leads to singular values
and the other leads to eigenvalues.
Examples are amazingly powerful. I hope this family of 2by 2matrices fills a space
between working with a specific numerical example and an arbitrary matrix.
2. The Four Subspaces. Figure 1 shows the fundamental subspaces for an mby n
matrix of rank r. It is useful to fix ideas with a 3by 4matrix of rank 2:
AD2
4
1023
0145
0000
3
5:
That matrix is in row reduced echelon form and it shows what elimination can accomplish.
The column space of Aand the nullspace of AThave very simple bases:
2
4
1
0
0
3
5and 2
4
0
1
0
3
5span C.A/; 2
4
0
0
1
3
5spans N.AT/:
After transposing, the first two rows of Aare a basis for the row space—and they also tell
us a basis for the nullspace:
1
pf3
pf4
pf5

Partial preview of the text

Download The Four Fundamental Subspaces: 4 Lines and more Lecture notes Linear Algebra in PDF only on Docsity!

The Four Fundamental Subspaces: 4 Lines

Gilbert Strang, Massachusetts Institute of Technology

1. Introduction. The expression “Four Fundamental Subspaces” has become familiar to thousands of linear algebra students. Those subspaces are the column space and the nullspace of A and AT. They lift the understanding of Ax D b to a higher level—a subspace level. The first step sees Ax (matrix times vector) as a combination of the columns of A. Those vectors Ax fill the column space C .A/. When we move from one combination to all combinations (by allowing every x), a subspace appears. Ax D b has a solution exactly when b is in the column space of A.

The next section of this note will introduce all four subspaces. They are connected by the Fundamental Theorem of Linear Algebra. A perceptive reader may recognize the Singular Value Decomposition, when Part 3 of this theorem provides perfect bases for the four subspaces. The three parts are well separated in a linear algebra course! The first part goes as far as the dimensions of the subspaces, using the rank. The second part is their orthogonality —two subspaces in R n^ and two in R m. The third part needs eigenvalues and eigenvectors of ATA to find the best bases. Figure 1 will show the “big picture” of linear algebra, with the four bases added in Figure 2.

The main purpose of this paper is to see that theorem in action. We choose a matrix of rank one, A D xyT. When m D n D 2 , all four fundamental subspaces are lines in R^2. The big picture is particularly clear, and some would say the four lines are trivial. But the angle between x and y decides the eigenvalues of A and its Jordan form—those go beyond the Fundamental Theorem. We are seeing the orthogonal geometry that comes from singular vectors and the skew geometry that comes from eigenvectors. One leads to singular values and the other leads to eigenvalues.

Examples are amazingly powerful. I hope this family of 2 by 2 matrices fills a space between working with a specific numerical example and an arbitrary matrix.

2. The Four Subspaces. Figure 1 shows the fundamental subspaces for an m by n matrix of rank r. It is useful to fix ideas with a 3 by 4 matrix of rank 2 :

A D

That matrix is in row reduced echelon form and it shows what elimination can accomplish. The column space of A and the nullspace of AT^ have very simple bases: 2 4

(^5) and

(^5) span C .A/;

(^5) spans N .AT/:

After transposing, the first two rows of A are a basis for the row space—and they also tell us a basis for the nullspace:

5 and

5 span^ C^ .A

T/;

5 and

5 span^ N^ .A/:

The last two vectors are orthogonal to the first two. But these are not orthogonal bases. Elimination is enough to give Part 1 of the Fundamental Theorem:

Part 1 The column space and row space have equal dimensionThe nullspace N .A/ has dimension n r; N .AT/ has dimension^ r^ D^ rank m r

That counting of basis vectors is obvious for the row reduced rref.A/. This matrix has r nonzero rows and r pivot columns. The proof of Part 1 is in the reversibility of every elimination step—to confirm that linear independence and dimension are not changed.

R n R m

Row space all ATy

C .AT/

dim r

Column space all Ax

C .A/

Perpendicular^ dim^ r xT.ATy/ D 0

Perpendicular yT.Ax/ D 0 x in Nullspace Ax D 0 N .A/

dim n r y in Nullspace of A T ATy D 0 N .AT/

dim m r

Figure 1: Dimensions and orthogonality for any m by n matrix A of rank r.

Part 2 says that the row space and nullspace are orthogonal complements. The orthog- onality comes directly from the equation Ax D 0. Each x in the nullspace is orthogonal to each row:

Ax D 0

.row 1/    .row m/

(^4) x

5 D

x is orthogonal to row 1

x is orthogonal to row m

The dimensions of C .AT/ and N .A/ add to n. Every vector in R n^ is accounted for, by separating x into xrow C xnull.

For the 90 ı^ angle on the right side of Figure 1, change A to AT. Every vector b D Ax in the column space is orthogonal to every solution of ATy D 0. More briefly, .Ax/Ty D xT.ATy/ D 0.

Part 2

C .AT/ D N .A/?^ Orthogonal complements in R n N .AT/ D C .A/?^ Orthogonal complements in R m

Figure 2 shows the four subspaces with orthonormal bases and the action of A and AC. The product ACA is the orthogonal projection of R n^ onto the row space—as near to the identity matrix as possible. Certainly AC^ is A^1 when that inverse exists.

3. Matrices of Rank One. Our goal is a full understanding of rank one matrices A D xy T. The columns of A are multiples of x, so the column space C .A/ is a line. The rows of A are multiples of yT, so the row space C .AT/ is the line through y (column vector convention). Let x and y be unit vectors to make the scaling attractive. Since all the action concerns those two vectors, we stay in R^2 :

A D xyT^ D

x 1 y 1 x 1 y 2 x 2 y 1 x 2 y 2

: The trace is x 1 y 1 C x 2 y 2 D xTy:

The nullspace of A is the line orthogonal to y. It is in the direction of y?^ D .y 2 ; y 1 /. The algebra gives Ay?^ D .xyT/y?^ D 0 and the geometry is on the left side of Figure 3. The good basis vectors are y and y?. On the right side, the bases for the column space of A and the nullspace of AT^ D yxT^ are the orthogonal unit vectors x and x?.

O :

y

y?

N .A/

C .AT/

x ]

x?

N .AT/

C .A/

Figure 3: The fundamental subspaces for A D xyT^ are four lines in R^2.

4. Eigenvalues of xy T. The eigenvalues of A were not mentioned in the Fundamental Theorem. Eigenvectors are not normally orthogonal. They belong to the column space and the nullspace, not a natural pair of subspaces. One subspace is in R m, one is in R n, and they are comparable (but usually not orthogonal) only when m D n. The eigenvectors of the singular 2 by 2 matrix A D xyT^ are x and y?:

Eigenvectors Ax D .xyT/x D x.yTx/ and Ay?^ D .xyT/y?^ D 0:

The new and crucial number is that first eigenvalue  1 D yTx D cos . This is the trace since  2 D 0. The angle  between row space and column space decides the orientation in Figure 3. The extreme cases  D 0 and  D =2 produce matrices of the best kind and the worst kind:

Best cos  D 1 when x D y: Then A D xxT^ is symmetric with  D 1; 0 Worst cos  D 0 when x D y?: Then A D y?yT^ has trace zero with  D 0; 0

“Worst” is a short form of “nondiagonalizable”. The eigenvalue  D 0 is repeated and the two eigenvectors x and y?^ coincide when the trace yTx is zero. At that point A D xyT

cannot be similar to the diagonal matrix of its eigenvalues (because this will be the zero matrix). The right choice of Q^1 AQ will produce the Jordan form in this extreme case when x and y are orthonormal:

J D

xT yT

xyT

x y

D

xT yT

0 x

D

Jordan chose the best basis (x and y) to put xyT^ in that famous form, with an off- diagonal 1 to signal a missing eigenvector. The SVD will choose two different orthonormal bases to put xyT^ in its diagonal form †.

5. Factorizations of A D xy T. By bringing together three important ways to factor this matrix, you can see the end result of each approach and how that goal is reached. We still have kxk D kyk D 1 and yTx D cos . The end results are †; ƒ, and T.

A. Singular Value Decomposition U TAV D

D †

B. Diagonalization by eigenvectors S ^1 AS D

cos  0 0 0

D ƒ

C. Orthogonal triangularization QTAQ D

cos  sin  0 0

D T

The columns of U; V; S, and Q will be x; y; x?, and y?. They come in different orders! A. In the SVD, the columns of U and V are orthonormal bases for the four subspaces. Figure 3 shows u 1 D x in the column space and v 1 D y in the row space. Then Ay D .xyT/y correctly gives x with  1 D 1. The nullspace bases are u 2 D x?^ and v 2 D y?. Notice the different bases in U and V , from the reversal of x and y:

U TAV D

x x?

T

xyT

y y?

D

x x?

T

x 0

D

D †

The pseudoinverse of xyT^ is yxT. The norm of A is  1 D 1. B. In diagonalization, the eigenvectors of A D xyT^ are x and y?. Those are the columns of the eigenvector matrix S, and its determinant is yTx D cos . The eigenvectors of AT^ D yxT^ are y and x?, which go into the rows of S ^1 (after division by cos ).

S^1 A S D

cos 

y x?

T

xyT

x y?

D

y 0

T

x 0

D

cos  0 0 0

D ƒ

This diagonalization fails when cos  D 0 and S is singular. The Jordan form jumps from ƒ to J , as that off-diagonal 1 suddenly appears. C. One of the many useful discoveries of Isaac Schur is that every square matrix is unitarily similar to a triangular matrix:

QAQ D T with QQ D I: