I test the theorem that A = Q * Lambda * Q_inverse where Q the Matrix with the Eigenvectors and Lambda the Diagonal matrix having the Eigenvalues in the Diagonal.
My code is the following:
import numpy as np
from numpy import linalg as lg
Eigenvalues, Eigenvectors = lg.eigh(np.array([
[1, 3],
[2, 5]
]))
Lambda = np.diag(Eigenvalues)
Eigenvectors @ Lambda @ lg.inv(Eigenvectors)
Which returns :
array([[ 1., 2.],
[ 2., 5.]])
Shouldn't the returned Matrix be the same as the Original one that was decomposed?