Every matrix factors as with and orthogonal and diagonal, holding the singular values . Get and the from the symmetric matrix , then build from them.
| Step | On | |
|---|---|---|
| 1 | Form the product of the transpose with A. is symmetric and its eigenvalues are never negative. | |
| 2 | Find its eigenvalues and take square roots. Order them from largest to smallest; the square roots are the singular values. | , so , |
| 3 | Find orthonormal eigenvectors for V. This is the spectral decomposition of . Keep the same order as the . | , |
| 4 | Compute each column of U from its partner in V. For each nonzero , . If needs more columns, extend to an orthonormal basis. | , |
| 5 | Assemble and check. must give back , and the squared singular values must add up to the sum of the squared entries (Frobenius norm). | , , ✓ |