BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

The four fundamental subspaces

Strang opens by correcting Lecture 9: (1, 1, 2), (2, 2, 5), (3, 3, 8) are not a basis, since the matrix with these columns has two equal rows, so its row space, and therefore its column space, is only two-dimensional. Every m × n matrix of rank r has four fundamental subspaces: the column space C(A) and the left nullspace N(Aᵀ) in Rᵐ, and the row space C(Aᵀ) and the nullspace N(A) in Rⁿ. Their dimensions are r, m − r, r and n − r, so the row space and nullspace dimensions add to n, the other two to m. Bases: the pivot columns of A for C(A); the first r rows of R for the row space (row operations change the column space but not the row space); the special solutions for N(A). The left nullspace holds the y with Aᵀy = 0, that is yᵀA = 0ᵀ, the combinations of rows giving the zero row. Gauss–Jordan on [A I] gives [R E] with EA = R; the rows of E that produce zero rows of R are a basis of N(Aᵀ). For A with columns (1, 1, 1), (2, 1, 2), (3, 2, 3), (1, 1, 1) that is y = (−1, 0, 1). Finally, the 3 × 3 matrices form a vector space too, with subspaces such as the upper triangular, symmetric and diagonal matrices; the diagonal ones have dimension 3.

You need this first

Full reading path (14 pages)
  1. Vectors (8.01)
  2. Vectors and the dot product (18.02)
  3. Determinants and the cross product (18.02)
  4. Planes through three points, and matrices (18.02)
  5. Equations of planes and square systems (18.02)
  6. The geometry of linear equations (18.06)
  7. Elimination with matrices (18.06)
  8. Matrix multiplication and inverse matrices (18.06)
  9. Factorization into A = LU (18.06)
  10. Transposes, permutations and vector spaces (18.06)
  11. Column space and nullspace (18.06)
  12. Solving Ax = 0: pivot variables and special solutions (18.06)
  13. Solving Ax = b: the complete solution (18.06)
  14. Independence, basis and dimension (18.06)
On this page · 6 sections
  1. Correcting Lecture 9
  2. The four subspaces
  3. Their dimensions
  4. Bases
  5. A new vector space: matrices
  6. Summary

This lecture has two jobs: to correct an error from the last lecture, and to complete the picture of the four subspaces that come with every matrix (transcript, p. 1). It continues independence, basis and dimension.

Correcting Lecture 9#

Last time Strang added (3,3,8)(3, 3, 8) to (1,1,2)(1, 1, 2) and (2,2,5)(2, 2, 5), expecting a basis of R3\mathrm{R}^3 (transcript, p. 1). After class a student pointed out that it is not: the matrix with these three columns is not invertible, because it has two equal rows (pp. 1–2). Its rows are dependent, so its row space is only two-dimensional, its rank is 2, and so only two of its columns can be independent (p. 2). The rows say something about the columns, which this lecture makes precise (pp. 2, 8).

The four subspaces#

For an m×nm \times n matrix AA (transcript, pp. 3–5):

The rows span the row space; they are a basis only if they are independent (p. 3). Where do the spaces live? Solutions of Ax=0Ax = 0 and rows of AA have nn components, columns of AA have mm (p. 5):

Where the four subspaces live
C(AT) and N(A) lie in Rn;C(A) and N(AT) lie in RmC(A^T) \text{ and } N(A) \text{ lie in } \mathrm{R}^n; \qquad C(A) \text{ and } N(A^T) \text{ lie in } \mathrm{R}^m
In words

C( capital A ^ capital T ) and capital N ( capital A ) lie in R to the power n; C( capital A ) and capital N ( capital A ^ capital T ) lie in R to the power m

Understanding a space means having a basis and its dimension for each of the four (p. 6).

Their dimensions#

The short answers first (transcript, pp. 6–10). For rank rr:

The four dimensions
dim C(A)=r,dim C(AT)=r,dim N(A)=n−r,dim N(AT)=m−r\text{dim}\, C(A) = r, \quad \text{dim}\, C(A^T) = r, \quad \text{dim}\, N(A) = n - r, \quad \text{dim}\, N(A^T) = m - r
In words

dim C( capital A ) equals r, dim C( capital A ^ capital T ) equals r, dim capital N ( capital A ) equals n minus r, dim capital N ( capital A ^ capital T ) equals m minus r

The row space and the column space have the same dimension, a wonderful fact (p. 8). It explains the correction: the rows of the Lecture 9 matrix plainly span only a plane, so the column space does too (p. 8). In Rn\mathrm{R}^n the dimensions add up, r+(n−r)=nr + (n - r) = n, just as nn variables split into rr pivot and n−rn - r free ones (p. 10). The same rule applied to ATA^T, which has mm columns, gives m−rm - r for the left nullspace (p. 10).

Bases#

Column space (transcript, p. 7): the rr pivot columns of AA (the original AA, not RR).

Nullspace (pp. 9–10): the special solutions, one for each of the n−rn - r free variables.

Row space (pp. 11–15). The example from last time:

Row reduction of the example
A=(123111211231)→(12310−1−100000)→R=(101101100000)A = \begin{pmatrix} 1 & 2 & 3 & 1 \\ 1 & 1 & 2 & 1 \\ 1 & 2 & 3 & 1 \end{pmatrix} \to \begin{pmatrix} 1 & 2 & 3 & 1 \\ 0 & -1 & -1 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix} \to R = \begin{pmatrix} 1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}
In words

capital A equals 1 2 3 1; 1 1 2 1; 1 2 3 1 goes to 1 2 3 1; 0 minus 1 minus 1 0; 0 0 0 0 goes to capital R equals 1 0 1 1; 0 1 1 0; 0 0 0 0

Subtract row 1 from rows 2 and 3, multiply row 2 by −1-1, and subtract 2 of it from row 1 (pp. 11–12). The column space changed: (1,1,1)(1, 1, 1) is in C(A)C(A) but not in C(R)C(R), whose columns all end in 0 (p. 12). But the row space did not: every step replaced a row by a combination of rows, so the rows of RR lie in the row space of AA; and reversing the steps writes the rows of AA as combinations of the rows of RR (pp. 12–15). So the first rr rows of RR are a basis, the cleanest possible one (pp. 13–14):

Row space basis
C(AT)=C(RT),basis (1,0,1,1),  (0,1,1,0)C(A^T) = C(R^T), \quad \text{basis } (1, 0, 1, 1),\; (0, 1, 1, 0)
In words

C( capital A ^ capital T ) equals C( capital R ^ capital T ), basis (1, 0, 1, 1), (0, 1, 1, 0)

There are rr of them, they are independent (each has a 1 where the others have 0), and they span: the dimension is rr (p. 14). The first rr rows of AA itself would not always do (p. 13).

Left nullspace (pp. 15–21). It holds the yy with ATy=0A^Ty = 0. Transposing puts yy on the left, as a row (pp. 15–16):

Why 'left'
ATy=0  ⇒  yTA=0TA^Ty = 0 \;\Rightarrow\; y^TA = 0^T
In words

capital A ^ capital T y equals 0 which gives y^ capital T capital A equals 0^ capital T

So N(AT)N(A^T) holds the combinations of the rows that give the zero row (p. 20). RR does not show them directly; the steps from AA to RR do. Run Gauss–Jordan on [A    I][A\;\;I], with II of size m×mm \times m (pp. 16–18):

Gauss–Jordan on a rectangular matrix
(AI)→(RE),EA=R\begin{pmatrix} A & I \end{pmatrix} \to \begin{pmatrix} R & E \end{pmatrix}, \qquad EA = R
In words

capital A capital I goes to capital R E, E capital A equals capital R

EE records all the row operations. When AA is square and invertible, R=IR = I and so E=A−1E = A^{-1}, as in chapter two (p. 18). For the example (pp. 19–20):

E for the example
E=(−1201−10−101),EA=RE = \begin{pmatrix} -1 & 2 & 0 \\ 1 & -1 & 0 \\ -1 & 0 & 1 \end{pmatrix}, \qquad EA = R
In words

E equals minus 1 2 0; 1 minus 1 0; minus 1 0 1, E capital A equals capital R

Here m−r=3−2=1m - r = 3 - 2 = 1, so the left nullspace is a line. The last row of EE produced the zero row of RR, so y=(−1,0,1)y = (-1, 0, 1) is a basis: −1-1 times row 1 plus row 3 is zero, which could be seen from the start (p. 20). Strang shows this on the example; in general the last m−rm - r rows of EE, the ones that produce the zero rows of RR, are a basis for N(AT)N(A^T), found without starting over on ATA^T (p. 21).

A new vector space: matrices#

All 3×33 \times 3 matrices form a vector space MM: its "vectors" are matrices, which can be added and multiplied by numbers, with a zero matrix, and the eight rules hold (transcript, pp. 21–22). That matrices can also be multiplied together does not matter here (p. 22). Subspaces of MM include the upper triangular matrices and the symmetric matrices; their intersection, symmetric with zeros below the diagonal, is the diagonal matrices (pp. 22–23). The diagonal matrices have dimension 3: three diagonal matrices, each with one nonzero entry in a different diagonal position, are a basis (p. 24). The other dimensions are left for next time (p. 23).

Worked example

All four subspaces of your own

Find bases and dimensions of the four subspaces of B=(120124143615)B = \begin{pmatrix} 1 & 2 & 0 & 1 \\ 2 & 4 & 1 & 4 \\ 3 & 6 & 1 & 5 \end{pmatrix}.

Row reduce, keeping E

Subtract 2 times row 1 from row 2 and 3 times row 1 from row 3: both become (0,0,1,2)(0, 0, 1, 2). Subtract the new row 2 from row 3: zero. So R=(120100120000)R = \begin{pmatrix} 1 & 2 & 0 & 1 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 0 \end{pmatrix}, rank r=2r = 2, pivot columns 1 and 3. Doing the same to II gives last row of EE equal to (−3,0,1)−(−2,1,0)=(−1,−1,1)(-3, 0, 1) - (-2, 1, 0) = (-1, -1, 1).

The four bases

C(B)C(B): columns 1 and 3 of BB, (1,2,3)(1, 2, 3) and (0,1,1)(0, 1, 1); dimension 2. C(BT)C(B^T): (1,2,0,1)(1, 2, 0, 1) and (0,0,1,2)(0, 0, 1, 2); dimension 2. N(B)N(B): special solutions (−2,1,0,0)(-2, 1, 0, 0) and (−1,0,−2,1)(-1, 0, -2, 1); dimension 4−2=24 - 2 = 2. N(BT)N(B^T): (−1,−1,1)(-1, -1, 1); dimension 3−2=13 - 2 = 1. Check: −1(1,2,0,1)−(2,4,1,4)+(3,6,1,5)=(0,0,0,0)-1(1, 2, 0, 1) - (2, 4, 1, 4) + (3, 6, 1, 5) = (0, 0, 0, 0).

Check the counts

2+2=4=n2 + 2 = 4 = n and 2+1=3=m2 + 1 = 3 = m.

Summary#

Symbols on this page

Show the 17 symbols used here
→\to arrow.
Goes to (tends to), or becomes. Say it: “goes to”.
⇒\Rightarrow implies.
Implies: what follows is a consequence of what came before. Say it: “which gives”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
TT T.
As a superscript: the transpose. Say it: “capital T”.
xx x.
A solution of Ax = 0. Say it: “x”.
yy y.
A vector in the left nullspace: Aᵀy = 0. Say it: “y”.
nn n.
The number of columns of A. Say it: “n”.
mm m.
The number of rows of A. Say it: “m”.
rr r.
The rank of A. Say it: “r”.
AA A.
An m × n matrix; in the example, the 3 × 4 matrix with columns (1, 1, 1), (2, 1, 2), (3, 2, 3), (1, 1, 1). Say it: “capital A”.
BB B.
The 3 × 4 matrix of the worked example. Say it: “B”.
CC C.
As in C(A): the column space; C(Aᵀ) is the row space. Say it: “C”.
NN N.
As in N(A): the nullspace; N(Aᵀ) is the left nullspace. Say it: “capital N”.
MM M.
The vector space of all 3 × 3 matrices. Say it: “capital M”.
RR R.
The reduced row echelon form of A. Say it: “capital R”.
EE E.
The matrix that records the row operations: EA = R. Say it: “E”.
II I.
The identity matrix (m × m in Gauss–Jordan). Say it: “capital I”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 26 words used here

New here

left nullspace.
The nullspace of the transpose of a matrix: all the combinations of its rows that give zero.
Gauss–Jordan.
A method that continues elimination upwards as well as downwards until the matrix becomes the identity, which finds the inverse.
diagonal.
In a square matrix, the entries running from the top left corner to the bottom right; a diagonal matrix has zeros everywhere else.

Also used

subspace.
A set of vectors inside a larger space that is a space itself: sums and multiples of its vectors stay inside it. Explained in Transposes, permutations and vector spaces.
matrix.
A rectangular table of numbers, which acts on vectors to give new ones and so describes a linear change of coordinates. Explained in Planes through three points, and matrices.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
independence.
Of vectors: none of them is a combination of the others, so the only combination giving zero uses all zero coefficients. Explained in Independence, basis and dimension.
basis.
A set of independent vectors from which every vector in a space can be built, in exactly one way, as a combination. Explained in Independence, basis and dimension.
dimension.
The number of vectors in any basis of a vector space or subspace. Explained in Independence, basis and dimension.
invertible.
Of a square matrix or operator: having an inverse that undoes it; for a matrix this happens exactly when its determinant is not zero. Explained in The geometry of linear equations.
row space.
All the vectors that can be made by combining the rows of a matrix; it is the column space of its transpose. Explained in Matrix multiplication and inverse matrices.
rank.
The number of independent columns of a matrix, which always equals the number of independent rows. Explained in Similar matrices and the Jordan form.
column space.
All the vectors made by combining the columns of a matrix; Ax = b can be solved exactly when b lies in it. Explained in Matrix multiplication and inverse matrices.
nullspace.
All the vectors x that a matrix sends to zero, that is, all solutions of Ax = 0. Explained in Column space and nullspace.
vector.
A list of numbers written as a column, or more generally anything that can be added and multiplied by numbers. Explained in Orthogonal vectors and subspaces.
transpose.
The matrix made by writing the rows of a matrix as columns, flipping it across its main diagonal. Explained in Planes through three points, and matrices.
span.
The span of some vectors is everything that can be made by combining them; vectors span a space when they fill all of it. Explained in Independence, basis and dimension.
pivot.
In elimination, the first nonzero number in a row, used to clear out the entries below it. Explained in Positive definite matrices and minima.
pivot column.
A column of a matrix that contains a pivot after elimination; the matching columns of the original matrix form a basis for its column space. Explained in Column space and nullspace.
special solution.
A solution of Ax = 0 found by setting one free variable to 1 and the others to 0; together they build every solution. Explained in Solving Ax = 0: pivot variables and special solutions.
free variable.
An unknown whose column has no pivot, so it can be given any value; the other unknowns are then fixed by the equations.
vector space.
A collection of objects, called vectors, that can be added together and multiplied by numbers, with the results staying in the collection. Explained in Transposes, permutations and vector spaces.
triangular matrix.
A square matrix with only zeros below its diagonal (upper triangular) or only zeros above it (lower triangular). Explained in Elimination with matrices.
symmetric.
Unchanged by some swap, reflection or turn; for an expression in two quantities, unchanged when they are exchanged. Explained in Introduction to Fourier series.
intersection.
The part common to two or more sets or shapes: everything that belongs to all of them. Explained in Column space and nullspace.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

31 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. For a 5×85 \times 8 matrix of rank 3, what is the dimension of the left nullspace N(AT)N(A^T)?
  2. Which subspace does elimination from AA to RR leave unchanged?
  3. Why is N(AT)N(A^T) called the left nullspace?
0 of 3 answered

Flashcards

1 / 3