## Linear Algebra: the four fundamental subspaces

Edit 18 Sep 2009. Purely cosmetic. I have highlighted in blue the result describing the spans of the parts of the u and v matrices. I have found that I still need to refer to it rather than reconstruct it when I want it. In other words, it’s what I want to pick out quickly from this post.

Given a linear operator A, we are told that there are four fundamental subspaces associated with it. They are

• the nullspace of A
• the column space of A
• the nullspace of $A^T\$ (i.e. of the transpose of A)
• the column space of $A^T\$.

Okay, they are easy enough to list.

Next, we need to realize that the column space of A is the range of A, and the column space of $A^T\$ is the range of $A^T\$. That’s what we really care about — the ranges.

But why is $A^T\$ involved? In particular, why do we care about the nullspace and the range of $A^T\$?

Let me show you what they “really” are. (That is, this is how I understand them.)

I’m going to use an exercise from Strang’s “Linear Algebra and Its Applications”; see the bibliography.

This is exercise 2.4.2.. “Find the dimension and construct a basis for the four subspaces associated with…”

$A = \left(\begin{array}{cccc} 0 & 1 & 4 & 0 \\ 0 & 2 & 8 & 0\end{array}\right)$

(Of course, since the second row is twice the first, we already know that the matrix is of rank 1.)

Now, Strang presents the four fundamental subspaces by using the LDU (LU) decomposition; I am going to use — what else? — the Singular Value Decomposition (SVD).

Here is the Mathematica command…

We know all about the SVD. In particular, we know that the SVD decomposes the matrix A as

$A = u\ w\ v^T\$,

where u and v are orthogonal matrices; and w is the same shape as A and, loosely speaking, as diagonal as it can be.

Here is the w matrix…

$w = \left(\begin{array}{cccc} \sqrt{85} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0\end{array}\right)$

That we have only one nonzero value tells us, if we didn’t already know it, that the matrix A is of rank 1. ( This is a representation of the A matrix with respect to different bases, specified by u and v. As such, it is the same shape and of the same rank. Since w is of rank 1, so is A.)

Here is the v matrix…

$v = \left(\begin{array}{cccc} 0 & 0 & 0 & 1 \\ \frac{1}{\sqrt{17}} & 0 & -\frac{4}{\sqrt{17}} & 0 \\ \frac{4}{\sqrt{17}} & 0 & \frac{1}{\sqrt{17}} & 0 \\ 0 & 1 & 0 & 0\end{array}\right)$

The columns of v are an orthonormal basis for the domain of A. Let’s apply A to it, that is to each of these basis vectors.

$A\ v = \left(\begin{array}{cccc} \sqrt{17} & 0 & 0 & 0 \\ 2 \sqrt{17} & 0 & 0 & 0\end{array}\right)$

Well! The three rightmost columns of v were mapped to zero by A; we conclude that they are a basis for the nullspace of A.

What about the leftmost (remaining) column of v? Its image, by definition, is in the range of A. So the first column of v is a basis for the pre-image of the range of A.

(Once we know what A does to a basis for its domain, we know what it does to any vector in its domain.)

That’s the pre-image of the range. What about the range of A? Well, let’s look at the matrix u:

$u = \left(\begin{array}{cc} \frac{1}{\sqrt{5}} & -\frac{2}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\end{array}\right)$

We see that the first column of u is proportional to the image of the first column of v. They span the same space — which is the range of A. Look at the algebra instead of the numbers:

$A\ v = u\ w\ v^T\ v = u\ w\$,

and the almost-diagonal form of w says that the columns of u w (equivalently, the columns of A v) are multiples of the columns of u. OK, some of them are zero multiples, but the real point is that the nonzero columns of A v are multiples of corresponding columns of u.

What about the other column of u? The matrix A maps from R^4 to R^2; we say that its codomain is R^2. And its codomain is split into two subspaces, each 1-dimensional:

• the range of A
• the part of the codomain that is not the range (“the part we cannot reach with A”).

The rightmost column of u is a basis for the rest of the codomain.

Okay…. We seem to have four fundamental subspaces, and we have orthonormal bases for them, which means we have orthogonal direct sums:

• domain of A = nullspace of A $\oplus\$ preimage of the range of A
• codomain of A = range of A $\oplus\$ the part we cannot reach with A.

The columns of v split naturally into bases for the nullspace and for the pre-image of the range of A; the columns of u split naturally into bases for the range of A and for the part we cannot reach with A. That is,

• nullspace of A is spanned by rightmost columns of v
• pre-image of range of A is spanned by leftmost columns of v
• range of A is spanned by leftmost columns of u
• the part we cannot reach is spanned by rightmost columns of u

But what about the range and nullspace of $A^T\$? Now would be a good time to guess that

• the preimage of the range of A is the range of $A^T\$
• the part we cannot reach with A is the nullspace of $A^T\$,

and that’s why $A^T\$ shows up: it provides more convenient (and in a sense, symmetric) names for two of the four spaces.

Maybe we should write the SVD of $A^T\$? From

$A = u\ w\ v^T\$,

we get

$A^T = v\ w^T\ u^T\$.

The roles of u and v have been swapped. (The point is that there are no new bases involved, still just the columns of u and v.)

Then our description of the spaces and bases of A translates to the following description of the spaces and bases of $A^T\$:

• nullspace of $A^T\$ is spanned by rightmost columns of u
• pre-image of range of $A^T\$ is spanned by leftmost columns of u
• range of $A^T\$ is spanned by leftmost columns of v
• the part we cannot reach with $A^T\$ is spanned by rightmost columns of v.

Our guess was right. The bases tell us that we have two names for the spaces spanned by each of the 4 partial bases.

• the rightmost columns of v span the nullspace of A, and equivalently the part we cannot reach with $A^T\$
• the leftmost columns of v span the pre-image of the range of A, and equivalently the range of $A^T\$
• the rightmost columns of u span the nullspace of $A^T\$, and equivalently the part we cannot reach with A
• the leftmost columns of u span the pre-image of the range of $A^T\$, and equivalently the range of A.

Therefore, instead of naming the orthogonal direct sums as

• domain of A = nullspace of A $\oplus\$ preimage of the range of A
• codomain of A = range of A $\oplus\$ the part we cannot reach with A

we call them

• domain of A = nullspace of A $\oplus\$ range of $A^T\$
• codomain of A = range of A $\oplus\$ the nullspace of $A^T\$

(If you think about it, those are the only two combinations of “range” and “nullspace” that make sense, i.e. that are subspaces of the domain and codomain respectively.)

BTW, we should actually solve the exercise (!) and write down the bases.

Recall v.

$v = \left(\begin{array}{cccc} 0 & 0 & 0 & 1 \\ \frac{1}{\sqrt{17}} & 0 & -\frac{4}{\sqrt{17}} & 0 \\ \frac{4}{\sqrt{17}} & 0 & \frac{1}{\sqrt{17}} & 0 \\ 0 & 1 & 0 & 0\end{array}\right)$

For the nullspace of A, the 3 rightmost columns of v:

$v2 = \left(\begin{array}{ccc} 0 & 0 & 1 \\ 0 & -\frac{4}{\sqrt{17}} & 0 \\ 0 & \frac{1}{\sqrt{17}} & 0 \\ 1 & 0 & 0\end{array}\right)$

Strang’s basis is equivalent:

$\left(\begin{array}{ccc} 1 & 0 & 0 \\ 0 & -4 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right)$

Check mine by applying A to each column…

$A\ v2 = \left(\begin{array}{ccc} 0 & 0 & 0 \\ 0 & 0 & 0\end{array}\right)$

For the nullspace of $A^T\$, recall u:

$u = \left(\begin{array}{cc} \frac{1}{\sqrt{5}} & -\frac{2}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\end{array}\right)$

then the rightmost columns of u are:

$u2 = \left(\begin{array}{c} -\frac{2}{\sqrt{5}} \\ \frac{1}{\sqrt{5}}\end{array}\right)$

Strang’s basis is equivalent: $\{-2,1\}\$.

Check mine by applying $A^T\$ to it:

$A^T\ u2 = \left(\begin{array}{c} 0 \\ 0 \\ 0 \\ 0\end{array}\right)$

For the range of A, the first column of u:

$u1 = \left(\begin{array}{c} \frac{1}{\sqrt{5}} \\ \frac{2}{\sqrt{5}}\end{array}\right)$

Strang’s basis is equivalent: $\{1,2\}\$.

For the range of $A^T\$, the leftmost column of v:

$v1 = \left(\begin{array}{c} 0 \\ \frac{1}{\sqrt{17}} \\ \frac{4}{\sqrt{17}} \\ 0\end{array}\right)$

Again, his basis is equivalent:$\{0,1,4,0\}\$.

I should point out that Strang’s bases for the domain and codomain (found from the LDU decomposition) are orthogonal but not orthonormal. Mine are orthonormal.

I should also point out that I really, really like orthonormal bases. Sometimes there’s a good reason not to use them, but barring such a reason – orthonormal. And we will be using this material for light spectra.

So, as I see it, we have two principles here.

First, the 4 fundamental subspaces “really” are

• an orthogonal decomposition of the domain of A:
• nullspace of A
• preimage of the range of A
• an orthogonal decomposition of the codomain of A:
• the range of A
• the subspace we cannot reach with A

Second, we can describe two of those subspaces in terms of $A^T\$,

• the range of $A^T\$ = preimage of the range of A
• the nullspace of $A^T\$ = the subspace we cannot reach with A.

Thus, more compactly, we have the 4 fundamental subspaces as

• an orthogonal decomposition of the domain of A:
• nullspace of A
• range of $A^T\$
• an orthogonal decomposition of the codomain of A:
• the range of A
• nullspace of $A^T\$

As Paul Harvey used to say, “And now you know the rest of the story.”