Linear Algebra · Undergraduate

Subspaces: Column Space and Null Space

Quick answer

A subspace of ℝⁿ is a set that contains the zero vector and is closed under addition and scalar multiplication: lines and planes through the origin, and every span. Each m × n matrix A has two. The column space Col A, the span of the columns, lives in ℝᵐ and holds every b for which Ax = b is solvable. The null space Nul A, the solutions of Ax = 0, lives in ℝⁿ. Row reduction gives a basis for both: the pivot columns of A for Col A, and the direction vectors of the parametric solution for Nul A.

What you'll learn

  • Decide whether a set of vectors is a subspace
  • Describe the column space and null space of a matrix
  • Find a basis for the null space from parametric vector form
  • Find a basis for the column space from the pivot columns

Sets that stay closed

The span of a set of vectors has a useful property: combining vectors inside it never leads outside it. Sets with that property are subspaces.

A subspace of ℝⁿ is a set HH of vectors in ℝⁿ such that

  1. the zero vector is in HH;
  2. if u\mathbf{u} and v\mathbf{v} are in HH, so is u+v\mathbf{u} + \mathbf{v};
  3. if u\mathbf{u} is in HH and cc is a scalar, cuc\mathbf{u} is in HH.

Lines and planes through the origin are subspaces; so is every span, and so are {0}\{\mathbf{0}\} and ℝⁿ itself. A line that misses the origin is not a subspace, and neither is the first quadrant of the plane, which contains (1,1)(1, 1) but not −1⋅(1,1)-1 \cdot (1, 1).

Every m×nm \times n matrix AA comes with two subspaces.

  • The column space Col A\text{Col}\,A is the span of the columns of AA. It sits in ℝᵐ, and it is exactly the set of b\mathbf{b} for which Ax=bA\mathbf{x} = \mathbf{b} has a solution.
  • The null space Nul A\text{Nul}\,A is the set of solutions of Ax=0A\mathbf{x} = \mathbf{0}. It sits in ℝⁿ.

Why the null space is a subspace

The zero vector solves Ax=0A\mathbf{x} = \mathbf{0}. If Au=0A\mathbf{u} = \mathbf{0} and Av=0A\mathbf{v} = \mathbf{0}, then

A(u+v)=Au+Av=0A(cu)=cAu=0A(\mathbf{u} + \mathbf{v}) = A\mathbf{u} + A\mathbf{v} = \mathbf{0} \qquad A(c\mathbf{u}) = cA\mathbf{u} = \mathbf{0}

so sums and multiples of solutions are solutions. Linearity of AA is exactly what keeps the solutions of Ax=0A\mathbf{x} = \mathbf{0} closed under both operations. The same argument fails for Ax=bA\mathbf{x} = \mathbf{b} with b≠0\mathbf{b} \ne \mathbf{0}. There, two solutions add to a solution of Ax=2bA\mathbf{x} = 2\mathbf{b}, and the zero vector is not a solution at all.

Bases for both spaces from one row reduction

A basis of a subspace is a linearly independent set that spans it: enough vectors to reach everything, with none to spare. One row reduction of AA produces a basis for each of its subspaces.

  • Null space. Write the solution of Ax=0A\mathbf{x} = \mathbf{0} in parametric vector form. The vectors multiplying the free variables form a basis.
  • Column space. The columns of AA that hold pivots form a basis. Take them from AA itself: row operations change the column space, but they keep every linear relation among the columns, so they show which columns to keep.

Worked examples

Common mistakes

Practice problems

  1. Is the set of vectors (x,y)(x, y) with x≥0x \ge 0 a subspace of ℝ²?

    Answer

    No

    Full solution

    It contains (1,0)(1, 0) but not −1⋅(1,0)=(−1,0)-1 \cdot (1, 0) = (-1, 0), so it is not closed under scalar multiplication.

  2. Is the set of vectors (x,y,z)(x, y, z) with x+y+z=0x + y + z = 0 a subspace of ℝ³?

    Answer

    Yes

    Full solution

    It is the null space of [111]\begin{bmatrix} 1 & 1 & 1 \end{bmatrix}, and every null space is a subspace.

  3. Find a basis for Nul[1326]\text{Nul}\begin{bmatrix} 1 & 3\\ 2 & 6 \end{bmatrix}.

    Answer

    {(−3,1)}\{(-3, 1)\}

    Full solution

    The reduced form is [1300]\begin{bmatrix} 1 & 3\\ 0 & 0 \end{bmatrix}, so x1=−3x2x_1 = -3x_2 with x2x_2 free.

  4. Find a basis for Nul[10201−1]\text{Nul}\begin{bmatrix} 1 & 0 & 2\\ 0 & 1 & -1 \end{bmatrix}.

    Answer

    {(−2,1,1)}\{(-2, 1, 1)\}

    Full solution

    The matrix is already reduced: x3x_3 is free, x1=−2x3x_1 = -2x_3 and x2=x3x_2 = x_3.

  5. For H=[112123213]H = \begin{bmatrix} 1 & 1 & 2\\ 1 & 2 & 3\\ 2 & 1 & 3 \end{bmatrix}, find a basis for Col H\text{Col}\,H.

    Answer

    {(1,1,2), (1,2,1)}\{(1, 1, 2),\ (1, 2, 1)\}

    Full solution

    Row reduction gives [101011000]\begin{bmatrix} 1 & 0 & 1\\ 0 & 1 & 1\\ 0 & 0 & 0 \end{bmatrix}, with pivots in columns 11 and 22. Take those columns of HH. The third column is their sum.

  6. Find a basis for Nul H\text{Nul}\,H for the same matrix.

    Answer

    {(−1,−1,1)}\{(-1, -1, 1)\}

    Full solution

    From the reduced form, x3x_3 is free, x1=−x3x_1 = -x_3 and x2=−x3x_2 = -x_3.

  7. A 4×74 \times 7 matrix AA is given. Is Nul A\text{Nul}\,A a subspace of ℝ⁴ or of ℝ⁷?

    Answer

    ℝ⁷

    Full solution

    Solutions of Ax=0A\mathbf{x} = \mathbf{0} need 77 entries, one per column.

  8. If Ax=bA\mathbf{x} = \mathbf{b} has no solution, what does that say about b\mathbf{b} and Col A\text{Col}\,A?

    Answer

    b\mathbf{b} is not in Col A\text{Col}\,A.

    Full solution

    AxA\mathbf{x} is always a combination of the columns, so a solution exists exactly when b\mathbf{b} is one of those combinations.

  9. For an invertible n×nn \times n matrix, what are Col A\text{Col}\,A and Nul A\text{Nul}\,A?

    Answer

    Col A=\text{Col}\,A = ℝⁿ and Nul A={0}\text{Nul}\,A = \{\mathbf{0}\}

    Full solution

    By the Invertible Matrix Theorem the columns span ℝⁿ and Ax=0A\mathbf{x} = \mathbf{0} has only the trivial solution.

  10. A student reduces BB from Example 2 and reports {(1,0,0), (0,1,0)}\{(1, 0, 0),\ (0, 1, 0)\} as a basis for Col B\text{Col}\,B, the pivot columns of the reduced matrix. What went wrong?

    Hint

    Is (1,0,0)(1, 0, 0) a combination of the columns of BB?

    Answer

    The basis must come from BB itself: {(1,2,3), (0,1,1)}\{(1, 2, 3),\ (0, 1, 1)\}.

    Full solution

    Every column of BB has third entry equal to the sum of its first two entries, so every vector in Col B\text{Col}\,B does too. (1,0,0)(1, 0, 0) breaks that pattern and is not in Col B\text{Col}\,B at all. Row operations change the column space; they only preserve the relations among columns.

Frequently asked questions

What is a subspace?

A set of vectors in ℝⁿ that contains the zero vector and is closed under addition and scalar multiplication. Lines and planes through the origin are examples.

What is the column space of a matrix?

The span of its columns, written Col A. It is exactly the set of vectors b for which Ax = b has a solution.

What is the null space of a matrix?

The set of all solutions of Ax = 0, written Nul A. For an m × n matrix it is a subspace of ℝⁿ.

How do you find a basis for the column space?

Row reduce A to find the pivot columns, then take the corresponding columns of the original matrix A, not of its reduced form.

How do you find a basis for the null space?

Solve Ax = 0 in parametric vector form. The vectors multiplying the free variables form a basis.

What to learn next