You are on page 1of 9

151

4.5 JACOBI ITERATION FOR FINDING EIGENVALUES OF A REAL


SYMMETRIC MATRIX

Some Preliminaries:

Let
|
|
.
|

\
|
=
22 12
12 11
a a
a a
A be a real symmetric matrix.

Let
|
|
.
|

\
|
=


Cos
Cos
P
sin
sin
; (where we choose
4

for
purposes of convergence of the scheme)

Note

|
|
.
|

\
|

=


Cos
Cos
P
t
sin
sin
and I PP P P
t t
= =

Thus P is an orthogonal matrix.

Now
|
|
.
|

\
|
|
|
.
|

\
|
|
|
.
|

\
|

= =




cos sin
sin cos
cos sin
sin cos
22 12
12 11 1
a a
a a
AP P A
t

|
|
.
|

\
|
+ +
+ +
|
|
.
|

\
|

=




cos sin sin cos
cos sin sin cos
cos sin
sin cos
22 12 22 12
12 11 12 11
a a a a
a a a a


( ) ( )
( ) ( )
|
|
.
|

\
|
+ + +
+ + + +
=


2
22 12
2
11
2 2
12 22 11
2 2
12 22 11
2
22 12
2
11
cos cos sin 2 sin sin cos cos sin
sin cos cos sin sin cos sin 2 cos
a a a a a a
a a a a a a

Thus if we choose such that,


( ) ( ) 0 sin cos cos sin
2 2
12 22 11
= + + a a a
. . . (I)

We get the entries in (1,2) position and (2,1) position of A
1
as zero.



152
(I) gives


( ) 0 2 cos 2 sin
2
12
22 11
= +
|
.
|

\
|
+
a
a a


2 sin
2
2 cos
22 11
12
a a
a

=


( )
( )
22 11
22 11 12
22 11
12
sgn 2 2
2 tan
a a
a a a
a a
a

= , say . . . . . (II)

where ) sgn( 2
22 11 12
a a a = . . . . . (III)

22 11
a a =
. . . . . (IV)

2 tan 1 2 sec
2 2
+ =


2
2
1

+ = from (II)
2
2 2

+
=

2 2
2
2
2 cos

+
=

2 2
2
2 2
1 cos 2 2 cos

+
=
+
=



153
(
(

+
+ =
2 2
1
2
1
cos

. . . . . . . (V)

and


2 2
2
2
1 2 cos 1 2 sin cos sin 2


+
= = =


2 2
2 2
2

+
=
+
=


2 2
cos 2
sin

+
=
. . . . . .(VI)

(V) and (VI) give sin, cos and if we choose


|
|
.
|

\
|
=


cos sin
sin cos
P with these values of cos, sin, then

P
t
AP = A
1
has (2,1) and (1,2) entries as zero.

We now generalize this idea.

Let A = (a
ij
) be an nxn real symmetric matrix.

Let 1 q < p < n. (Instead of (1,2) position above choose (q, p) position)

Consider,


) sgn( 2
pp qq qp
a a a =
. . . . . . . (A)



154

pp qq
a a =
. . . . . . . (B)


(
(

+
+ =
2 2
1
2
1
cos

. . . . . . . (C)


2 2
cos 2
1
sin

+
=
. . . . . . . (D)

q p


|
|
|
|
|
|
|
|
|
|
|
|
|
.
|

\
|

=
1
cos sin
1
sin cos
1
1
O
O
O


P


then A
1
= P
t
AP has the entries in (q, p) position and (p, q) position as zero.

In fact A
1
differs from A only in q
th
row, p
th
row and q
th
column and p
th
column
and it can be shown that these new entries are



cos sin
sin cos
1
1
pi qi
pi
pi qi
qi
a a a
a a a
+ =
+ =
i q, p (q
th
row p
th
row) . .(E)

q
p


155


cos sin
sin cos
1
1
ip iq
ip
ip iq
iq
a a a
a a a
+ =
+ =
i q, p (q
th
column p
th
column) . .(F)

. 0
cos cos sin 2 sin
sin cos sin 2 cos
1 1
2 2 1
2 2 1
= =
+ =
+ + =
pq qp
pp qp qq
pp
pp qp qq
qq
a a
a a a a
a a a a


. . . (G)

Now the Jacobi iteration is as follows.

Let A = (a
ij
) be nxn real symmetric.

Find 1 q < p n such that
qp
a
is largest among the absolute values of all
the off diagonal entries in A.

For this q, p find P as above. Let A
1
= P
t
AP. A
1
can be obtained as follows:
Except the p
th
and the qth rows and the p
th
and q
th
columns other rows and
columns of A
1
are the same as the corresponding rows and columns of A,

p
th
row, q
th
column, p
th
column which are obtained from (E), (F), (G).

Now A
1
has 0 in (q, p), (p, q) position.

Replace A by A
1
and repeat the process. The process converges to a diagonal
matrix the diagonal entries of which give the eigenvalues of A.

Example:

|
|
|
|
|
.
|

\
|

=
3 2 4 1
2 4 2 2
4 2 9 3
1 2 3 7
A

Entry with largest modulus is at (2, 4) position.


156

q = 2, p = 4.

( ) ( )
24 44 22
. sgn 2 . sgn 2 a a a a a a
qp pp qq
= =

( )( )( ) . 8 4 1 2 = =

6 3 9 = = =
pp qq
a a

100
2 2
= + ;
10
2 2
= +


(
(

|
|
.
|

\
|
+
+ =
2 2
1
2
1
cos



89442 . 0 8 . 0
5
4
10
6
1
2
1
= = =
|
.
|

\
|
+ =

10
8
) 89442 . 0 ( 2
1
cos 2
1
sin
2 2
=
+
=



= 0.44721
|
|
|
|
|
.
|

\
|

=
89442 . 0 0 44721 . 0 0
0 1 0 0
44721 . 0 0 89442 . 0 0
0 0 0 1
P



157
A
1
= P
T
AP will have a
1
24
= a
1
42
= 0.

Other entries that are different from that of A are a
1
21
, a
1
22
, a
1
23
; a
1
41
, a
1
42
, a
1
43
,
a
1
44
; (of course by symmetric corresponding reflected entries also change).

We have,

1305 . 3 sin cos
41 21
21
1
= + = a a a

44721 . 0 cos sin
41 21
41
1
= + = a a a

89443 . 0 sin cos
43 23
23
1
= + = a a a

68328 . 2 cos sin
43 23
43
1
= + = a a a

11 sin cos sin 2 cos
2
44 24
2
22
22
1
= + + = a a a a

1 cos cos sin 2 sin
2
44 24
2
22
44
1
= + = a a a a

|
|
|
|
|
.
|

\
|

=
00000 . 1 68328 . 2 0 44721 . 0
68328 . 2 4 89443 . 0 2
0000 . 0 89443 . 0 11 1305 . 3
44721 . 0 2 1305 . 3 7
1
A


Now we repeat the process with this matrix.

The largest absolute value is at (1, 2) position.

q = 1, p = 2.

4 4 11 7
22 11
= = = = = a a a a
pp qq



158

( ) ( )( ) 1 1305 . 3 2 sgn 2 = =
pp qq gp
a a a
= - 6.2610.

42968 . 7
200121 . 55
2 2
2 2
= +
= +




87704 . 0 1
2
1
cos
2 2
=
(
(

+
+ =

;

48043 . 0
cos 2
1
sin
2 2
=
+
=



The entries that change are


71484 . 12 cos cos sin 2 sin
28516 . 5 sin cos sin 2 cos
21485 . 0 cos sin
39222 . 0 sin cos
17641 . 0 cos sin
18378 . 2 sin cos
0
2
22 12
2
11
22
1
2
22 12
2
11
11
1
24 14
24
1
24 14
14
1
23 13
23
1
23 13
13
1
21
1
12
1
= + =
= + + =
= + =
= + =
= + =
= + =
= =






a a a a
a a a a
a a a
a a a
a a a
a a a
a a


and the new matrix is



159
|
|
|
|
|
.
|

\
|

1 68328 . 2 21485 . 0 39222 . 0


68328 . 2 4 17641 . 0 18378 . 2
21485 . 0 17641 . 0 71484 . 12 0
39222 . 0 18378 . 2 0 28516 . 5


Now we repeat with q = 3, p = 4 and so on.
And at the 12
th
step we get the diagonal matrix

|
|
|
|
|
.
|

\
|

09733 . 2 0 0 0
0 60024 . 5 0 0
0 0 71986 . 12 0
0 0 0 78305 . 5


giving eigenvalues of A as 5.78305, 12.71986, -5.60024, 2.09733.

Note: At each stage when we choose (q, p) position and apply the above
transformation to get new matrix A
1
then sum of squares of off diagonal entries
of A
1
will be less than that of A by 2a
2
qp
.

You might also like