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

Column space and nullspace

A subspace is closed under linear combinations, so it contains zero. The union of a plane and a line through the origin is not a subspace (sums leave it), but the intersection of any two subspaces is. The column space C(A) holds all combinations of the columns of A; for the 4 × 3 matrix with columns (1, 2, 3, 4), (1, 1, 1, 1) and (2, 3, 4, 5) it is only a plane in R⁴, because column 3 is the sum of the first two. Ax = b can be solved exactly when b is in the column space, since Ax is a combination of the columns. The nullspace N(A) holds all solutions of Ax = 0; here it is the line of multiples of (1, 1, −1) in R³. It is a subspace because A(v + w) = Av + Aw and A(cv) = cAv. The solutions of Ax = b with b ≠ 0 are not a subspace, since zero is not among them: for b = (1, 2, 3, 4) they form a line that misses the origin. Column space and nullspace show the two ways to describe a subspace: by vectors to combine, or by equations to satisfy.

You need this first

Full reading path (10 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)
On this page · 6 sections
  1. Subspaces, unions and intersections
  2. The column space
  3. The nullspace
  4. Solutions of Ax = b do not form a subspace
  5. Two ways to describe a subspace
  6. Summary

This lecture is officially the start of vector spaces and subspaces, and of the two subspaces Strang cares most about: the column space and the nullspace of a matrix (transcript, p. 1). It continues transposes, permutations and vector spaces.

Subspaces, unions and intersections#

A vector space allows two operations, adding and multiplying by numbers; together they mean that all linear combinations stay in the space (transcript, p. 1):

Closed under linear combinations
v,w in the space  ⇒  cv+dw in the space, for all numbers c,dv, w \text{ in the space} \;\Rightarrow\; cv + dw \text{ in the space, for all numbers } c, d
In words

v, w in the space which gives c v plus d w in the space, for all numbers c, d

R3\mathrm{R}^3 is one; inside it, a plane PP and a line LL through the origin are subspaces, vector spaces inside a vector space (p. 2). Every subspace contains the zero vector (p. 2).

Is the union of PP and LL, all vectors in PP or LL or both, a subspace? No: adding a vector of PP to one of LL normally lands outside both (pp. 3–4). The intersection, the vectors in both, is a subspace; for a line not lying in the plane it is the zero vector alone, which is a subspace (pp. 4–5). This holds for any two subspaces SS and TT (pp. 5–6): if vv and ww are in both, then v+wv + w is in SS (as SS is a subspace) and in TT (as TT is), and so is 7v7v. The intersection is usually smaller, but it is a subspace (p. 6).

The column space#

The example (transcript, p. 7):

The example matrix
A=(112213314415)A = \begin{pmatrix} 1 & 1 & 2 \\ 2 & 1 & 3 \\ 3 & 1 & 4 \\ 4 & 1 & 5 \end{pmatrix}
In words

capital A equals 1 1 2; 2 1 3; 3 1 4; 4 1 5

Its columns have four components, so its column space C(A)C(A) is a subspace of R4\mathrm{R}^4: the number of rows decides (pp. 7–8). Three vectors alone are not a subspace; C(A)C(A) is all their linear combinations, the smallest space containing the columns (p. 8). Three vectors cannot fill all of four-dimensional space, as the class guesses, so it is something smaller (p. 9).

Which bb can be reached? Ax=bAx = b is four equations in three unknowns, and for most bb there is no solution (p. 10):

Ax = b written out
(112213314415)(x1x2x3)=(b1b2b3b4)\begin{pmatrix} 1 & 1 & 2 \\ 2 & 1 & 3 \\ 3 & 1 & 4 \\ 4 & 1 & 5 \end{pmatrix}\begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} = \begin{pmatrix} b_1 \\ b_2 \\ b_3 \\ b_4 \end{pmatrix}
In words

1 1 2; 2 1 3; 3 1 4; 4 1 5 x one; x two; x three equals b one; b two; b three; b four

But some right-hand sides work: b=0b = 0 (take x=0x = 0), b=(1,2,3,4)b = (1, 2, 3, 4) (take x=(1,0,0)x = (1, 0, 0), one of the first column), b=(1,1,1,1)b = (1, 1, 1, 1) (take x=(0,1,0)x = (0, 1, 0)) (pp. 11–12). Choose any xx and see what bb comes out: the reachable bb are exactly the combinations of the columns (p. 12).

How big is C(A)C(A) here? Column 3 is the sum of columns 1 and 2, so it adds nothing new: two columns give the same column space (pp. 13–14). Strang keeps the first columns that are not dependent and will call them pivot columns; column 1 could have been dropped instead (p. 14). So C(A)C(A) is a two-dimensional subspace of R4\mathrm{R}^4, a plane (pp. 14–15).

The nullspace#

The nullspace N(A)N(A) holds not right-hand sides but solutions: all xx with Ax=0Ax = 0 (transcript, p. 15). Its vectors have three components, so for this example it lies in R3\mathrm{R}^3, while the column space was in R4\mathrm{R}^4. For an m×nm \times n matrix, C(A)C(A) is in Rm\mathrm{R}^m and N(A)N(A) in Rn\mathrm{R}^n (p. 16).

For a small example the nullspace can be found by eye (elimination will do it in general, p. 16). Zero is always in it (p. 17). So is (1,1,−1)(1, 1, -1): column 1 plus column 2 minus column 3 gives zero (p. 17). So is (2,2,−2)(2, 2, -2), and in fact every multiple (p. 18):

The nullspace of the example
N(A)={ c(11−1):c any number }N(A) = \left\{\, c\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} : c \text{ any number} \,\right\}
In words

capital N ( capital A ) equals c 1; 1; minus 1 : c any number

a line through the origin in R3\mathrm{R}^3 (p. 19).

Why the nullspace is always a subspace (pp. 19–20). If Av=0Av = 0 and Aw=0Aw = 0, then by the distributive law of matrix multiplication (p. 20)

Closed under addition and multiples
A(v+w)=Av+Aw=0+0=0,A(12v)=12 Av=0A(v + w) = Av + Aw = 0 + 0 = 0, \qquad A(12v) = 12\,Av = 0
In words

capital A the quantity v plus w, equals capital A v plus capital A w equals 0 plus 0 equals 0, capital A (12 v) equals 12 capital A v equals 0

Solutions of Ax = b do not form a subspace#

Change the right-hand side to b=(1,2,3,4)b = (1, 2, 3, 4) (transcript, p. 21). There are solutions, (1,0,0)(1, 0, 0) and also (0,−1,1)(0, -1, 1) (minus column 2 plus column 3) (pp. 21–22). But they do not form a subspace: zero is not a solution (p. 22). Strang says they form something like a line or plane that misses the origin, and leaves this case at "maybe a line" (pp. 22–23). (Not in the lecture: since the nullspace here is a line, so is this set, the line through (1,0,0)(1, 0, 0) along the nullspace direction; Lecture 8 shows this in general.) Every solution is (1,0,0)+c(1,1,−1)(1, 0, 0) + c(1, 1, -1); with c=−1c = -1 that gives (0,−1,1)(0, -1, 1).

Two ways to describe a subspace#

The two subspaces of this lecture show the two natural ways (transcript, p. 23):

The next lecture finds the nullspace systematically for matrices too big to see by eye (p. 23).

Worked example

Column space and nullspace of your own

Let B=(11101−120413−1)B = \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & -1 \\ 2 & 0 & 4 \\ 1 & 3 & -1 \end{pmatrix}. (a) Find N(B)N(B). (b) Solve Bx=(3,1,4,5)Bx = (3, 1, 4, 5) completely. (c) Is (1,0,0,0)(1, 0, 0, 0) in C(B)C(B)?

(a) A dependent column

Column 3 is 2(column 1)−(column 2)2(\text{column } 1) - (\text{column } 2): 2(1,0,2,1)−(1,1,0,3)=(1,−1,4,−1)2(1, 0, 2, 1) - (1, 1, 0, 3) = (1, -1, 4, -1). So x=(2,−1,−1)x = (2, -1, -1) gives Bx=0Bx = 0. Columns 1 and 2 are not multiples of each other, so this is the only dependence: N(B)N(B) is the line of multiples of (2,−1,−1)(2, -1, -1), and C(B)C(B) is a plane in R4\mathrm{R}^4.

(b) A particular solution plus the nullspace

(3,1,4,5)=2(1,0,2,1)+(1,1,0,3)(3, 1, 4, 5) = 2(1, 0, 2, 1) + (1, 1, 0, 3), so x=(2,1,0)x = (2, 1, 0) works. Adding any nullspace vector keeps BxBx the same: all solutions are (2,1,0)+c(2,−1,−1)(2, 1, 0) + c(2, -1, -1), a line that misses the origin.

(c) Not in the column space

Any bb in C(B)C(B) is x1(1,0,2,1)+x2(1,1,0,3)x_1(1, 0, 2, 1) + x_2(1, 1, 0, 3). A second component of 0 forces x2=0x_2 = 0, then a third component of 0 forces x1=0x_1 = 0, leaving b=0b = 0, not (1,0,0,0)(1, 0, 0, 0). So Bx=(1,0,0,0)Bx = (1, 0, 0, 0) has no solution.

Summary#

  • The intersection of two subspaces is a subspace; the union usually is not.
  • C(A)C(A), all combinations of the columns, lies in Rm\mathrm{R}^m; Ax=bAx = b is solvable exactly when bb is in C(A)C(A).
  • N(A)N(A), all solutions of Ax=0Ax = 0, lies in Rn\mathrm{R}^n and is a subspace by A(v+w)=Av+AwA(v + w) = Av + Aw and A(cv)=cAvA(cv) = cAv.
  • The solutions of Ax=b≠0Ax = b \ne 0 are not a subspace; in the example they are one solution plus the nullspace line.
  • Subspaces are described by vectors to combine or by equations to satisfy.

Symbols on this page

Show the 26 symbols used here
≠\neq not equal.
Is not equal to. Say it: “is not equal 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”.
cc c.
Any number multiplying a vector; in the nullspace, the multiple of (1, 1, −1). Say it: “c”.
TT T.
A second subspace. Say it: “capital T”.
xx x.
The vector of unknowns (x₁, x₂, x₃). Say it: “x”.
dd d.
Any number multiplying the second vector in a linear combination. Say it: “d”.
nn n.
The number of columns of the matrix: N(A) lies in Rⁿ. Say it: “n”.
mm m.
The number of rows of the matrix: C(A) lies in Rᵐ. Say it: “m”.
vv v.
A vector in a subspace (in the nullspace check, a solution of Av = 0). Say it: “v”.
PP P.
A plane through the origin in R³. Say it: “capital P”.
AA A.
The 4 × 3 example matrix with columns (1, 2, 3, 4), (1, 1, 1, 1) and (2, 3, 4, 5). Say it: “capital A”.
BB B.
The 4 × 3 matrix of the worked example. Say it: “capital B”.
CC C.
As in C(A): the column space of A, all combinations of its columns. Say it: “capital C”.
bb b.
The right-hand side vector in Ax = b. Say it: “b”.
LL L.
A line through the origin in R³. Say it: “L”.
NN N.
As in N(A): the nullspace of A, all solutions of Ax = 0. Say it: “capital N”.
SS S.
A subspace. Say it: “S”.
ww w.
A second vector in a subspace (in the nullspace check, a solution of Aw = 0). Say it: “w”.
x1x_{1} x 1.
The first unknown: the weight on column 1. Say it: “x one”.
x2x_{2} x 2.
The second unknown: the weight on column 2. Say it: “x two”.
x3x_{3} x three.
The third unknown: the weight on column 3. Say it: “x three”.
b1b_{1} b 1.
The first component of the right-hand side b. Say it: “b one”.
b2b_{2} b 2.
The second component of the right-hand side b. Say it: “b two”.
b3b_{3} b 3.
The third component of the right-hand side b. Say it: “b three”.
b4b_{4} b four.
The fourth component of the right-hand side b. Say it: “b four”.

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

Words on this page

Show the 20 words used here

New here

nullspace.
All the vectors x that a matrix sends to zero, that is, all solutions of Ax = 0.
union.
The set made of everything that is in one set or the other, or both.
intersection.
The part common to two or more sets or shapes: everything that belongs to all of them.
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.

Also used

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.
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.
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.
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.
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.
permutation.
A rearrangement of a list of things into a new order. Explained in Elimination with matrices.
linear combination.
A sum of vectors, each first multiplied by a number, such as 3u + 2v. Explained in The geometry of linear equations.
zero vector.
The vector whose components are all zero; adding it to any vector changes nothing. Explained in Transposes, permutations and vector spaces.
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.
elimination.
Solving equations by subtracting multiples of one from another until each unknown can be found in turn. Explained in The geometry of linear equations.
distributive.
Of a product: spreading over a sum, so that a times (b + c) equals a times b plus a times c. Explained in Vector analysis: why the dot product has a cosine.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
by eye.
Judged just by looking, without measuring or calculating.
satisfy.
To make an equation or condition true.
systematic.
Following a fixed method; of an error, one that pushes every result the same way, so averaging does not remove it.

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. Ax=bAx = b has a solution exactly when…
  2. For an m×nm \times n matrix, the nullspace is a subspace of…
  3. If SS and TT are subspaces, which is always a subspace?
0 of 3 answered

Flashcards

1 / 3