Processing math: 100%
George Herriman's Krazy Kat is lounging under an umbrella.

Linear Algebra Calculators

Jacobi Algorithm


This calculator runs the Jacobi algorithm on a symmetric matrix A. This is a toy version of the algorithm and is provided solely for entertainment value.

We're looking for orthogonal Q and diagonal Λ such that AQ=QΛ. The calculator proceeds one step at a time so that the (hoped for) convergence can be watched.

The equation AQ=QB is always satisfied, and the matrix Q is always orthogonal. If things go well, B will converge to a diagonal matrix Λ. At this point B will contain the eigenvalues of A on its diagonal, while the corresponding eigenvectors of A are stored in the columns of the current Q.

At each step we either perform a Jacobi rotation about the provided positions, or we do a sweep and perform Jacobi rotations (in sequence) for each pair of positions in the matrix. A Jacobi rotation about the positions i and j will set the entries Bij=Bji to zero at the cost of possibly destroying any zeros that were already in B.


Either choose a size and press this button to get a randomly generated matrix, or enter your matrix in the box below. (Look at the example to see the format.)

Matrix A:

`A=((0.527869806653,-0.191549824678,0.173885287532),(-0.191549824678,0.091317940076,0.461771898778),(0.173885287532,0.461771898778,0.180812253271))`

`B =((0.527869806653,-0.191549824678,0.173885287532),(-0.191549824678,0.091317940076,0.461771898778),(0.173885287532,0.461771898778,0.180812253271))`

`Q =((1,0,0),(0,1,0),(0,0,1))`

Perform a Jacobi rotation about positions and

Perform, in sequence, a rotation for each possible choice of positions.

The reset button leaves the A matrix alone, but restarts the algorithm from the beginning with B=A and Q=I.


Back to calculator page or home page.
Krazy Kat is singing.