stfwn
  • Introduction
  • Calculus
    • Gradient
    • Taylor Series
    • Miscellaneous
  • Computer Science
    • Basic Architecture and Assembly
  • Fixes & Snippets
    • Docker
    • HTML
    • LaTeX
    • Linux
    • Node.js
    • Miscellaneous
  • Linear Algebra
    • Orthogonality
    • The Gram-Schmidt Process
    • QR-Factorization
    • Orthogonal Diagonalization
    • Quadratic Forms
    • Least Squares Theorem
    • Singular Value Decomposition
    • Pseudoinverse
  • Miscellaneous
    • Digital Safety
    • Homelab
    • Links
    • Music
  • Reading
Powered by GitBook
On this page
  1. Linear Algebra

Singular Value Decomposition

PreviousLeast Squares TheoremNextPseudoinverse

Last updated 6 years ago

M=UΣVTM = U \Sigma V^TM=UΣVT

Here, MMM is an m×nm \times nm×n matrix, UUU is an m×mm \times mm×m orthogonal matrix, Σ\SigmaΣ is a diagonal matrix and VVV is an n×nn \times nn×n orthogonal matrix.

The entries in the diagonal matrix Σ\SigmaΣ consist of the square roots of the non-zero eigenvalues of the matrix MTMM^T MMTM, ordered from greatest to least. They are called the Singular Values of M, denoted σ1,...,σn\sigma_1, ..., \sigma_nσ1​,...,σn​.

The columns of VVV are the normalized eigenvectors belonging to the previously mentioned eigenvalues, also ordered from greatest to least. These column vectors are called the right singular vectors of M Note: VVV should be an orthogonal matrix, so you may need to apply the Gram-Schmidt process to orthogonalize the eigenvectors.

The columns of UUU, called the left singular vectors of M, are calculated with the following formula, where v1⃗,vn⃗\vec{v_1}, \vec{v_n}v1​​,vn​​ are the column vectors of VVV:

1σ1Mv1⃗,...1σnMv2⃗\frac{1}{\sigma_1} M \vec{v_1}, ... \frac{1}{\sigma_n} M \vec{v_2}σ1​1​Mv1​​,...σn​1​Mv2​​

The columns of UUU should add up to be an orthonormal basis for RmR^mRm. If mmm > nnn, you will need to apply the Gram-Schmidt process (or insight) to complete the basis.

The SVD splits the transformation MMM into three distinct consecutive moves: a rotation (VVV), a scaling (Σ\SigmaΣ) and a final rotation (UUU).