Linear Algebra, Python, Numpy, Matrix Decomposition, Eigenvectors.
np.array([[1,2],[1,3]]) lam = np.array([[-1,0],[0,-2]]) U array([[1, 2], [1, 3]]) from numpy.linalg import inv A = U @ lam @ inv(U) A array([[ 1., -2.], [ 3., -4.]]) As you can see, this gives us the original matrix A back. We can use the eig function from NumPy to find the eigenvalues and