Λ = diagm([0.1, 0.2, 0.4, 0.5]) Λ * [10 0 0 0] Λ * [0 10 0 0] x = [1,1,1,1] Λ * x Λ^10 * x Λ^100 using Interact @manipulate for n = slider(0:100, value=0) y = Λ^n * x y / norm(y) end inv(Λ) X = [ 1 0 1 0 2 1 0 1 0 1 1 0 1 0 0 -1] rank(X) A = X * Λ / X A * X[:, 1] A * X[:, 2] x c = X\x A^100 * x (A^100*x) / norm(A^100*x) A^100 inv(A) X * inv(Λ) * inv(X) eigenvalues, eigenvectors = eig(A) eigenvalues eigenvectors round.(X \ eigenvectors, 5) # X⁻¹ * eigenvectors, rounded to 5 digits using PyPlot λ = linspace(0,0.6,100) plot(λ, [det(A - λ*I) for λ in λ], "r-") plot(λ, 0*λ, "k--") plot(diag(Λ),diag(Λ)*0, "bo") xlabel(L"\lambda") ylabel(L"\det(A - \lambda I)") title("characteristic polynomial")