Jacobi’s method

Two by two symmetric matrices Suppose

A = [ \begin{matrix}A & B \\ B & C \end{matrix} ]

We know that the eigenvectors are orthogonal, so we can find a matrix

X = [ \begin{matrix}c & −s \\ s & c \end{matrix} ] , c = cos φ, s = sin φ

such that

XAX^{−1}

is diagonal. We calculate

\begin{aligned}[ \begin{matrix}c & −s \\ s & c \end{matrix} ] [ \begin{matrix}A & B \\ B & C \end{matrix} ] [ \begin{matrix}c & s \\ −s & c \end{matrix} ] & = [ \begin{matrix}cA − sB & cB − sC \\ sA + cB & sB + cC \end{matrix} ] [ \begin{matrix}c & s \\ −s & c \end{matrix} ] \\ & = [ \begin{matrix}c^{2}A − 2scB + s^{2}C & (c^{2} − s^{2})B + sc(A − C) \\ (c^{2} − s^{2})B + sc(A − C) & s^{2}A + 2scB + c^{2}C \end{matrix} ] \end{aligned}

So we solve

(c^{2} − s^{2})B + 2sc(A − C) = 0 .

Let

z = \frac{c^{2} − s^{2}}{2sc} = \frac{C − A}{2B} = cot 2φ

If t = s/c = tan φ then

t^{2} + 2tz − 1 = 0

and we want to solve to find t. We’ll get the smallest angle if we set

\begin{aligned}t & = \frac{sign(z)}{|z| + \sqrt{1 + z^{2}}} \\ c & = \frac{1}{\sqrt{1 + t^{2}}} \\ s & = \frac{t}{\sqrt{1 + t^{2}}} \end{aligned}

Jacobi’s method 2 and then we get the new diagonal to be

e_{1} = c^{2}A − 2scB + s^{2}C

= (c^{2} + s^{2})A − 2scB + s^{2}(C − A)

= (c^{2} + s^{2})A − \frac{s}{c}(2c^{2}B − sc(C − A))

= (c^{2} + s^{2})A − t(2c^{2}B − (c^{2} − s^{2})B) = A − tB

e_{2} = C + tB

General symmetric matrices