Tutorials › Linear Algebra › The Column Space of a Matrix

Span and the Column Space View · Tutorial 138 of 1000

The Column Space of a Matrix

Learn to describe the column space of a matrix by writing out every possible linear combination of its columns.

Beginner 9 min read

What You'll Learn

  • Define the column space using the columns of a matrix.
  • Write a general column combination with scalar coefficients.
  • Read the dimension and form of column vectors from the matrix shape.
  • Check a computed column combination by multiplying the matrix by its coefficient vector.
  • Prove that the column space is the smallest subspace containing the columns.
  • Avoid confusing a matrix’s columns with its rows.

From a Matrix to a Set of Vectors

A matrix is more than a rectangular array of numbers: its columns are vectors, and their linear combinations form a set of vectors. That set is called the column space. Describing it means specifying exactly which combinations of the columns are being considered, including the possibility that every coefficient is zero. The matrix shape tells us where those combinations live: an \(m\times n\) matrix has \(n\) columns, each in \(\mathbb{R}^m\).

Throughout, let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), where \(m,n\in\mathbb{N}\), and write its columns as \(\mathbf{a}_1,\dots,\mathbf{a}_n\). A linear combination of these columns has the form \(c_1\mathbf{a}_1+\cdots+c_n\mathbf{a}_n\), with real coefficients \(c_1,\dots,c_n\). The coefficients may be chosen independently: each can be any real number.

Definition: The column space of \(\mathbf{A}\), written \(\operatorname{Col}\mathbf{A}\), is the span of its columns: \[ \operatorname{Col}\mathbf{A}=\operatorname{span}\{\mathbf{a}_1,\dots,\mathbf{a}_n\} =\{c_1\mathbf{a}_1+\cdots+c_n\mathbf{a}_n:c_1,\dots,c_n\in\mathbb{R}\}. \] It is a set of vectors in \(\mathbb{R}^m\).

The set notation is a direct description of all its vectors: choose any real coefficients, form the indicated combination, and the result belongs to the column space. Choosing every coefficient to be zero gives \(\mathbf{0}\), so the zero vector is always included. Choosing one coefficient to be \(1\) and all the others to be \(0\) gives the corresponding column, so every column is included as well.

The column space is a set, not an ordered list of columns. Its vectors are the possible outputs of combinations, and the same vector can arise from different choices of coefficients. The definition does not require the columns to be distinct or to contribute separate, non-redundant directions. In particular, if some column is itself a combination of other columns, it still belongs in the defining list of generators; it simply does not add new vectors to the set they generate.

Writing the Combinations Explicitly

Worked Example: A Column Space in R²

Let \(\mathbf{A}=\begin{bmatrix}1&-1\\2&1\end{bmatrix}\). Its columns are \(\mathbf{a}_1=\begin{bmatrix}1\\2\end{bmatrix}\) and \(\mathbf{a}_2=\begin{bmatrix}-1\\1\end{bmatrix}\). Write a general vector in \(\operatorname{Col}\mathbf{A}\), then calculate one particular column combination.

By definition, every vector in the column space has the form \(s\mathbf{a}_1+t\mathbf{a}_2\), where \(s,t\in\mathbb{R}\). Computing each coordinate gives

$$ s\begin{bmatrix}1\\2\end{bmatrix} +t\begin{bmatrix}-1\\1\end{bmatrix} = \begin{bmatrix}s\\2s\end{bmatrix} +\begin{bmatrix}-t\\t\end{bmatrix} = \begin{bmatrix}s-t\\2s+t\end{bmatrix}. $$

Thus an explicit parameter description is \(\operatorname{Col}\mathbf{A}=\left\{\begin{bmatrix}s-t\\2s+t\end{bmatrix}:s,t\in\mathbb{R}\right\}\). For example, take \(s=2\) and \(t=-1\). The column combination is \(2\mathbf{a}_1-\mathbf{a}_2\), and

$$ 2\begin{bmatrix}1\\2\end{bmatrix} -\begin{bmatrix}-1\\1\end{bmatrix} = \begin{bmatrix}2\\4\end{bmatrix} +\begin{bmatrix}1\\-1\end{bmatrix} = \begin{bmatrix}3\\3\end{bmatrix}. $$

Check: the coefficient vector is \(\mathbf{x}=\begin{bmatrix}2\\-1\end{bmatrix}\). Multiplying gives \(\mathbf{A}\mathbf{x}=\begin{bmatrix}1&-1\\2&1\end{bmatrix}\begin{bmatrix}2\\-1\end{bmatrix}=\begin{bmatrix}2+1\\4-1\end{bmatrix}=\begin{bmatrix}3\\3\end{bmatrix}\), agreeing with the column combination.

In this calculation, the entries of the coefficient vector tell us how much of each column to use. This is the column form of the matrix-vector product: if \(\mathbf{x}=\begin{bmatrix}c_1\\\vdots\\c_n\end{bmatrix}\), then multiplying \(\mathbf{A}\mathbf{x}\) produces \(c_1\mathbf{a}_1+\cdots+c_n\mathbf{a}_n\). This notation is useful for recording a chosen combination, but the definition of the column space remains the set of all such combinations.

Worked Example: A Column Space in R³

Let \(\mathbf{B}=\begin{bmatrix}1&0\\0&1\\2&-1\end{bmatrix}\), with columns \(\mathbf{b}_1=\begin{bmatrix}1\\0\\2\end{bmatrix}\) and \(\mathbf{b}_2=\begin{bmatrix}0\\1\\-1\end{bmatrix}\). Describe its column space by coordinates and compute one vector in it.

A general combination uses two real numbers \(s,t\):

$$ s\mathbf{b}_1+t\mathbf{b}_2 = s\begin{bmatrix}1\\0\\2\end{bmatrix} +t\begin{bmatrix}0\\1\\-1\end{bmatrix} = \begin{bmatrix}s\\0\\2s\end{bmatrix} +\begin{bmatrix}0\\t\\-t\end{bmatrix} = \begin{bmatrix}s\\t\\2s-t\end{bmatrix}. $$

Therefore \(\operatorname{Col}\mathbf{B}=\left\{\begin{bmatrix}s\\t\\2s-t\end{bmatrix}:s,t\in\mathbb{R}\right\}\). Notice that these vectors have three coordinates, even though there are only two columns: the number of rows determines the coordinate space. To check a particular combination, choose \(s=-1\) and \(t=3\). Then

$$ -\mathbf{b}_1+3\mathbf{b}_2 = -\begin{bmatrix}1\\0\\2\end{bmatrix} +3\begin{bmatrix}0\\1\\-1\end{bmatrix} = \begin{bmatrix}-1\\0\\-2\end{bmatrix} +\begin{bmatrix}0\\3\\-3\end{bmatrix} = \begin{bmatrix}-1\\3\\-5\end{bmatrix}. $$

Check: with \(\mathbf{x}=\begin{bmatrix}-1\\3\end{bmatrix}\), direct multiplication gives \(\mathbf{B}\mathbf{x}=\begin{bmatrix}-1\\3\\2(-1)-3\end{bmatrix}=\begin{bmatrix}-1\\3\\-5\end{bmatrix}\). The result matches the combination computed from the columns.

The Column Space Is a Subspace

A subspace of \(\mathbb{R}^m\) is a subset that contains \(\mathbf{0}\) and is closed under addition and scalar multiplication. Closure means that adding two vectors in the subset, or multiplying one of them by a real scalar, still gives a vector in that subset. The column space has these properties because adding combinations or scaling a combination simply changes its coefficients.

Theorem: For every \(\mathbf{A}\in\mathbb{R}^{m\times n}\), the set \(\operatorname{Col}\mathbf{A}\) is a subspace of \(\mathbb{R}^m\).

Proof. Write the columns of \(\mathbf{A}\) as \(\mathbf{a}_1,\dots,\mathbf{a}_n\). Taking all coefficients to be zero shows \(\mathbf{0}=0\mathbf{a}_1+\cdots+0\mathbf{a}_n\in\operatorname{Col}\mathbf{A}\). Now let \(\mathbf{u},\mathbf{v}\in\operatorname{Col}\mathbf{A}\). By the definition of column space, there are real coefficients \(c_1,\dots,c_n\) and \(d_1,\dots,d_n\) such that \(\mathbf{u}=\sum_{j=1}^{n}c_j\mathbf{a}_j\) and \(\mathbf{v}=\sum_{j=1}^{n}d_j\mathbf{a}_j\). Their sum is \(\mathbf{u}+\mathbf{v}=\sum_{j=1}^{n}(c_j+d_j)\mathbf{a}_j\), which is another combination of the columns, so it belongs to \(\operatorname{Col}\mathbf{A}\). For any \(r\in\mathbb{R}\), \(r\mathbf{u}=\sum_{j=1}^{n}(rc_j)\mathbf{a}_j\), also a combination of the columns. Thus the set contains zero and is closed under addition and scalar multiplication, as required. \(\square\)

This proof explains why the coefficients in a general description are allowed to range over all real numbers. The set must remain closed when a combination is scaled or added to another combination; the resulting coefficients are still real numbers. For example, in the previous example, adding the vectors produced by \((s,t)=(-1,3)\) and \((s,t)=(2,1)\) gives the vector produced by \((s,t)=(1,4)\), since \((-1,3)+(2,1)=(1,4)\).

It Is the Smallest Subspace Containing the Columns

There is another useful way to understand the definition. The column space contains each column, and every vector in it is formed by combining those columns. In fact, no subspace that contains all the columns can be smaller than the column space: closure under linear combinations forces it to contain every vector in \(\operatorname{Col}\mathbf{A}\).

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and let \(U\) be a subspace of \(\mathbb{R}^m\) containing every column of \(\mathbf{A}\). Then \(\operatorname{Col}\mathbf{A}\subseteq U\). Since \(\operatorname{Col}\mathbf{A}\) is itself a subspace containing every column, it is the smallest subspace of \(\mathbb{R}^m\) with that property.

Proof. Let \(\mathbf{y}\in\operatorname{Col}\mathbf{A}\). By the definition of column space, there are real numbers \(c_1,\dots,c_n\) such that \(\mathbf{y}=c_1\mathbf{a}_1+\cdots+c_n\mathbf{a}_n\). Each \(\mathbf{a}_j\) belongs to \(U\) by assumption. Because \(U\) is a subspace, it is closed under scalar multiplication, so each \(c_j\mathbf{a}_j\) belongs to \(U\); it is also closed under addition, so their sum \(\mathbf{y}\) belongs to \(U\). This proves \(\operatorname{Col}\mathbf{A}\subseteq U\). The preceding theorem shows that \(\operatorname{Col}\mathbf{A}\) is a subspace, and its definition includes each column (choose that column’s coefficient to be \(1\) and all others to be \(0\)). Thus it is itself one of the subspaces under consideration, and it is contained in every such subspace. \(\square\)

The phrase “smallest subspace” refers to containment of sets: it does not mean that the column space must have fewer vectors than some other set. Rather, it is contained in every subspace that includes all the columns. This fact is a direct consequence of what subspace closure requires, not a separate method for computing the column space.

Worked Example: A Column That Is Already a Combination

Let \(\mathbf{C}=\begin{bmatrix}1&0&1\\1&1&2\\0&1&1\end{bmatrix}\), with columns \(\mathbf{c}_1=\begin{bmatrix}1\\1\\0\end{bmatrix}\), \(\mathbf{c}_2=\begin{bmatrix}0\\1\\1\end{bmatrix}\), and \(\mathbf{c}_3=\begin{bmatrix}1\\2\\1\end{bmatrix}\). Write a general combination and calculate one example.

The general combination is

$$ s\mathbf{c}_1+t\mathbf{c}_2+u\mathbf{c}_3 = \begin{bmatrix}s+u\\s+t+2u\\t+u\end{bmatrix}, \qquad s,t,u\in\mathbb{R}. $$

Here the third column is itself the sum of the first two: \(\mathbf{c}_1+\mathbf{c}_2=\begin{bmatrix}1+0\\1+1\\0+1\end{bmatrix}=\begin{bmatrix}1\\2\\1\end{bmatrix}=\mathbf{c}_3\). Consequently the same vector \(\mathbf{c}_3\) can be written as \(0\mathbf{c}_1+0\mathbf{c}_2+1\mathbf{c}_3\) or as \(1\mathbf{c}_1+1\mathbf{c}_2+0\mathbf{c}_3\). A column space is a set of resulting vectors, so it does not record a unique coefficient choice.

For a further check, choose \(s=2\), \(t=-1\), and \(u=3\). Then

$$ 2\mathbf{c}_1-\mathbf{c}_2+3\mathbf{c}_3 = \begin{bmatrix}2\\2\\0\end{bmatrix} +\begin{bmatrix}0\\-1\\-1\end{bmatrix} +\begin{bmatrix}3\\6\\3\end{bmatrix} = \begin{bmatrix}5\\7\\2\end{bmatrix}. $$

Check: multiplying by the coefficient vector gives \(\mathbf{C}\begin{bmatrix}2\\-1\\3\end{bmatrix}=\begin{bmatrix}2+0+3\\2-1+6\\0-1+3\end{bmatrix}=\begin{bmatrix}5\\7\\2\end{bmatrix}\), the same result.

Common Pitfall: Using Rows Instead of Columns

The columns of an \(m\times n\) matrix belong to \(\mathbb{R}^m\), so their combinations belong to \(\mathbb{R}^m\) too. The rows, by contrast, are vectors with \(n\) entries. Confusing these can change both the vectors used and the ambient space.

For example, take \(\mathbf{D}=\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}\). A mistaken calculation might use its rows \((1,0,1)\) and \((0,1,1)\) as generators and conclude that its column space consists of combinations in \(\mathbb{R}^3\). That is wrong: \(\mathbf{D}\) has two rows, so each of its three columns is in \(\mathbb{R}^2\). The correct columns are \(\begin{bmatrix}1\\0\end{bmatrix}\), \(\begin{bmatrix}0\\1\end{bmatrix}\), and \(\begin{bmatrix}1\\1\end{bmatrix}\), and the general column combination is \(s\begin{bmatrix}1\\0\end{bmatrix}+t\begin{bmatrix}0\\1\end{bmatrix}+u\begin{bmatrix}1\\1\end{bmatrix}=\begin{bmatrix}s+u\\t+u\end{bmatrix}\). The correction is to read down the columns and check that the resulting vectors have the number of entries given by the row count.

The column-space viewpoint gives a compact description of all combinations generated by a matrix’s columns. It also connects naturally to the matrix-vector product: a chosen coefficient vector specifies one combination, while the column space collects the results for every possible choice. Keeping the columns and their ambient space clear makes that description precise.

Check Your Understanding

Use the definition to write each column space as a set of coordinate vectors, and check any particular combination by multiplication.

  1. For \(\mathbf{A}=\begin{bmatrix}2&1\\-1&3\end{bmatrix}\), write a general vector in \(\operatorname{Col}\mathbf{A}\) using two real parameters.
  2. For \(\mathbf{B}=\begin{bmatrix}1\\-2\\4\end{bmatrix}\), write every vector in \(\operatorname{Col}\mathbf{B}\) using one real parameter.
  3. If \(\mathbf{C}=\begin{bmatrix}1&2\\0&1\\-1&0\end{bmatrix}\), what coordinate space contains \(\operatorname{Col}\mathbf{C}\), and how many columns generate it?
  4. Prove directly from the definition that every column of a matrix belongs to its column space.
  5. For a matrix with columns \(\mathbf{a}_1,\dots,\mathbf{a}_n\), explain why every subspace containing all these columns must contain every vector in \(\operatorname{Col}\mathbf{A}\).

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon