Singular value decomposition
In linear algebra, the singular value decomposition (SVD) is a factorization of a real or complex matrix into a rotation, followed by a rescaling followed by another rotation. It generalizes the eigendecomposition of a square normal matrix with an orthonormal eigenbasis to any  matrix. It is related to the polar decomposition.
Specifically, the singular value decomposition of an complex matrix  is a factorization of the form where  is an  complex unitary matrix, is an rectangular diagonal matrix with non-negative real numbers on the diagonal,  is an complex unitary matrix, and is the conjugate transpose of . Such decomposition always exists for any complex matrix. If  is real, then  and  can be guaranteed to be real orthogonal matrices; in such contexts, the SVD is often denoted
The diagonal entries of are uniquely determined by  and are known as the singular values of . The number of non-zero singular values is equal to the rank of . The columns of  and the columns of  are called left-singular vectors and right-singular vectors of , respectively. They form two sets of orthonormal bases  and  and if they are sorted so that the singular values with value zero are all in the highest-numbered columns (or rows), the singular value decomposition can be written as
where is the rank of 
The SVD is not unique. However, it is always possible to choose the decomposition such that the singular values are in descending order. In this case, (but not  and ) is uniquely determined by 
The term sometimes refers to the compact SVD, a similar decomposition  in which  is square diagonal of size  where  is the rank of  and has only the non-zero singular values. In this variant,  is an  semi-unitary matrix and is an  semi-unitary matrix, such that
Mathematical applications of the SVD include computing the pseudoinverse, matrix approximation, and determining the rank, range, and null space of a matrix. The SVD is also extremely useful in many areas of science, engineering, and statistics, such as signal processing, least squares fitting of data, and process control.