##### Definition4.1

Let \(V\) and \(W\) be subspaces of \(\mathbb{R}^n\). We say that \(\mathbb{R}^n\) and \(\mathbb{R}^m\) are*orthogonal*when for each vector \(v \in V\) and each vector \(w \in W\) we have \(v \cdot w =0\).

- Read section 4.1 of
*Strang*. - Read the following and complete the exercises below.

Before class, a student should be able to:

- Find the four subspaces associated to a matrix and verify that they are orthogonal subspaces.
- Draw the “Big Picture” associated to a matrix as a schematic drawing, with the four subspaces properly located and their dimensions identified.

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

- Find the orthogonal complement to a subspace.
- Reason about the structure of a matrix as a transformation using information about its four subspaces.

Previously, we had the notion of orthogonality for two vectors in Euclidean space. In this section, the concept gets extended to subspaces.

Two orthogonal subspaces always have as intersection the trivial subspace \(\{ 0\}\). The reason for this is that if some vector \(x\) lay in both \(V\) and \(W\), then we must have that \(x \cdot x =0\). (Think of the first \(x\) as lying in \(V\), and the second in \(W\).) But the properties of the dot product then mean that \(x\) is the zero vector.

There is a further concept:

The basic idea is that two spaces are orthogonal complements if they are
orthogonal, and together they contain enough vectors to span the entire
space. The definition looks like it is a one-directional thing: for a
subspace, you find its orthogonal complement. But really it is a
*complementary* relationship. If \(W\) is the orthogonal
complement to \(V\), then \(V\) is the orthogonal complement to
\(W\).

Recall the four fundamental subspaces associated to an \(m\times n\) 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 another big result, which is a sharpening of the Fundamental Theorem of Linear Algebra from the end of Chapter Three.

- The nullspace of \(A\) and the row space of \(A\) are orthogonal complements of one another.
- The column space of \(A\) and the left nullspace of \(A\) are orthogonal complements of one another.

It is not hard to find the four subspaces associated to a matrix with Sage's
built-in commands. But Sage also has a general purpose `.complement()`
method available for vector subspaces which can be used.

Those are the easy ones to find. The left nullspace is just a touch trickier. What is the deal? It is just the nullspace of the matrix \(A^T\), of course. But by the Fundamental Theorem of Linear Algebra, the left nullspace is the orthogonal complement of the column space. Let's see if they agree.

That is good news! It looks like the three ways we have of computing the left nullspace agree. As a check for understanding, you should be able to ask Sage if the rowspace of \(A\) is the orthogonal complement to the nullspace of \(A\).

- The column space contains \(\begin{pmatrix} 1 \\ 2 \\ -3\end{pmatrix}\) and \(\begin{pmatrix} 2 \\ -3 \\ 5 \end{pmatrix}\), and the nullspace contains \(\begin{pmatrix} 1\\1\\1 \end{pmatrix}\).
- the row space contains \(\begin{pmatrix} 1 \\ 2 \\ -3\end{pmatrix}\) and \(\begin{pmatrix} 2 \\ -3 \\ 5 \end{pmatrix}\), and the nullspace contains \(\begin{pmatrix} 1\\1\\1 \end{pmatrix}\).
- \(Ax = \begin{pmatrix}1 \\ 1\\ 1\end{pmatrix}\) has a solution, and \(A^T\begin{pmatrix}1 \\ 0 \\ 0 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}\).
- Every row is orthogonal to every column, but \(A\) is not the zero matrix.
- The columns add up to a column of zeros, and the rows add up to a row of \(1\)'s.