Singular value decompostion is a technique of factoring the given matrix into the product of three lower dimensional vectors.

U and V matrices are the eigenvectors of $$AA^T$$ and $$A^TA$$, and the S matrix is the diagonal matrix of positive eigenvalues of these two matrices.

U and V matrices are the eigenvectors of $$AA^T$$ and $$A^TA$$, and the S matrix is the diagonal matrix of positive eigenvalues of these two matrices.
import numpy as np
from scipy.linalg import svd
test_matrix=[[1,2,3],[4,5,6],[7,8,9]]
u,s,vt = svd(test_matrix)
s=np.diag(s)
print(u.dot(s.dot(vt)))