Classic jacobi method to find all eigenvalues and eigenvectors of a matrix