Interactive Educational Modules in
Scientific Computing

Jacobi's Method for Eigenvalues

This module illustrates Jacobi's method for computing the eigenvalues of a symmetric matrix. Pairs of symmetrically placed entries in the matrix are annihilated repeatedly using plane rotations until the matrix is as close to diagonal as desired, at which point the diagonal entries approximate the eigenvalues of the original matrix.

The user first selects a matrix size, then selects a matrix by choosing a preset example, a random matrix, or typing in desired entries. The successive steps of Jacobi's method are then carried out sequentially by repeatedly clicking on NEXT or on the currently highlighted step. The next symmetric pair of matrix entries to be annihilated is selected by clicking on one of them; a default choice is highlighted in color. A plane rotation is then determined that annihilates the chosen entries. The rotation matrix is displayed on the right, and the cosine, sine, and angle of rotation (in radians) are shown in text boxes. The rotation is applied to the relevant portion of the matrix, and then the process is repeated with another symmetric pair of matrix entries. The matrix ultimately converges to a diagonal matrix with the approximate eigenvalues as diagonal entries. Formats provided for displaying numeric entries include exponential (e), fixed (f), and generic (g), with g the default.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 4.5.8, especially Example 4.19.

Developers: Jessica Schoen and Michael Heath