Math 6800: QR-factorization & Eigenvalues of Symmetric Tridiagonal Matrices - Prof. Donald, Assignments of Linear Algebra

Instructions for completing problem set 7 in math 6800, which involves computing the qr-factorization and eigenvalues of a real, symmetric, tridiagonal matrix using householder triangularization and the qr-algorithm with shifts. Students are required to write subprograms, called myqrtridiag and myeigtridiag, to perform these tasks. The document also suggests testing the code with random matrices of size n = 10 and observing the convergence of the iteration.

Typology: Assignments

2011/2012

Uploaded on 02/17/2012

koofers-user-4uz
koofers-user-4uz 🇺🇸

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 6800
D. Schwendeman Problem Set 7
Due:
Monday, 11/22/10
1. Text exercise 27.5, p.210.
2. Text exercise 28.1, p.218.
3. Text exercise 28.2, p.218.
4. Construct an algorithm that computes the QR-factorization of a real, symmetric, tridi-
agonal matrix Tusing Householder triangularization. Your algorithm will be similar to 10.1
in the text but should take advantage of the sparsity of T. In fact, your algorithm should
be based on orthogonal matrices of the form
Qk=
I1
Fk
I2
where I1and I2are (k1)×(k1) and (nk1)×(nk1) identity matrices, respectively,
and F=I2vvT/kvk2is a 2 ×2 Householder reflector, instead of the more general form
given in equation (10.2) of the text. Having computed the QR-factorization of T, we are
interested in the product RQ (to find eigenvalues of Tusing the QR-algorithm). To do
this, we do not form Qexplicitly, but rather apply the v’s that define the 2 ×2F’s to R.
This product can be obtained following algorithm 10.2 or 10.3 with suitable modifications
given that the v’s are only 2-vectors and Ris a banded matrix for the case here. Write a
subprogram, called myQRtridiag say, that takes as input a symmetric tridiagonal matrix
Tand returns a tridiagonal matrix U=RQ. In writing your code, do not worry about
storing your matrices compactly (i.e. they can be saved as a full square matrix with lots of
zeros), but do take advantage of symmetry and sparsity when possible in order to reduce
the operation count. You should check your code using Matlab’s qr function.
5. Construct an algorithm that computes the eigenvalues of a real, symmetric, tridiagonal
matrix Tusing the QR-algorithm with shifts (see algorithm 28.2). Your algorithm should
use the Wilkinson shift discussed on page 222 and deflation. Write a subprogram, called
myEigTridiag say, that takes as input Tand returns a vector containing the eigenvalues
of T. The step involving the QR-factorization and the reverse product RQ can be done
using your subroutine myQRtridiag. Again, you need not worry about compact storage.
Test your code with random n×nmatrices Tof size n= 10 say. You might print out the
iterates Tkto see how the iteration behaves. (Here you really only need to print out the
diagonal and subdiagonal, say, of Tk.) You will need to come up with a test to decide when
to deflate during the iteration and when to stop. How quickly does Tkbecome diagonal for
your test matrices?
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Math 6800: QR-factorization & Eigenvalues of Symmetric Tridiagonal Matrices - Prof. Donald and more Assignments Linear Algebra in PDF only on Docsity!

Math 6800

D. Schwendeman Problem Set 7

Due: Monday, 11/22/

  1. Text exercise 27.5, p.210.
  2. Text exercise 28.1, p.218.
  3. Text exercise 28.2, p.218.
  4. Construct an algorithm that computes the QR-factorization of a real, symmetric, tridi- agonal matrix T using Householder triangularization. Your algorithm will be similar to 10. in the text but should take advantage of the sparsity of T. In fact, your algorithm should be based on orthogonal matrices of the form

Qk =

  

I 1

Fk I 2

  

where I 1 and I 2 are (k−1)×(k−1) and (n−k−1)×(n−k−1) identity matrices, respectively, and F = I − 2 vvT^ /‖v‖^2 is a 2 × 2 Householder reflector, instead of the more general form given in equation (10.2) of the text. Having computed the QR-factorization of T , we are interested in the product RQ (to find eigenvalues of T using the QR-algorithm). To do this, we do not form Q explicitly, but rather apply the v’s that define the 2 × 2 F ’s to R. This product can be obtained following algorithm 10.2 or 10.3 with suitable modifications given that the v’s are only 2-vectors and R is a banded matrix for the case here. Write a subprogram, called myQRtridiag say, that takes as input a symmetric tridiagonal matrix T and returns a tridiagonal matrix U = RQ. In writing your code, do not worry about storing your matrices compactly (i.e. they can be saved as a full square matrix with lots of zeros), but do take advantage of symmetry and sparsity when possible in order to reduce the operation count. You should check your code using Matlab’s qr function.

  1. Construct an algorithm that computes the eigenvalues of a real, symmetric, tridiagonal matrix T using the QR-algorithm with shifts (see algorithm 28.2). Your algorithm should use the Wilkinson shift discussed on page 222 and deflation. Write a subprogram, called myEigTridiag say, that takes as input T and returns a vector containing the eigenvalues of T. The step involving the QR-factorization and the reverse product RQ can be done using your subroutine myQRtridiag. Again, you need not worry about compact storage. Test your code with random n × n matrices T of size n = 10 say. You might print out the iterates Tk to see how the iteration behaves. (Here you really only need to print out the diagonal and subdiagonal, say, of Tk.) You will need to come up with a test to decide when to deflate during the iteration and when to stop. How quickly does Tk become diagonal for your test matrices?