Each lab worksheet will contain several activities, some of which will involve writing code and others that will involve writing math on paper. To receive credit for a lab, you must complete all activities and show your lab TA by the end of the lab section.
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.
Moving everything to one side in each equation gives a linear combination of the columns equal to \(\vec 0\). The coefficients give us four vectors in \(\text{nullsp}(X)\):
These vectors are linearly independent: in components 3 through 6, each vector has a non-zero entry where the other three have zeros. Since the null space has dimension 4, these four vectors form a basis.
Activity 3: Four Spaces Warm-Up
Let \(A\) be a \(7 \times 9\) matrix with rank \(5\). For each space below, state its dimension and the space \(\mathbb R^k\) of which it is a subspace.
Space
Dimension
Subspace of \(\mathbb R^k\) (state \(k\))
\(\text{colsp}(A)\)
\(\text{colsp}(A^T)\)
\(\text{nullsp}(A)\)
\(\text{nullsp}(A^T)\)
Solution
The completed table is:
Space
Dimension
Subspace of
\(\text{colsp}(A)\)
5
\(\mathbb R^7\)
\(\text{colsp}(A^T)\)
5
\(\mathbb R^9\)
\(\text{nullsp}(A)\)
4
\(\mathbb R^9\)
\(\text{nullsp}(A^T)\)
2
\(\mathbb R^7\)
Both column spaces have dimension 5, since \(\text{rank}(A)=\text{rank}(A^T)=5\). For the null spaces, apply the Rank-Nullity Theorem to \(A\) and \(A^T\):
The first condition tells us that \(A\) needs two rows, and the second tells us that it needs two columns.
Letโs make the first column \(\begin{bmatrix}3\\1\end{bmatrix}\). Then the first condition is automatically satisfied. For the second condition, we need the first column plus three times the second column to be \(\vec 0\). So, one answer is
Let \(A\) be an \(n \times d\) matrix of rank \(r\), and suppose there exist vectors \(\vec b \in \mathbb{R}^n\) such that
$$ A \vec x = \vec b $$
does not have a solution (meaning no \(\vec x\) makes \(A \vec x = \vec b\)).
a)
What are all inequalities (\(<\) or \(\le\)) that must be true between \(n\), \(d\), and \(r\)?
Solution
If \(A\vec x=\vec b\) has no solution, then \(\vec b\) is not in \(\text{colsp}(A)\). So, the columns of \(A\) donโt span all of \(\mathbb R^n\), which means \(r<n\).
Also, \(A\) only has \(d\) columns, so it canโt have more than \(d\) linearly independent columns. This gives
$$ \boxed{r<n\qquad\text{and}\qquad r\le d} $$
We canโt conclude whether \(n<d\), \(n=d\), or \(n>d\); all three are possible.
b)
How do you know that \(A^T\vec y= \vec 0\) has solutions other than \(\vec y=\vec 0\)?
Solution
From part (a), \(r<n\). Since \(A^T\) has \(n\) columns and rank \(r\), the Rank-Nullity Theorem gives
$$ \dim(\text{nullsp}(A^T))=n-r>0 $$
So, \(\text{nullsp}(A^T)\) contains more than just the zero vector. Any non-zero vector in this null space is a solution to \(A^T\vec y=\vec 0\).
Activity 6: Columns in a Null Space
Let \(A\) and \(B\) be non-zero \(6 \times 6\) matrices. Suppose \(\text{rank}(A)=4\), and that every column of \(B\) is in \(\text{nullsp}(A)\).
a)
Show that every row of \(A\) is orthogonal to every column of \(B\).
Solution
Take any column \(\vec b\) of \(B\). Since \(\vec b\in\text{nullsp}(A)\), we know that \(A\vec b=\vec 0\).
Each entry of \(A\vec b\) is the dot product of a row of \(A\) with \(\vec b\). Since every entry is zero, every row of \(A\) is orthogonal to \(\vec b\). This works for every column of \(B\).
b)
Find \(AB\) and \(\text{rank}(AB)\). Justify your answers.
Solution
Each column of \(AB\) is \(A\) times the corresponding column of \(B\). All of these products are \(\vec 0\), so
The zero matrix has no linearly independent columns.
c)
What are the possible values of \(\text{rank}(B)\)? Explain why these are the only possibilities, and why each one is possible.
Solution
By the Rank-Nullity Theorem, \(\dim(\text{nullsp}(A))=6-4=2\). Every column of \(B\) is in this two-dimensional space, so at most two columns of \(B\) can be linearly independent. Also, \(B\) is non-zero, so its rank canโt be 0.
This leaves \(\boxed{\text{rank}(B)\in\lbrace1,2\rbrace}\). Both are possible. Let \(\lbrace\vec u,\vec v\rbrace\) be a basis for \(\text{nullsp}(A)\):
For rank 1, make every column of \(B\) equal to \(\vec u\).
For rank 2, make the first two columns \(\vec u\) and \(\vec v\), and make the remaining columns \(\vec 0\).
Both choices satisfy all of the conditions in the question.
Activity 7: Can the Column Space Equal the Null Space?
In each part, determine whether itโs possible to find a matrix whose column space and null space are the same. If it is, give an example and show that it works. If not, explain why not.
a)
Can you find a \(2 \times 2\) matrix \(A\) such that \(\text{colsp}(A)=\text{nullsp}(A)\)?
So, its null space is also \(\text{span}\left\lbrace\begin{bmatrix}1\\0\end{bmatrix}\right\rbrace\). Both spaces are the horizontal axis in \(\mathbb R^2\).
b)
Can you find a \(3 \times 3\) matrix \(A\) such that \(\text{colsp}(A)=\text{nullsp}(A)\)?
Solution
No. If the column space and null space were equal, they would have the same dimension. Calling this dimension \(r\), the Rank-Nullity Theorem would give
$$ r+r=3\quad\Longrightarrow\quad r=\frac32 $$
But the dimension of a subspace must be an integer, so this is impossible.