CLS361 Programming assignment 4:
- Develop a Matlab program for the
algorihtm based
on Householder reflections for real
matrices.
Carry out the
decomposiiton for random matrices
(order of
) and compare you results with
the native
available in Matlab.
- Develop a function for reducing a real square symmetric matrix
to a tridiagonal form using Householder based
similarity transformations.
- Suppose that the
discussed in the class returns the approximation
for the Householder vector
after round-offs. If
then show/verify the following:
-
-
, where
-
, where
- Program the following
iteration (read the note at
the end of this assignment) for computing
the eigenvalues and eigenvectors of a general real matrix
of size
. For symmetric matrices, first carry
out a tridiagonalization. Show/verify that the
iteration
preserves the tridiagonal structure for a symmetric matrix.
Test your results on randomly generated matrices by comparing
with standard Matlab functions.
- Use your eigen-computation routine to compute the SVD
of an
matrix
. Note that if the SVD
of
is
where
then
and
Moreover, if
where
is the matrix of the first
columns of
and
is the matrix of the last
columns of
,
and we define
then
Compare your SVD computation with that of the standard Matlab
function for moderate size matrices.
- Consider a straight line
for any choice of
parameters
. Randomly select 100 points on the straight
line and shift these by adding 2-dimensional isotropic Gaussian random
noise (you can add zero mean Gaussian noise of variance
independently to
and
). Vary
and obtain least
square line fits using your SVD routine. Add comments/analysis
in a separate file.
Note:
The
iteration consists of a sequence of orthogonal
transformations
The following (non-obvious) theorem is the basis of the algorithm for a
real matrix
:
- If
has eigenvalues of distinct absolute value
, then
[upper-triangular form] as
. The eigenvalues appear on the diagonal in increasing order of
absolute maginitude.
- If
has eigenvalue
of multiplicity
, then
[upper-triangular form] as
, except for a diagonal block matrix of order
, whose
eigenvalues
.
If
is real
then there exists an orthogonal
such that
where each
is either a
matrix or a
matrix having complex conjugate eigenvalues.
The above result is called the Real Schur decomposition theorem.
The
iteration for general real matrices converges to a
a Real Schur form. It is customary to start with
such that
is
in upper Hessenberg form (
). A real
square matrix can be reduced to the Hessenberg form using
Householder operations. The
Hessenberg form is preserved by the
iteration.
For a real symmetric matrix all eigenvalues are real. If
has a multiplicity of
then the matrix can be split in to sub-matrices
which can be diagonalized separately.
In the proof of the theorem quoted above, one finds that in general
a sub-diagonal element converges to 0 like
Although
, convergence can be slow if they are
close. Convergence can be accelerated by a technique called
shifting: if
is any constant, then
has
eigenvalues
. If we decompose
then, the convergence is determined by the ratio
The idea is to choose the shift
at each stage to maximize the
rate of convergence. A good choice for the shift initially would
be
close to
, the smallest eigenvalue. Then the
first row of off-diagonal elements would tend rapidly to zero.
However
is not known apriori. A very effective strategy
is to compute the eigenvalues of the leading
sub-matrix of
at each stage and set
to the smaller. One can
show that the convergence of the algorithm with this strategy is
generally cubic (and at worst quadratic) for degenerate
eigenvalues.
Good luck.
Subhashis Banerjee
2009-11-09