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 `Lambda` such that `AQ=Q Lambda`. The calculator proceeds one step at a time so that the (hoped for) convergence can be watched.
The equation `AQ=Q B` is always satisfied, and the matrix `Q` is always orthogonal. If things go well, `B` will converge to a diagonal matrix `Lambda.` 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 `B_{ij}=B_{ji}` 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`:
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.