##### Theorem3.5

If \(A\) is an \(m\times n\) matrix with rank \(\mathrm{rank}(A) = r\), then- \(\dim(\mathrm{col}(A)) = \dim(\mathrm{row}(A)) = r\),
- \(\dim(\mathrm{null}(A)) = n-r\), and
- \(\dim(\mathrm{null}(A^T))= m-r\).

- Read chapter 3 section 6 of
*Strang*. - Read the following and complete the exercises below.

Before class, a student should be able to:

- Identify the four subspaces associated to a matrix by giving a basis of each.
- Determine the dimension of each of the four subspaces associated to a matrix.

Some time after class, a student should be able to:

- Describe each of the four subspaces associated to a matrix by giving minimal sets of equations which “cut them out.”
- State and use the Fundamental Theorem of Linear Algebra (FTLA) to reason about matrices.
- Use the RREF of a matrix to explain why the FTLA is true.

This section summarizes a big tool for understanding the behavior of a
matrix as a function.
Recall that if \(A\) is an \(m\times n\) matrix, then we can
think of it as defining a function
\begin{equation*}
\begin{array}{rcl}
T_A: \mathbb{R}^n & \rightarrow & \mathbb{R}^m \\
v\phantom{R} & \mapsto & Av
\end{array}
\end{equation*}
which takes as inputs vectors from \(\mathbb{R}^n\) and has as
outputs vectors in \(\mathbb{R}^m\). We have also seen that
properties of matrix multiplication translate into properties that
make into a *linear transformation*.

We now have four fundamental subspaces associated to the matrix \(A\).

- The column space, \(\mathrm{col}(A)\), spanned by all of the columns of \(A\). This is a subspace of \(\mathbb{R}^m\).
- The row space, \(\mathrm{row}(A)\), spanned by all of the rows of \(A\). This is a subspace of \(\mathbb{R}^n\). This also happens to be the column space of \(A^T\).
- The nullspace (or kernel), \(\mathrm{null}(A)\), consisting of all those vectors \(x\) for which \(Ax=0\). This is a subspace of \(\mathbb{R}^n\).
- The left nullspace, which is just the nullspace of \(A^T\). This is a subspace of \(\mathbb{R}^m\).

And we have a big result:

- \(\dim(\mathrm{col}(A)) = \dim(\mathrm{row}(A)) = r\),
- \(\dim(\mathrm{null}(A)) = n-r\), and
- \(\dim(\mathrm{null}(A^T))= m-r\).

(*Study Hint: Write that out in English, with no notation.
It will help you remember it.*)

We will have more to say about these spaces when we reconsider the uses of the dot product in chapter 4.

We have already seen enough SageMath commands to work with the four subspaces:
`.row_space()`, `.column_space()`, `.left_kernel()`, and
`.right_kernel()` all work.
Alternatively, we need only remember that the left nullspace and the row
space are just the nullspace and column space of the transpose. Let us
take a look at some of the options.

We have computed column spaces and nullspaces before. What about our new friends?

Since SageMath prefers rows under the hood, the left nullspace is easy to find.

And there you have it. SageMath can construct all four fundamental subspaces, and each comes with a basis computed by Sage. (Using the row algorithm!) Note that the FTLA works in this case.

Find an example of a matrix which has \((1,0,1)\) and \((1,2,0)\) as a basis for its row space and its column space.

Why can't this be a basis for the row space and the nullspace?

The equation \(A^Ty = d\) is solvable exactly when \(d\) lies in one of the four subspaces associated to \(A\). Which is it?

Which subspace can you use to determine if the solution to that equation is unique? How do you use that subspace?