K K Singh
K K Singh
K K Singh
K K Singh
• Singular Value Decomposition
The word decomposition means , it expresses a matrix (A) as a product of three matrices (U, Σ, V)
The non-negative diagonal entries (of Σ ) are called the singular values of the matrix A, hence the
name singular value decomposition.
A = U Σ VT , U and V are orthonormal and Unitary matrix
UUT = I, VVT = I
• Each singular value σᵢ is amplifying the vectors in the vᵢ ( in Rn space) and mapping them
into the uᵢ (in Rm space).
• In SVD, the singular values are sorted as σ₁ ≥ σ₂ ≥ … ≥ σp.
• This means that a vector in the v₁ direction will be most amplified/ important vector and
mapped into the u₁ direction
• Proof
Let A = U Σ VT and AT = V Σ UT
A AV= V Σ
T 2 ATU =VΣ => ATU =b means U gives column space(A) + left null space(A)
2. Compute eigen vector u1 and u2 for at λ1= 25 and
λ 2= 9 at AAT
V=
• we can imagine v₁, v₂, …, vp as a set of axes in the n-dimensional space. And each singular
value σᵢ is amplifying the vectors vᵢ axis in the n-dimensional space and mapping them into
the uᵢ axis in the m-dimensional space.
1
Illustration of the singular value decomposition UΣV ⁎
• In summary. The movie ratings matrix maps movies to the users, The V matrix
figures out which ones are the sci-fi movies (v1) and which ones are the rom-
com movies(v2)
• Then the Σ matrix multiplies the relative importance to each genres of movies.
• The U matrix maps each genres of movies to the fans of the genres.
• The users pointed by the u₁ vector receives the sci-fi movies, and the u₂ users
the rom-com movies.
Movie Ratings Prediction with SVD
• The key point is to reconstruct the movie ratings matrix A from the
key features that SVD has detected from the matrix.
• This means that we can reconstruct the matrix A with only using the
fans of each genre, u₁ and u₂, and the importance factors, σ₁ and σ₂,
and the movies of each genre, v₁ and v₂.
We can see that the prediction matrix indeed gives high ratings to the sci-fi movies that
“User 7” has not seen before and a low rating to the unseen rom-com movie
Practical Challenges and Solutions
• The movie ratings matrix will be so much larger
• The majority of the values in the movie ratings matrix will be missing
(sparse matrix)
• Source:
https://yeunun-choo.medium.com/singular-value-decomposition-in-a-
movie-recommender-system-e3565ed42066
The Four fundamental Subspaces using SVD
• Suppose that A is a m -by- n matrix that maps vectors in Rn to vectors
in Rm
• A: Rn -> Rm
• Let r = rank(A)
polar decomposition
• In mathematics, the polar decomposition of a square real/complex matrix A
is a factorization of the form A= UP ,
where U is a unitary matrix and P is a positive semi-definite Hermitian matrix
• Intuitively, if a real (n, n) matrix A is interpreted as a linear transformation of n-
dimensional space Rn ,
• The polar decomposition separates it into a rotation or reflection U of Rn , and
a scaling of the space along a set of n orthogonal axes.
• The polar decomposition of a square matrix A always exists.
• If A is invertible, the decomposition is unique, and the factor P will be positive-definite.
• In terms of the singular value decomposition (SVD) of A as
• A=WΣV T
= (W Σ WT ) (W VT ) =(W VT) (VΣ VT )
Example