Skip to main content

Subsection 11.3.1 Jacobi rotation

Given a symmetric \(2 \times 2 \) matrix \(A \text{,}\) with

\begin{equation*} A = \left( \begin{array}{c c} \alpha_{0,0} \amp \alpha_{0,1} \\ \alpha_{1,0} \amp \alpha_{1,1} \end{array} \right) \end{equation*}

There exists a rotation,

\begin{equation*} J = \left( \begin{array}{c c} \gamma \amp - \sigma \\ \sigma \amp \gamma \end{array} \right), \end{equation*}

where \(\gamma = \cos( \theta ) \) and \(\sigma = \sin( \theta ) \) for some angle \(\theta \text{,}\) such that

\begin{equation*} J^T A J = \left( \begin{array}{c c} \gamma \amp \sigma \\ - \sigma \amp \gamma \end{array} \right) \left( \begin{array}{c c} \alpha_{0,0} \amp \alpha_{0,1} \\ \alpha_{1,0} \amp \alpha_{1,1} \end{array} \right) \left( \begin{array}{c c} \gamma \amp - \sigma \\ \sigma \amp \gamma \end{array} \right) = \left( \begin{array}{c c} \lambda_{0} \amp 0 \\ 0 \amp \lambda_{1} \end{array} \right) = \Lambda. \end{equation*}

We recognize that

\begin{equation*} A = J \Lambda J^T \end{equation*}

is the Spectral Decomposition of \(A \text{.}\) The columns of \(J \) are eigenvectors of length one and the diagonal elements of \(\Lambda \) are the eigenvalues.

Ponder This 11.3.1.1.

Give a geometric argument that Jacobi rotations exist.

Hint

For this exercise, you need to remember a few things:

  • How is a linear transformation, \(L \text{,}\) translated into the matrix \(A\) that represents it, \(A x = L( x ) \text{?}\)

  • What do we know about the orthogonality of eigenvectors of a symmetric matrix?

  • If \(A \) is not already diagonal, how can the eigenvectors be chosen so that they have unit length, first one lies in Quadrant I of the plane, and the other one lies in Quadrant II?

  • Draw a picture and deduce what the angle \(\theta\) must be.

It is important to note that to determine \(J \) we do not need to compute \(\theta \text{.}\) We merely need to find one eigenvector of the \(2 \times 2 \) matrix from which we can then compute an eigenvector that is orthogonal. These become the columns of \(J \text{.}\) So, the strategy is to

  • Form the characteristic polynomial

    \begin{equation*} \begin{array}{rcl} \det( \lambda I - A ) \amp=\amp ( \lambda - \alpha_{0,0} ) ( \lambda - \alpha_{1,1} ) - \alpha_{1,0}^2 \\ \amp=\amp \lambda^2 - ( \alpha_{0,0} + \alpha_{1,1} ) \lambda + ( \alpha_{0,0} \alpha_{1,1} - \alpha_{1,0}^2 ), \end{array} \end{equation*}

    and solve for its roots, which give us the eigenvalues of \(A \text{.}\) Remember to us the stable formula for computing the roots of a second degree polynomial, discussed in Subsection 9.4.1.

  • Find an eigenvector associated with one of the eigenvalues, scaling it to have unit length and to lie in either Quadrant I or Quadrant II. This means that the eigenvector has the form

    \begin{equation*} \left( \begin{array}{c} \gamma \\ \sigma \end{array} \right) \end{equation*}

    if it lies in Quadrant I or

    \begin{equation*} \left( \begin{array}{c} -\sigma \\ \gamma \end{array} \right) \end{equation*}

    if it lies in Quadrant II.

This gives us the \(\gamma \) and \(\sigma \) that define the Jacobi rotation.

Homework 11.3.1.2.

With Matlab, use the eig function to explore the eigenvalues and eigenvectors of various symmetric matrices:

[ Q, Lambda ] = eig( A )

Try, for example

A = [
-1  2 
 2  3 
]

A = [
 2  -1 
-1 -2 
]

How does the matrix \(Q \) relate to a Jacobi rotation? How would \(Q \) need to be altered for it to be a Jacobi rotation?

Solution

>>  A = [
 -1  2 
  2  3 
]

A =

    -1     2
     2     3


>> [ Q, Lambda ] = eig( A )

Q =

   -0.9239    0.3827 
    0.3827    0.9239 


Lambda =

   -1.8284         0
         0    3.8284

We notice that the columns of \(Q \) need to be swapped for it to become a Jacobi rotation:

\begin{equation*} J = \left( \begin{array}{rr} 0.9239 \amp 0.3827 \\ -0.3827 \amp 0.9239 \end{array} \right) = \left( \begin{array}{r r} 0.3827 \amp -0.9239 \\ 0.9239 \amp 0.3827 \end{array} \right) \left( \begin{array}{c c} 0 \amp -1 \\ 1 \amp 0 \end{array} \right) = Q \left( \begin{array}{c c} 0 \amp -1 \\ 1 \amp 0 \end{array} \right) . \end{equation*}

>> A = [
 2  -1 
-1 -2 
]

A =

     2    -1
    -1    -2

>> [ Q, Lambda ] = eig( A )

Q =

   -0.2298   -0.9732
   -0.9732    0.2298


Lambda =

   -2.2361         0
         0    2.2361

We notice that the columns of \(Q \) need to be swapped for it to become a Jacobi rotation. If we follow our "recipe", we also need to negate each column:

\begin{equation*} J = \left( \begin{array}{rr} 0.9732 \amp -0.2298 \\ 0.2298 \amp 0.9732 \end{array} \right) . \end{equation*}

These solutions are not unique. Another way of creating a Jacobi rotation is to, for example, scale the first column so that the diagonal elements have the same sign. Indeed, perhaps that is the easier thing to do:

\begin{equation*} Q = \left( \begin{array}{r r} -0.9239 \amp 0.3827 \\ 0.3827 \amp 0.9239 \end{array} \right) ~~~ \longrightarrow ~~~ J = \left( \begin{array}{r r} 0.9239 \amp 0.3827 \\ -0.3827 \amp 0.9239 \end{array} \right). \end{equation*}