A = Matrix.New({{1,2,3}, {2,3,5}, {3,5,1}}) val, fun = Eigensystem(A) print("The eigenvalues are\n",val) print("The eigenfunctions are\n",fun) print("The matrix transformed to a diagonal matrix by its eigenfunctions is\n",Chop( Matrix.Conjugate(fun) * A * Matrix.Transpose(fun)) )