In the previous section we obtained the solution of the equation
together with the bases of the four subspaces
of based its rref. Here we will consider an alternative
and better way to solve the same equation and find a set of
orthogonal bases that also span the four subspaces, based on the
pseudo-inverse
and
the singular value decomposition (SVD)
of . The solution obtained this
way is optimal in some certain sense as shown below.
Consider the SVD of an matrix of rank
:
|
(160) |
where
|
(161) |
is an matrix with non-zero singular values
of along
the diagonal (starting from the top-left corner), while all other
components are zero, and
and
are two orthogonal matrices
of dimensions and respectively. The column
vectors
and
,
are called the left and right singular vectors of ,
respectively, and they can be used as the orthonormal bases to span
respectively
and its
subspaces
and
, and
and its subspaces
and
.
To see this, we rewrite the SVD of as:
Each column vector of can be expressed as a linear
combination of the first columns of corresponding
to the non-zero singular values:
|
(163) |
Taking transpose on both sides of the SVD we also get:
i.e., each row vector of can be expressed as a linear
combination of the first columns of corresponding
to the non-zero singular values:
|
(165) |
We therefore see that the columns of and
corresponding to the non-zero singular values span respectively
the column space
and row space
:
|
(166) |
and the remaining columns of and columns of
corresponding to the zero singular values span respectively
orthogonal to
, and
orthogonal
to
:
|
(167) |
Subspace |
Definition |
Dimension |
Basis |
|
column space (image) of |
|
columns of corresponding to non-zero singular values |
|
left null space of |
|
columns of corresponding to zero singular values |
|
row space of (column space of ) |
|
columns of corresponding to non-zero singular values |
|
null space of |
|
columns of corresponding to zero singular values |
|
domain of
|
|
all columns of |
|
codomain of
|
|
all columns of |
The SVD method can be used to find the pseudo-inverse of an
matrix of rank
:
|
(168) |
where both and
|
(169) |
are matrices.
Consider the following four cases:
- If , then
,
.
- If , then
(full rank), is a left inverse:
|
(170) |
However,
|
(171) |
as the matrix
with only 1's
along the diagonal is not full rank and unequal to
,
- If , the
(full rank), is a right inverse:
|
(172) |
However,
|
(173) |
as the matrix
with only 1's
along the diagonal is not a full rank identity matrix
.
- If
, then neither
nor
is full rank, as they only have
non-zeros 1's along the diagonal, therefore is neither
left nor right inverse:
|
(174) |
We further note that matrices and are related to each
other by:
or |
(175) |
or in vector form:
|
(176) |
indicating how the individual columns are related.
We see that the last columns
of
form an orthogonal basis of
; and the last
columns
of form an orthogonal
basis of
.
We now show that the optimal solution of the linear system
can be obtained based on the pseudo-inverse
of :
|
(177) |
Specially, if , then
, and
is the unique and exact solution.
In general when or
, the solution may not
exist, or it may not be unique, but
is still an
optimal solution in two ways, from the perspective of both the
domain and codomain of the linear mapping , as shown below.
- In domain
:
Pre-multiplying
on both sides of the
pseudo-inverse solution
given above,
we get:
|
(178) |
or in component form:
|
(179) |
- The first components
are the projection of
onto
spanned by
corresponding to the non-zero
singular values;
- The last components
are the projection
of
onto
spanned by
corresponding to the zero
singular values.
We see that
is entirely in the row space,
containing no homogeneous component in
, i.e.,
has the minimum norm (closest to the origin) compared to any other possible
solution , such as those found previously based on the rref
of , containing a non-zero homogeneous component
:
|
(180) |
As
,
is the
projection of any such solution onto
. The
complete solution can be found as
|
(181) |
for any set of coefficients .
- In codomain
:
We now consider the result
produced
by the pseudo-inverse solution
, which, as a linear
combination of the columns of , is in its column space
:
|
(182) |
Pre-multiplying
on both sides we get:
|
(183) |
or in component form:
|
(184) |
We see that
is entirely in the column
space. If
, then
is an
exact solution. But if
, then
and
is not an exact solution.
But as
is the projection of onto
, the error
is minimized in
comparison to any other possible
|
(185) |
We therefore see that
is the optimal solution.
Summarizing the two aspects above, we see that the pseudo-inverse
solution
is optimal in the sense that both its
norm
and its error
are minimized.
- If the solution
is not unique because
, then the complete solution can be
found by adding the entire null space to it:
.
- If no solution exists because
,
then
is the optimal approximate solution with
minimum error.
Example: Given the same system considered in previous examples
we will now solve it using the pseudo-inverse method. We first find SVD of
in terms of the following matrices:
The particular solution of the system
with
is
which is in
spanned by the first columns
and , perpendicular to
spanned
by the last columns and . Note that
this solution
is actually
the first component
of the particular
solution
found in the previous section
by Gauss-Jordan elimination, which is not in
. Adding the
null space to the particular solution, we get the complete solution:
If the right-hand side is replaced by
, no solution exists. However, we can still find the
pseudo-inverse solution as the optimal approximate solution:
which is the same as the solution for
,
indicating
happens to be the projection of
onto
spanned by and
. The result produced by
is
is the projection of
onto
, with a minimum error distance
, indicating
is the optimal approximate solution.
Homework 3:
- Use Matlab function
svd(A)
to carry out the SVD of the coefficient
matrix of the linear system in Homework 2 problem 3,
Find , ,
. Verify that and
are orthogonal, i.e.,
and
.
- Obtain
, i.e, find the transpose of
and then replace each singular value by its reciprocal, verify that
and
.
Then find the pseudo-inverse
.
- Use Matlab function
pinv(A)
to find the pseudo-inverse
and . Compare them to what you obtained
in the previous part.
- Identify the bases of the four subspaces
,
,
, and
based on and
. Verify that these bases and those you found previously (problem
3 of Homework 2) span the same spaces, i.e., the basis vectors of one basis
can be written as a linear combination of those of the other, for each of
the four subspaces.
- Use the pseudo-inverse found above to solve
the system
. Find the two particular solutions
and
corresponding to two different right-hand
side
and
.
- How are the two results
and
related to
each other? Give your explanation. Why can't you find a solution when
but SVD method can?
- Verify that
. Also find the error (or
residual)
for each of the two results
above. Verify that
, if
.
- In Homework 2 you used row reduction method to solve the system
and you should have found a particular solution
. Also it is obvious to see that another
solution is
. Show that the projection of
these solutions onto
spanned by the first two columns of
is the same as the particular solution found by
the SVD method.
Answer
- Show that
is the projection of
onto
, the 2-D subspace spanned by
the first two columns of . Can you also show that it is the
projection of onto
spanned by the basis you obtained
in Homework 2 (not necessarily orthogonal)?
Answer
- Give an expression of the null space
, and then write the
complete solution in form of
. Verify any
complete solution so generated satisfies
.