# Difference between revisions of "singular Value Decomposition(SVD)"

For a more in depth reference see: SVD

Any matrix $\ X$ can be decomposed into three matrices:

$\ {X}_{d \times n} = {U}_{d \times d}{S}_{d \times d}{V^T}_{d \times n}$

Where $\ S$ is a diagonal matrix and thus, has the following property:

$\ S^T = S$

And $\ U$ and $\ V$ are both orthonormal matrices and thus, have the following properties:

$\ U^TU=I$

$\ U^T=U^{-1}$

$\ V^TV=I$

$\ V^T=V^{-1}$

The $\ S, U$ and $\ V$ matrices are constructed in the following manner:

$\ S =$ eigenvalues of $\ X^TX$ = eigenvalues of $\ XX^T$

$\ U$ represents the left singular vectors of $\ X$

$\ V$ represents the right singular vectors of $\ X$

$\ U =$ eigenvectors of $\ X X^T$

$\ V =$ eigenvectors of $\ X^T X$

In MATLAB execute:

 [USV] = svd(X)