Skip to main content

Column space and nullspace

讲座摘要(lecture summary)

In this lecture we continue to study subspaces, particularly the column space and nullspace of a matrix.

Review of subspaces

A vector space is a collection of vectors which is closed under linear combinations. In other words, for any two vectors v\mathbf{v} and w\mathbf{w} in the space and any two real numbers cc and dd, the vector cv+dwc\mathbf{v} + d\mathbf{w} is also in the vector space. A subspace is a vector space contained inside a vector space.

A plane PP containing [000]\begin{bmatrix} 0 \\ 0 \\ 0\end{bmatrix} and a line LL containing [000]\begin{bmatrix} 0 \\ 0 \\ 0\end{bmatrix} are both subspaces of R3\R^3. The union PLP ∪ L of those two subspaces is generally not a subspace, because the sum of a vector in PP and a vector in LL is probably not contained in PLP ∪ L. The intersection STS ∩ T of two subspaces SS and TT is a subspace. To prove this, use the fact that both SS and TT are closed under linear combinations to show that their intersection is closed under linear combinations.

Column space of AA

The column space of a matrix AA is the vector space made up of all linear combinations of the columns of AA.

Solving Ax=bA\mathbf{x} = \mathbf{b}

Given a matrix AA, for what vectors mathbfbmathbf{b} does Amathbfx=mathbfbAmathbf{x} = mathbf{b} have a solution mathbfxmathbf{x}?

LetA=[122213314415].\text{Let}\enspace A = \begin{bmatrix*}[c] 1 & 2 & 2 \\ 2 & 1 & 3 \\ 3 & 1 & 4 \\ 4 & 1 & 5 \end{bmatrix*}.

Then Ax=bA\mathbf{x} = \mathbf{b} does not have a solution for every choice of b\mathbf{b} because solving Ax=bA\mathbf{x} = \mathbf{b} is equivalent to solving four linear equations in three unknowns. If there is a solution x\mathbf{x} to Ax=bA\mathbf{x} = \mathbf{b}, then b\mathbf{b} must be a linear combination of the columns of AA. Only three columns cannot fill the entire four dimensional vector space – some vectors b\mathbf{b} cannot be expressed as linear combinations of columns of AA.

Big question: what b\mathbf{b}’s allow Ax=bA\mathbf{x} = \mathbf{b} to be solved?

A useful approach is to choose x\mathbf{x} and find the vector b=Ax\mathbf{b} = A\mathbf{x} corresponding to that solution. The components of x\mathbf{x} are just the coefficients in a linear combination of columns of AA.

The system of linear equations Ax=bA\mathbf{x} = \mathbf{b} is solvable exactly when b\mathbf{b} is a vector in the column space of AA.

For our example matrix AA, what can we say about the column space of AA? Are the columns of AA independent? In other words, does each column contribute something new to the subspace?

The third column of AA is the sum of the first two columns, so does not add anything to the subspace. The column space of our matrix AA is a two dimensional subspace of R4\R^4.

Nullspace of AA

The nullspace of a matrix AA is the collection of all solutions x=[x1x2x3]\mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3\end{bmatrix} to the equation Ax=0A\mathbf{x} = 0.

The column space of the matrix in our example was a subspace of R4\R^4. The nullspace of AA is a subspace of R3\R^3. To see that it’s a vector space, check that any sum or multiple of solutions to Ax=0A\mathbf{x} = 0 is also a solution: A(x1+x2)=Ax1+Ax2=0+0A(\mathbf{x}_1 + \mathbf{x}_2) = A\mathbf{x}_1+ A\mathbf{x}_2 = 0 + 0 and A(cx)=cAx=c(0)A(c\mathbf{x}) = cA\mathbf{x} = c(0).

In the example:

[122213314415][x1x2x3]=[0000]\begin{bmatrix*}[c] 1 & 2 & 2 \\ 2 & 1 & 3 \\ 3 & 1 & 4 \\ 4 & 1 & 5 \end{bmatrix*} \begin{bmatrix} x_1 \\ x_2 \\ x_3\end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}

the nullspace N(A)N(A) consists of all multiples of [111]\begin{bmatrix} 1 \\ 1 \\ -1\end{bmatrix} ; column 11 plus column 22 minus column 33 equals the zero vector. This nullspace is a line in R3\R^3.

Other values of b\mathbf{b}

The solutions to the equation:

[122213314415][x1x2x3]=[1234]\begin{bmatrix*}[c] 1 & 2 & 2 \\ 2 & 1 & 3 \\ 3 & 1 & 4 \\ 4 & 1 & 5 \end{bmatrix*} \begin{bmatrix} x_1 \\ x_2 \\ x_3\end{bmatrix} = \begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \end{bmatrix}

do not form a subspace. The zero vector is not a solution to this equation. The set of solutions forms a line in R3\R^3 that passes through the points [100]\begin{bmatrix} 1 \\ 0 \\ 0\end{bmatrix} and [011]\begin{bmatrix*}[r] 0 \\ -1 \\ 1\end{bmatrix*} but not [000]\begin{bmatrix} 0 \\ 0 \\ 0\end{bmatrix}

Problems and Solutions(习题及答案)

Exercises on column space and nullspace

Problem 6.1: (3.1 #30. Introduction to Linear Algebra: Strang) Suppose S\mathbf{S} and T\mathbf{T} are two subspaces of a vector space V\mathbf{V}.

  • a) Definition: The sum S+T\mathbf{S} + \mathbf{T} contains all sums s+t\mathbf{s} + \mathbf{t} of a vector s\mathbf{s} in S\mathbf{S} and a vector t\mathbf{t} in T\mathbf{T}. Show that S+T\mathbf{S} + \mathbf{T} satisfies the requirements (addition and scalar multiplication) for a vector space.
  • b) If S\mathbf{S} and T\mathbf{T} are lines in Rm\mathbf{R}^m, what is the difference between S+T\mathbf{S} + \mathbf{T} and ST\mathbf{S} ∪ \mathbf{T}? That union contains all vectors from S\mathbf{S} and T\mathbf{T} or both. Explain this statement: The span of ST\mathbf{S} ∪ \mathbf{T} is S+T\mathbf{S} + \mathbf{T}.

Solution

a) Let s\mathbf{s}, s\mathbf{s}' be vectors in S\mathbf{S}, let t\mathbf{t}, t\mathbf{t}' be vectors in T\mathbf{T}, and let cc be a scalar. Then

(s+t)+(s+t)=(s+s)+(t+t)andc(s+t)=cs+ct.(\mathbf{s} + \mathbf{t}) + (\mathbf{s}' + \mathbf{t}') = (\mathbf{s} + \mathbf{s}') + (\mathbf{t} + \mathbf{t}') \enspace \text{and} \enspace c(\mathbf{s} + \mathbf{t}) = c\mathbf{s} + c\mathbf{t}.

Thus S+T\mathbf{S} + \mathbf{T} is closed under addition and scalar multiplication; in other words, it satisfies the two requirements for a vector space.

b) If S\mathbf{S} and T\mathbf{T} are distinct lines, then S+T\mathbf{S} + \mathbf{T} is a plane, whereas ST\mathbf{S} ∪ \mathbf{T} is only the two lines. The span of ST\mathbf{S} ∪ \mathbf{T} is the set of all combinations of vectors in this union of two lines. In particular, it contains all sums s+t\mathbf{s} + \mathbf{t} of a vector s\mathbf{s} in S\mathbf{S} and a vector t\mathbf{t} in T\mathbf{T}, and these sums form S+T\mathbf{S} + \mathbf{T}.

Since S+T\mathbf{S} + \mathbf{T} contains both S\mathbf{S} and T\mathbf{T}, it contains ST\mathbf{S} ∪ \mathbf{T}. Further, S+T\mathbf{S} + \mathbf{T} is a vector space. So it contains all combinations of vectors in itself; in particular, it contains the span of ST\mathbf{S} ∪ \mathbf{T}. Thus the span of ST\mathbf{S} ∪ \mathbf{T} is S+T\mathbf{S} + \mathbf{T}.

Problem 6.2: (3.2 #18.) The plane x3yz=12x − 3y − z = 12 is parallel to the plane x3yx=0x − 3y − x = 0. One particular point on this plane is (12,0,0)(12, 0, 0). All points on the plane have the form (fill in the first components)

[xyz]=[00]+y[10]+z[01].\begin{bmatrix} x \\ y \\ z\end{bmatrix} = \begin{bmatrix} \\ 0 \\ 0\end{bmatrix} + y\begin{bmatrix} \\ 1 \\ 0\end{bmatrix} + z\begin{bmatrix} \\ 0 \\ 1\end{bmatrix}.

Solution

The equation x=12+3y+zx = 12 + 3y + z says it all:

[xyz](=[12+3y+zyz])=[1200]+y[310]+z[101]\begin{bmatrix} x \\ y \\ z\end{bmatrix} \left( =\begin{bmatrix*}[r] 12 + 3y + z \\ y \\ z\end{bmatrix*} \right) = \begin{bmatrix*}[c] \boxed{12} \\ 0 \\ 0\end{bmatrix*} + y\begin{bmatrix*}[c] \boxed{3} \\ 1 \\ 0\end{bmatrix*} + z\begin{bmatrix*}[c] \boxed{1} \\ 0 \\ 1\end{bmatrix*}

Problem 6.3: (3.2 #36.) How is the nullspace N(C)\mathbf{N}(C) related to the spaces N(A)\mathbf{N}(A) and N(B)\mathbf{N}(B), if CC = [AB]\begin{bmatrix} A \\ B \end{bmatrix} ?

Solution

N(C)=N(A)N(B)\mathbf{N}(C) = \mathbf{N}(A) ∩ \mathbf{N}(B) contains all vectors that are in both nullspaces:

Cx=[AxBx]=0C\mathbf{x} = \begin{bmatrix} A\mathbf{x} \\ B\mathbf{x} \end{bmatrix} = 0

if and only if Ax=0A\mathbf{x} = 0 and Bx=0B\mathbf{x} = 0.