Graphics Programs Reference
In-Depth Information
However, there is a major snag—the transformation that annihilates an off-diagonal
term also undoes some of the previously created zeroes.Fortunately, itturnsoutthat
the off-diagonaltermsthat reappear will besmaller than before. ThusJacobi method
is an iterative procedurethat repeatedly applies Jacobi rotations until the off-diagonal
termshave virtually vanished. The finaltransformationmatrix
P
is the accumulation
of individual rotations
R
i
:
P
=
R
1
·
R
2
·
R
3
···
(9.14)
The columnsof
P
finish up being the eigenvectorsof
A
and the diagonal elements of
A
∗
=
P
T
AP
become the eigenvectors.
Let us now look at the details of a Jacobi rotation. FromEq. (9.13) we see that
A
k
=
0 if
(
c
2
s
2
)
A
k
+
−
cs
(
A
kk
−
A
)
=
0
(a)
Using the trigonometric identities
c
2
s
2
−
=
cos 2
θ
and
cs
=
(1
/
2)sin 2
θ
, weobtain
fromEq. (a)
2
A
k
A
kk
−
tan 2
θ
=−
(b)
A
which couldbe solved for
θ
, followedbycomputation of
c
=
cos
θ
and
s
=
sin
θ
. How-
ever, the procedure describedbelow leadstoabetteralgorithm.
20
Introducing the notation
A
kk
−
A
2
A
k
φ
=
cot 2
θ
=−
(9.15)
and utilizing the trigonometric identity
2
t
tan 2
θ
=
(1
−
t
2
)
where
t
=
tan
θ
, wecan write Eq. (b) as
t
2
+
φ
−
=
2
t
1
0
which has the roots
2
t
=−
φ
±
φ
+
1
|
| ≤
|
θ
| ≤
45
◦
,leads to the
It has been found that the root
t
1, which correspondsto
morestable transformation. Therefore, we choose the plussign if
φ>
0 and the minus
20
The procedure is adapted fromW.H. Press
et al
.,
Numerical Recipes in Fortran
, 2nd ed. (1992),
CambridgeUniversity Press.
Search WWH ::
Custom Search