Q R Method
Suppose that A is a real symmetric matrix. In the preceding section we saw how
Householders method is used to construct a similar tridiagonal matrix. The Q R
method is used to find all eigenvalues of a tridiagonal matrix. Plane rotations similar
to those that were introduced in Jacobis method are used to construct an orthogonal
matrix Q 1 = Q and an upper-triangular matrix U 1 = U so that A1 = A has the
factorization
(34) A1 = Q 1 U 1 .
Then form the product
(35) A2 = U 1 Q 1 .
Since Q 1 is orthogonal, we can use (34) to see that
(36) Q 1 A1 = Q 1 Q 1 U 1 = U 1 .
Therefore, A2 can be computed with the formula
(37) A2 = Q 1 A1 Q 1 .
Since Q 1 = Q 1
1 , it follows that A2 is similar to A1 and has the same eigenvalues. In
general, construct the orthogonal matrix Q k and upper-triangular matrix U k so that
(38) Ak = Q k U k .
S EC . 11.4 E IGENVALUES OF S YMMETRIC M ATRICES 633
Then define
(39) Ak+1 = U k Q k = Q k Ak Q k .
Again, we have Q k = Q 1
k , which implies that Ak+1 and Ak are similar. An important
consequence is that Ak is similar to A and hence has the same structure. Specifically,
we can conclude that if A is tridiagonal then Ak is also tridiagonal for all k. Now
suppose that A is written as
d1 e1
e1 d2 e2
e2 d3
(40) A= .. .
. d e
n2 n2
en2 dn1 en1
en1 dn
We can find a plane rotation P n1 that reduces to zero the element of A in location
(n, n 1), that is,
d1 e1
e1 d2 e2
e2 d3
(41) P n1 A = .. .
. d q r
n2 n2 n2
en2 pn1 qn1
0 pn
Since each plane rotation is represented by an orthogonal matrix, equation (42) implies
that
Direct multiplication of U by Q will produce all zero elements below the lower
second diagonal. The tridiagonal form of A2 implies that it also has zeros above the
upper second diagonal. Investigation will reveal that the terms r j are used only to
compute these zero elements. Consequently, the numbers {r j } do not need to be stored
or used in the computer.
For each plane rotation P j it is assumed that we store the coefficients c j and s j
that define it. Then we do not need to compute and store Q explicitly; instead, we
can use the sequences {c j } and {s j } together with the correct formulas to unravel the
product
Acceleration Shifts
As outlined above the Q R method will work, but convergence is slow even for ma-
trices of small dimension. We can add a shifting technique that speeds up the rate of
convergence. Recall that if j is an eigenvalue of A, then j si is an eigenvalue of
the matrix B = A si I. This idea is incorporated in the modified step
(45) Ai si I = U i Q i ;
then form
They are x1 and x2 and are the roots of the quadratic equation
The value si in equation (45) is chosen to be the root of (48) that is closest to dn .
Then Q R iterating with shifting is repeated until we have en1 0. This will
produce the first eigenvalue 1 = s1 + s2 + + sk1 . A similar process is repeated with
the upper n 1 rows to obtain en2 0, and the next eigenvalue is 2 . Successive iter-
ation is applied to smaller submatrices until we obtain e2 0 and the eigenvalue n2 .
Finally, the quadratic formula is used to find the last two eigenvalues. The details can
be gleaned from Program 11.5
S EC . 11.4 E IGENVALUES OF S YMMETRIC M ATRICES 635
The first eigenvalue, rounded to five decimal places is given in the calculation
Next 1 is placed in the last diagonal position of A4 and the process is repeated, but
changes are made only in the upper 3 3 corner of the matrix
4.62640 2.53033 0 0
2.53033 4.33489 0.00111 0
A4 = 0
.
0.00111 0.29150 0
0 0 0 1.35425
In a similar manner, one more shift reduces the entry in the second row and third
column to zero (to 10 decimal places):
s4 = 0.29150, A4 s4 I = Q 4 U 4 , A5 = U 4 Q 4 .
Finally, 2 is placed on the diagonal of A5 in the third row and column to obtain
4.26081 2.65724 0 0
2.65724 4.55232 0 0
A5 = 0
.
0 1.64575 0
0 0 0 1.35425
The final computation requires finding the eigenvalues of the 2 2 matrix in the upper-left
corner of A5 . The characteristic equation is
which reduces to
x 2 + 0.29151x 26.45749 = 0.
The roots are x1 = 5.00000 and x2 = 5.29150, and the last two eigenvalues are computed
with the calculations
Program 11.5 can be used to approximate all the eigenvalues of a symmetric tridi-
agonal matrix. The program follows directly from the previous discussion, but with
two notable exceptions. First, the MATLAB command eig is used to find the roots
of the characteristic equation (48) of each 2 2 submatrix (47). Second, the Q R
factorization of the matrix Ai si I (45) is executed using the MATLAB command
[Q,R]=qr(B), which produces an orthogonal matrix Q and an upper-triangular matrix
R, such that B=Q*R (readers will be asked to write their own Q R factorization program).
Numerical Methods Using Matlab, 4th Edition, 2004
John H. Mathews and Kurtis K. Fink
ISBN: 0-13-065248-2
Prentice-Hall Inc.
Upper Saddle River, New Jersey, USA
http://vig.prenhall.com/