1. Home
  2. Explore
  3. Mathematics
  4. Column and Null Spaces of Matrices

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Column and Null Spaces of Matrices

Column Space, Null Space, and Basis for a Matrix

Column Space of a Matrix

The column space of a matrix AAA (denoted Col(A)\text{Col}(A)Col(A)) is the span of its column vectors. It is the set of all linear combinations of the columns.

For the matrix AAA with column vectors:

  • v1=(123)\mathbf{v}_1 = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}v1​=​123​​

  • v2=(114)\mathbf{v}_2 = \begin{pmatrix} 1 \\ 1 \\ 4 \end{pmatrix}v2​=​114​​

  • v3=(141)\mathbf{v}_3 = \begin{pmatrix} 1 \\ 4 \\ 1 \end{pmatrix}v3​=​141​​

  • v4=(132)\mathbf{v}_4 = \begin{pmatrix} 1 \\ 3 \\ 2 \end{pmatrix}v4​=​132​​

the column space is:

Col(A)=span{(123),(114),(141),(132)}\text{Col}(A) = \text{span}\left\{ \begin{pmatrix}1\\2\\3\end{pmatrix}, \begin{pmatrix}1\\1\\4\end{pmatrix}, \begin{pmatrix}1\\4\\1\end{pmatrix}, \begin{pmatrix}1\\3\\2\end{pmatrix} \right\}Col(A)=span⎩⎨⎧​​123​​,​114​​,​141​​,​132​​⎭⎬⎫​

This is a subspace of R3\mathbb{R}^3R3 (since each column has 3 entries). The column space is straightforward to write but may not yet be in its simplest form — some vectors may be redundant.

Null Space of a Matrix

The null space of AAA (denoted Nul(A)\text{Nul}(A)Nul(A)) is the set of all vectors x\mathbf{x}x such that Ax=0A\mathbf{x} = \mathbf{0}Ax=0. For an m×nm \times nm×n matrix, the null space is a subspace of Rn\mathbb{R}^nRn.

Computing the Null Space via Reduced Row Echelon Form

Since row operations do not change the solution set of Ax=0A\mathbf{x} = \mathbf{0}Ax=0, the null space of AAA is equal to the null space of its reduced row echelon form (rref(A)\text{rref}(A)rref(A)):

Nul(A)=Nul(rref(A))\text{Nul}(A) = \text{Nul}(\text{rref}(A))Nul(A)=Nul(rref(A))

Steps to Find RREF

Given AAA with columns as above, row operations produce:

  1. Keep row 1: [1,1,1,1][1, 1, 1, 1][1,1,1,1]

  2. Replace row 2 with 2×row1−row22 \times \text{row1} - \text{row2}2×row1−row2 → [0,1,−2,−1][0, 1, -2, -1][0,1,−2,−1]

  3. Replace row 3 with row3−3×row1\text{row3} - 3 \times \text{row1}row3−3×row1 → [0,1,−2,−1][0, 1, -2, -1][0,1,−2,−1]

  4. Further operations eliminate the second row’s influence on the first row and zero out the third row:

    • New row 1: row1 − row2 → [1,0,3,2][1, 0, 3, 2][1,0,3,2]

    • New row 3: row3 − row2 → [0,0,0,0][0, 0, 0, 0][0,0,0,0]

The final reduced row echelon form of AAA is:

rref(A)=(103201−2−10000)\text{rref}(A) = \begin{pmatrix} 1 & 0 & 3 & 2 \\ 0 & 1 & -2 & -1 \\ 0 & 0 & 0 & 0 \end{pmatrix}rref(A)=​100​010​3−20​2−10​​

Identifying Pivot and Free Variables

In RREF:

  • Pivot columns contain leading 1’s (columns 1 and 2). The variables x1x_1x1​ and x2x_2x2​ are pivot variables.

  • Non-pivot columns (columns 3 and 4) correspond to free variables x3x_3x3​ and x4x_4x4​.

Pivot variables are determined by the free variables; they can take any value.

Solving for the Null Space

From rref(A)\text{rref}(A)rref(A):

  • x1+3x3+2x4=0x_1 + 3x_3 + 2x_4 = 0x1​+3x3​+2x4​=0 ⇒ x1=−3x3−2x4x_1 = -3x_3 - 2x_4x1​=−3x3​−2x4​

  • x2−2x3−x4=0x_2 - 2x_3 - x_4 = 0x2​−2x3​−x4​=0 ⇒ x2=2x3+x4x_2 = 2x_3 + x_4x2​=2x3​+x4​

Thus any solution can be written as:

(x1x2x3x4)=x3(−3210)+x4(−2101)\begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{pmatrix} = x_3 \begin{pmatrix} -3 \\ 2 \\ 1 \\ 0 \end{pmatrix} + x_4 \begin{pmatrix} -2 \\ 1 \\ 0 \\ 1 \end{pmatrix}​x1​x2​x3​x4​​​=x3​​−3210​​+x4​​−2101​​

where x3,x4∈Rx_3, x_4 \in \mathbb{R}x3​,x4​∈R.

The null space is the span of these two vectors:

Nul(A)=span{(−3210),(−2101)}\text{Nul}(A) = \text{span}\left\{ \begin{pmatrix} -3 \\ 2 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} -2 \\ 1 \\ 0 \\ 1 \end{pmatrix} \right\}Nul(A)=span⎩⎨⎧​​−3210​​,​−2101​​⎭⎬⎫​

This shows that Nul(A)\text{Nul}(A)Nul(A) contains more than just the zero vector; it is a 2‑dimensional subspace of R4\mathbb{R}^4R4.

Linear Independence and the Null Space

The columns of AAA are linearly independent if and only if the only solution to Ax=0A\mathbf{x} = \mathbf{0}Ax=0 is the zero vector — that is, if Nul(A)={0}\text{Nul}(A) = \{\mathbf{0}\}Nul(A)={0}.

Conversely, if Nul(A)\text{Nul}(A)Nul(A) contains non‑zero vectors, the columns are linearly dependent.

Since Nul(A)\text{Nul}(A)Nul(A) here contains infinitely many vectors (including the zero vector), the four column vectors are linearly dependent. Therefore the original set of columns is not a basis for the column space (a basis requires both spanning and linear independence).

Basis for the Column Space

A basis for a subspace is a set of vectors that:

  • Span the subspace

  • Are linearly independent

Removing Redundant Vectors

The free variables x3x_3x3​ and x4x_4x4​ indicate which columns are redundant. Using the null space solutions:

Express v4\mathbf{v}_4v4​ in terms of v1\mathbf{v}_1v1​ and v2\mathbf{v}_2v2​:

  • Set x3=0x_3 = 0x3​=0 and x4=−1x_4 = -1x4​=−1.

  • Then x1=−3(0)−2(−1)=2x_1 = -3(0) - 2(-1) = 2x1​=−3(0)−2(−1)=2, x2=2(0)+(−1)=−1x_2 = 2(0) + (-1) = -1x2​=2(0)+(−1)=−1.

  • This gives 2v1−v2=v42\mathbf{v}_1 - \mathbf{v}_2 = \mathbf{v}_42v1​−v2​=v4​ (verify: 2(1,2,3)−(1,1,4)=(1,3,2)=v42(1,2,3) - (1,1,4) = (1,3,2) = \mathbf{v}_42(1,2,3)−(1,1,4)=(1,3,2)=v4​).

Express v3\mathbf{v}_3v3​ in terms of v1\mathbf{v}_1v1​ and v2\mathbf{v}_2v2​:

  • Set x4=0x_4 = 0x4​=0 and x3=−1x_3 = -1x3​=−1.

  • Then x1=−3(−1)−2(0)=3x_1 = -3(-1) - 2(0) = 3x1​=−3(−1)−2(0)=3, x2=2(−1)+0=−2x_2 = 2(-1) + 0 = -2x2​=2(−1)+0=−2.

  • This gives 3v1−2v2=v33\mathbf{v}_1 - 2\mathbf{v}_2 = \mathbf{v}_33v1​−2v2​=v3​ (verify: 3(1,2,3)−2(1,1,4)=(1,4,1)=v33(1,2,3) - 2(1,1,4) = (1,4,1) = \mathbf{v}_33(1,2,3)−2(1,1,4)=(1,4,1)=v3​).

Thus v3\mathbf{v}_3v3​ and v4\mathbf{v}_4v4​ are linear combinations of v1\mathbf{v}_1v1​ and v2\mathbf{v}_2v2​, so they do not add new directions. The column space can be simplified:

Col(A)=span{(123),(114)}\text{Col}(A) = \text{span}\left\{ \begin{pmatrix}1\\2\\3\end{pmatrix}, \begin{pmatrix}1\\1\\4\end{pmatrix} \right\}Col(A)=span⎩⎨⎧​​123​​,​114​​⎭⎬⎫​

Checking Linear Independence of v1\mathbf{v}_1v1​ and v2\mathbf{v}_2v2​

Are these two vectors linearly independent? If one were a scalar multiple of the other, we would need a ccc such that (1,2,3)=c(1,1,4)(1,2,3) = c(1,1,4)(1,2,3)=c(1,1,4). This would require c=1c=1c=1 from the first entry, c=2c=2c=2 from the second — a contradiction. Hence no scalar multiple works; they are linearly independent.

Therefore the set {(123),(114)}\left\{ \begin{pmatrix}1\\2\\3\end{pmatrix}, \begin{pmatrix}1\\1\\4\end{pmatrix} \right\}⎩⎨⎧​​123​​,​114​​⎭⎬⎫​ is a basis for the column space of AAA.

Summary of Key Results

  • Column space: Col(A)=span{v1,v2}\text{Col}(A) = \text{span}\{\mathbf{v}_1, \mathbf{v}_2\}Col(A)=span{v1​,v2​} (a plane in R3\mathbb{R}^3R3).

  • Null space: Nul(A)=span{(−3,2,1,0),(−2,1,0,1)}\text{Nul}(A) = \text{span}\{(-3,2,1,0), (-2,1,0,1)\}Nul(A)=span{(−3,2,1,0),(−2,1,0,1)} (a 2‑dimensional subspace of R4\mathbb{R}^4R4).

  • The original four columns are linearly dependent; v3\mathbf{v}_3v3​ and v4\mathbf{v}_4v4​ are redundant.

  • The basis vectors v1\mathbf{v}_1v1​ and v2\mathbf{v}_2v2​ are both spanning and linearly independent.

Why This Matters

Understanding the column space and null space reveals the structure of a matrix. The rank of AAA (dimension of the column space) is 2, and the nullity (dimension of the null space) is 2, satisfying the rank‑nullity theorem: rank(A)+nullity(A)=number of columns\text{rank}(A) + \text{nullity}(A) = \text{number of columns}rank(A)+nullity(A)=number of columns.

In the next step, these two basis vectors can be visualized as spanning a plane in R3\mathbb{R}^3R3, giving geometric insight into the linear transformation defined by AAA.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent