Singular Value Decomposition: SVD
Learn one of the most important matrix decompositions, singular value decomposition.
Definition
The Singular Value Decomposition (SVD) of an matrix, , is the factorization of , multiplied by the product of three matrices:
, where the matrices and are orthogonal and the matrix, , is a
SVD in numpy
We can compute SVD of a matrix, A
, using U,S,Vt = numpy.linalg.svd(A)
, where S
is an array containing diagonal entries of and Vt
is .
The diag
function in the implementation below converts the S
array into the generalized diagonal matrix, . We’ve used the D
variable to represent in the code.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy