Lab 10: Column Space

due by the end of class on Wednesday, November 4, 2026

Each lab worksheet will contain several activities, most of which will involve writing math on paper, and some of which will involve running code in a Jupyter Notebook. Lab activities are meant to last an hour, and the second hour of lab is dedicated to starting the homework assignment. To receive credit for a lab, you must show your lab TA your work on both the lab worksheet and homework assignment.

While you must get checked off by your lab TA individually, we encourage you to form groups with 1-2 other students to complete the activities together.


Activities


Activity 1: Column space basics

a)

Fill in the blank: The column space of a matrix \(A\), written \(\operatorname{colsp}(A)\), is the set of all s of \(A\)’s .

Solution

The column space of \(A\) is the set of all linear combinations of \(A\)’s columns. The three blanks are linear, combination, and columns.

b)

Let \(P\) be the plane

$$ 5x-y+3z=0. $$

Which of the following matrices have a column space equal to \(P\)? \(\boxed{\text{Circle}}\) all that apply.

$$ A=\begin{bmatrix}1&5&0\\0&3&1\end{bmatrix},\quad B=\begin{bmatrix}1&0\\5&3\\0&1\end{bmatrix},\quad C=\begin{bmatrix}1&0&1\\5&3&8\\0&1&1\end{bmatrix},\quad D=\begin{bmatrix}1&2&-1\\5&10&-5\\0&0&0\end{bmatrix},\quad E=\begin{bmatrix}1&0\\5&1\\0&0\end{bmatrix}. $$
Solution

Circle \(B\) and \(C\).

  • \(A\): No. Its columns have two entries, so its column space is a subset of \(\mathbb{R}^2\). It cannot be the plane \(P\) in \(\mathbb{R}^3\).

  • \(B\): Yes. Multiplying by an arbitrary input gives

$$ B\begin{bmatrix}a\\b\end{bmatrix} =\begin{bmatrix}a\\5a+3b\\b\end{bmatrix}. $$

These outputs satisfy \(5x-y+3z=0\). Conversely, any vector on the plane has \(y=5x+3z\), so we can produce it using the input \(\begin{bmatrix}x\\z\end{bmatrix}\). Thus the set of possible outputs is exactly \(P\).

  • \(C\): Yes. The new column is on \(P\), so its inclusion does not expand \(\operatorname{colsp}(B)\) beyond the vectors that were already in \(\operatorname{colsp}(B)\). Thus \(\operatorname{colsp}(C)=\operatorname{colsp}(B)=P\).

  • \(D\): No. Every column is a multiple of \(\begin{bmatrix}1\\5\\0\end{bmatrix}\), so its column space is only a line. For instance, \(\begin{bmatrix}0\\3\\1\end{bmatrix}\) is on \(P\) but cannot be produced by \(D\), since every output of \(D\) has third entry zero.

  • \(E\): No. Its second column, \(\begin{bmatrix}0\\1\\0\end{bmatrix}\), is a possible output of \(E\), but it is not on \(P\): \(5(0)-1+3(0)=-1\ne0\). Having one column on the plane is not enough.


Activity 2: Two independent directions

Consider the matrix

$$ A=\begin{bmatrix}1&2&0&-1\\0&0&1&3\\0&0&0&0\\0&0&0&0\end{bmatrix}. $$
a)

Fill in the blank: \(\operatorname{colsp}(A)\) is a in \(\mathbb{R}^{\boxed{\phantom{4}}}\).

Solution

A plane in \(\mathbb{R}^4\). For an arbitrary input,

$$ A\begin{bmatrix}a\\b\\c\\d\end{bmatrix} =\begin{bmatrix}a+2b-d\\c+3d\\0\\0\end{bmatrix} =(a+2b-d)\begin{bmatrix}1\\0\\0\\0\end{bmatrix} +(c+3d)\begin{bmatrix}0\\1\\0\\0\end{bmatrix}. $$

Every output has last two entries zero. Setting \(b=d=0\) lets us choose the first two entries freely through \(a\) and \(c\). Thus the possible outputs form a plane in \(\mathbb{R}^4\).

b)

Find two vectors \(\vec u\) and \(\vec v\) such that

  1. 1.

    \(\vec u\) and \(\vec v\) are linearly independent.

  2. 2.

    \(\operatorname{span}(\vec u,\vec v)=\operatorname{colsp}(A)\).

As we will see tomorrow, your \(\vec u\) and \(\vec v\) are a basis for \(\operatorname{colsp}(A)\).

Solution

Choose the first and third columns:

$$ \boxed{\vec u=\begin{bmatrix}1\\0\\0\\0\end{bmatrix},\qquad \vec v=\begin{bmatrix}0\\1\\0\\0\end{bmatrix}.} $$

Neither vector is a scalar multiple of the other, so they are linearly independent.

Column 2 is \(2\vec u\), and column 4 is \(-\vec u+3\vec v\). These are redundant columns, so removing them does not change the column space. Thus \(\operatorname{span}(\vec u,\vec v)=\operatorname{colsp}(A)\).

c)

Find two different \(4\times2\) matrices whose column space is equal to \(\operatorname{colsp}(A)\).

Solution

One possible pair is

$$ \boxed{A_1=\begin{bmatrix}1&0\\0&1\\0&0\\0&0\end{bmatrix},\qquad A_2=\begin{bmatrix}1&1\\0&1\\0&0\\0&0\end{bmatrix}.} $$

The columns of \(A_1\) are \(\vec u,\vec v\) from part (b), and those of \(A_2\) are \(\vec u,\vec u+\vec v\). Both pairs span the same plane, since \(\vec v=(\vec u+\vec v)-\vec u\).


Activity 3: Columns and invertibility

Definition: Linearly independent. The collection of vectors \(\vec v_1,\vec v_2,\ldots,\vec v_d\) is linearly independent when none of the vectors in the collection can be written as a linear combination of the other vectors in the collection.

Fact: A square matrix is invertible if and only if its columns are linearly independent.

a)

For each matrix, determine whether or not it is invertible.

$$ A=\begin{bmatrix}1&0&1\\0&1&1\\1&1&2\end{bmatrix},\qquad B=\begin{bmatrix}1&2&0\\0&1&3\\0&0&2\end{bmatrix},\qquad C=\begin{bmatrix}1&0&0\\2&0&1\\0&0&1\end{bmatrix}. $$
Solution
  • \(A\) is not invertible. Its third column is the sum of its first two columns. This redundancy means that different inputs can give the same output. For instance,
$$ A\begin{bmatrix}1\\1\\0\end{bmatrix} =\begin{bmatrix}1\\1\\2\end{bmatrix} =A\begin{bmatrix}0\\0\\1\end{bmatrix}. $$

We cannot uniquely recover the input from the output.

  • \(B\) is invertible. It is already upper triangular, with nonzero diagonal entries. For any proposed output \(\begin{bmatrix}b_1\\b_2\\b_3\end{bmatrix}\), the input must satisfy
$$ 2x_3=b_3,\qquad x_2+3x_3=b_2,\qquad x_1+2x_2=b_1. $$

Solve from the bottom row upward: first \(x_3\) is determined, then \(x_2\), then \(x_1\). Every output has exactly one input, so \(B\) is invertible.

  • \(C\) is not invertible. Its second column is \(\vec0\), which is a linear combination of the other columns with both coefficients zero. Changing the second entry of an input does not change the output, so the input cannot be recovered uniquely.
b)

For which real values of \(t\) is \(D\) invertible?

$$ D=\begin{bmatrix}2&0&0&0\\0&-1&0&0\\0&0&3&0\\0&0&0&t\end{bmatrix}. $$
Solution

\(\boxed{t\ne0}\). When \(t\ne0\), the matrix multiplies each input coordinate by a nonzero number. We can undo this by dividing the four output coordinates by \(2,-1,3,t\), respectively.

When \(t=0\), the fourth column is \(\vec0\). Changing the fourth input coordinate does not change the output, so the matrix is not invertible.


Activity 4: Subspaces

A subspace generalizes a line or plane through the origin: it is a set of vectors that contains \(\vec0\) and is β€œflat” in some sense. Formally, a subset \(S\) of \(\mathbb{R}^n\) is a subspace of \(\mathbb{R}^n\) if:

  1. 1.

    \(\vec0\in S\).

  2. 2.

    If \(\vec u,\vec v\in S\), then \(\vec u+\vec v\in S\). We say \(S\) is closed under addition.

  3. 3.

    If \(\vec u\in S\) and \(c\in\mathbb{R}\), then \(c\vec u\in S\). We say \(S\) is closed under scalar multiplication.

a)

Sketch each set below. Each is a subset of \(\mathbb{R}^2\), but only some are subspaces of \(\mathbb{R}^2\). Which and why?

(i) Top right quadrant
including its boundary
\(x\ge0,\ y\ge0\)

xyβˆ’555βˆ’5

(ii) The line
\(y=2x\)

xyβˆ’555βˆ’5

(iii) The line
\(y=3x-4\)

xyβˆ’555βˆ’5
Solution

(i) Top right quadrant
including its boundary
\(x\ge0,\ y\ge0\)

xyβˆ’555βˆ’5

(ii) The line
\(y=2x\)

xyβˆ’555βˆ’5

(iii) The line
\(y=3x-4\)

xyβˆ’555βˆ’5
  • (i) Not a subspace. It is not closed under scalar multiplication. For example,
$$ -1\begin{bmatrix}1\\1\end{bmatrix}=\begin{bmatrix}-1\\-1\end{bmatrix}, $$

which is outside the quadrant, even though \(\begin{bmatrix}1\\1\end{bmatrix}\) is inside it.

  • (ii) A subspace. The line contains \(\vec0\). If \(\vec u=\begin{bmatrix}a\\2a\end{bmatrix}\) and \(\vec v=\begin{bmatrix}b\\2b\end{bmatrix}\) are on the line, then
$$ \vec u+\vec v=\begin{bmatrix}a+b\\2(a+b)\end{bmatrix},\qquad c\vec u=\begin{bmatrix}ca\\2ca\end{bmatrix} $$

are also on the line. It is closed under addition and scalar multiplication, so all three conditions hold.

  • (iii) Not a subspace. The line does not contain \(\vec0\), since \(0\ne3(0)-4\).
b)

Now consider the set

$$ W=\left\{\begin{bmatrix}a\\b\\a+b\end{bmatrix}:a,b\in\mathbb{R}\right\}\subseteq\mathbb{R}^3. $$

Find two linearly independent vectors \(\vec u\) and \(\vec v\) such that \(\operatorname{span}(\vec u,\vec v)=W\).

Solution

One possible pair is

$$ \boxed{\vec u=\begin{bmatrix}1\\0\\1\end{bmatrix},\qquad \vec v=\begin{bmatrix}0\\1\\1\end{bmatrix}.} $$

Neither vector is a scalar multiple of the other, so they are linearly independent. Also,

$$ a\vec u+b\vec v=\begin{bmatrix}a\\b\\a+b\end{bmatrix}. $$

Every vector in \(W\) can be written this way, and every such linear combination belongs to \(W\). Thus \(\operatorname{span}(\vec u,\vec v)=W\).