Solver Utility for the Eigenvalues Only of a 3 X 3 Real Symmetric Matrix

This page contains a routine that numerically finds the eigenvalues ONLY of a 3 X 3 Real, Symmetric Matrix. It is written in JavaScript, so make sure that JavaScript is enabled in your browser. The algorithm is from the EISPACK collection of subroutines.


Smith, B.T.; J.M. Boyle; J.J. Dongarra; B.S. Garbow; Y. Ikebe; V.C. Klema; and C.B. Moler.
          "Matrix Eigensystem Routines--(EISPACK) Guide"
          Springer-Verlag, Berlin.

Garbow, B.S.; J.M. Boyle; J.J. Dongarra; and C.B. Moler.
          "Matrix Eigensystem Routines--(EISPACK) Guide Extension"
          Springer-Verlag, Berlin.

The original sub-routines were written in FORTRAN and have been translated to Javascript here. Although all care has been taken to ensure that the sub-routines were translated accurately, some errors may have crept into the translation. These errors are mine; the original FORTRAN routines have been thoroughly tested and work properly. Please report any errors to the webmaster.

λ is an eigenvalue (a scalar) of the Matrix [A] if there is a non-zero vector (v) such that the following relationship is satisfied:

[A](v) = λ (v)

Every vector (v) satisfying this equation is called an eigenvector of [A] belonging to the eigenvalue λ.

As an example, in the case of a 3 X 3 Matrix and a 3-entry column vector,
        a11   a12   a13
[A]   =   a21   a22   a23
        a31   a32   a33

and each eigenvector v takes the form

(v)   =   v2

To use this utility, you should have the a values ready to enter. If you have all the data ready, simply enter it, click the Solve button, and it will calculate the eigenvalues of [A]. Because the matrix is symmetric, the eigenvalues are real (assuming they can be computed).

Enter the appropriate data values for the A matrix.
(Taking advantage of the fact that A is symmetric, the user only has to input A values for entries along the diagonal and below the diagonal.)
Click the Solve button.
This utility will then calculate the eigenvalues of [A].

IMPORTANT: Note the Error Code. If it does not equal 0, some eigenvalues may not have been computed.

Enter the [A] values:

a11   a12   =   a21   a13   =   a31
a21   a22   a23   =   a32
a31   a32   a33

The eigenvalues are:

λ1 =
λ2 =
λ3 =

Error Code

If Error Code > 0:
If more than 30 iterations are required to determine an eigenvalue, the subroutine terminates. The Error Code gives the index of the eigenvalue for which the failure occurred. Eigenvalues λ 1, λ 2, . . . λ ErCode - 1 should be correct.

Return to Math Functions Page

Return to Thothworks Home Page