Home > Matrix & Vector calculators > SVD - Singular Value Decomposition example

17. SVD - Singular Value Decomposition example ( Enter your problem )
  1. Example [403-5]
  2. Example [10100101]
  3. Example [111-1-3-3244]
  4. Example [23410]
Other related methods
  1. Transforming matrix to Row Echelon Form
  2. Transforming matrix to Reduced Row Echelon Form
  3. Rank of matrix
  4. Characteristic polynomial of matrix
  5. Eigenvalues
  6. Eigenvectors (Eigenspace)
  7. Triangular Matrix
  8. LU decomposition using Gauss Elimination method of matrix
  9. LU decomposition using Doolittle's method of matrix
  10. LU decomposition using Crout's method of matrix
  11. Diagonal Matrix
  12. Cholesky Decomposition
  13. QR Decomposition (Gram Schmidt Method)
  14. QR Decomposition (Householder Method)
  15. LQ Decomposition
  16. Pivots
  17. Singular Value Decomposition (SVD)
  18. Moore-Penrose Pseudoinverse
  19. Power Method for dominant eigenvalue
  20. determinants using Sarrus Rule
  21. determinants using properties of determinants
  22. Row Space
  23. Column Space
  24. Null Space

1. Example [403-5]
(Previous example)
3. Example [111-1-3-3244]
(Next example)

2. Example [10100101]





Find Singular Value Decomposition (SVD) of a Matrix ...
[10100101]


Solution:
A=
1010
0101


AA
AT = 
1010
0101
T
 = 
10
01
10
01


A×(AT)=
1010
0101
×
10
01
10
01


=
1×1+0×0+1×1+0×01×0+0×1+1×0+0×1
0×1+1×0+0×1+1×00×0+1×1+0×0+1×1


=
1+0+1+00+0+0+0
0+0+0+00+1+0+1


=
20
02




AA=
20
02


Find Eigen vector for AA

|AA-λI|=0

 (2-λ)  0 
 0  (2-λ) 
 = 0


(2-λ)×(2-λ)-0×0=0

(4-4λ+λ2)-0=0

(λ2-4λ+4)=0

(λ-2)(λ-2)=0

(λ-2)=0or(λ-2)=0

The eigenvalues of the matrix A are given by λ=2,2,

1. Eigenvectors for λ=2




1. Eigenvectors for λ=2

AA-λI=
20
02
 - 2 
10
01


 = 
20
02
 - 
20
02

 = 
00
00


Now, reduce this matrix
The system associated with the eigenvalue λ=2

(AA-2I)
x1
x2
 = 
00
00
 
x1
x2
 = 
0
0




eigenvectors corresponding to the eigenvalue λ=2 is

v=
x1
x2


Let x1=1,x2=0

v1=
1
0


Let x1=0,x2=1

v2=
0
1



For Eigenvector-1 (1,0), Length L = 12+02=1

So, normalizing gives u1=(11,01)=(1,0)

For Eigenvector-2 (0,1), Length L = 02+12=1

So, normalizing gives u2=(01,11)=(0,1)



AA
AT = 
1010
0101
T
 = 
10
01
10
01


(AT)×A=
10
01
10
01
×
1010
0101


=
1×1+0×01×0+0×11×1+0×01×0+0×1
0×1+1×00×0+1×10×1+1×00×0+1×1
1×1+0×01×0+0×11×1+0×01×0+0×1
0×1+1×00×0+1×10×1+1×00×0+1×1


=
1+00+01+00+0
0+00+10+00+1
1+00+01+00+0
0+00+10+00+1


=
1010
0101
1010
0101




AA=
1010
0101
1010
0101


Find Eigen vector for AA

|AA-λI|=0

 (1-λ)  0  1  0 
 0  (1-λ)  0  1 
 1  0  (1-λ)  0 
 0  1  0  (1-λ) 
 = 0


(1-λ)×|(1-λ)010(1-λ)010(1-λ)|+0×|0011(1-λ)000(1-λ)|+1×|0(1-λ)110001(1-λ)|+0×|0(1-λ)010(1-λ)010|=0

(1-λ)×(-2λ+3λ2-λ3)+0×(0)+1×(2λ-λ2)+0×(0)=0

(-2λ+5λ2-4λ3+λ4)+0+(2λ-λ2)+0=0

(λ4-4λ3+4λ2)=0

λ2(λ-2)(λ-2)=0

λ2=0or(λ-2)=0or(λ-2)=0

The eigenvalues of the matrix A are given by λ=0,0,2,2,

1. Eigenvectors for λ=2




1. Eigenvectors for λ=2

AA-λI=
1010
0101
1010
0101
 - 2 
1000
0100
0010
0001


 = 
1010
0101
1010
0101
 - 
2000
0200
0020
0002

 = 
-1010
0-101
10-10
010-1


Now, reduce this matrix
R1R1÷-1

 = 
 1 1=-1÷-1
R1R1÷-1
 0 0=0÷-1
R1R1÷-1
 -1 -1=1÷-1
R1R1÷-1
 0 0=0÷-1
R1R1÷-1
0-101
10-10
010-1


R3R3-R1

 = 
10-10
0-101
 0 0=1-1
R3R3-R1
 0 0=0-0
R3R3-R1
 0 0=-1--1
R3R3-R1
 0 0=0-0
R3R3-R1
010-1


R2R2÷-1

 = 
10-10
 0 0=0÷-1
R2R2÷-1
 1 1=-1÷-1
R2R2÷-1
 0 0=0÷-1
R2R2÷-1
 -1 -1=1÷-1
R2R2÷-1
0000
010-1


R4R4-R2

 = 
10-10
010-1
0000
 0 0=0-0
R4R4-R2
 0 0=1-1
R4R4-R2
 0 0=0-0
R4R4-R2
 0 0=-1--1
R4R4-R2


The system associated with the eigenvalue λ=2

(AA-2I)
x1
x2
x3
x4
 = 
10-10
010-1
0000
0000
 
x1
x2
x3
x4
 = 
0
0
0
0


x1-x3=0,x2-x4=0

x1=x3,x2=x4

eigenvectors corresponding to the eigenvalue λ=2 is

v=
x3
x4
x3
x4


Let x3=1,x4=0

v1=
1
0
1
0


Let x3=0,x4=1

v2=
0
1
0
1



3. Eigenvectors for λ=0




3. Eigenvectors for λ=0

AA-λI=
1010
0101
1010
0101
 - 0 
1000
0100
0010
0001


 = 
1010
0101
1010
0101


Now, reduce this matrix
R3R3-R1

 = 
1010
0101
 0 0=1-1
R3R3-R1
 0 0=0-0
R3R3-R1
 0 0=1-1
R3R3-R1
 0 0=0-0
R3R3-R1
0101


R4R4-R2

 = 
1010
0101
0000
 0 0=0-0
R4R4-R2
 0 0=1-1
R4R4-R2
 0 0=0-0
R4R4-R2
 0 0=1-1
R4R4-R2


The system associated with the eigenvalue λ=0

(AA-0I)
x1
x2
x3
x4
 = 
1010
0101
0000
0000
 
x1
x2
x3
x4
 = 
0
0
0
0


x1+x3=0,x2+x4=0

x1=-x3,x2=-x4

eigenvectors corresponding to the eigenvalue λ=0 is

v=
-x3
-x4
x3
x4


Let x3=1,x4=0

v3=
-1
0
1
0


Let x3=0,x4=1

v4=
0
-1
0
1



For Eigenvector-1 (1,0,1,0), Length L = 12+02+12+02=1.41421

So, normalizing gives v1=(11.41421,01.41421,11.41421,01.41421)=(0.7071,0,0.7071,0)

For Eigenvector-2 (0,1,0,1), Length L = 02+12+02+12=1.41421

So, normalizing gives v2=(01.41421,11.41421,01.41421,11.41421)=(0,0.7071,0,0.7071)

For Eigenvector-3 (-1,0,1,0), Length L = (-1)2+02+12+02=1.41421

So, normalizing gives v3=(-11.41421,01.41421,11.41421,01.41421)=(-0.7071,0,0.7071,0)

For Eigenvector-4 (0,-1,0,1), Length L = 02+(-1)2+02+12=1.41421

So, normalizing gives v4=(01.41421,-11.41421,01.41421,11.41421)=(0,-0.7071,0,0.7071)

1st Solution

Σ=
sqrt(2)000
0sqrt(2)00
=
1.41421000
01.4142100


:. U = [u_1,u_2]=
10
01


V is found using formula v_i=1/sigma_i A^T*u_i

:. V =
0.707110-0.707110
00.707110-0.70711
0.7071100.707110
00.7071100.70711


Or
2^"nd" Solution

:. Sigma =
sqrt(2)000
0sqrt(2)00
=
1.41421000
01.4142100


:. V = [v_1,v_2,v_3,v_4]=
0.707110-0.707110
00.707110-0.70711
0.7071100.707110
00.7071100.70711


U is found using formula u_i=1/sigma_i A*v_i

:. U =
10
01


Verify 1^"st" Solution A = U Sigma V^T


U×Sigma=
10
01
×
1.4142000
01.414200


=
1×1.4142+0×01×0+0×1.41421×0+0×01×0+0×0
0×1.4142+1×00×0+1×1.41420×0+1×00×0+1×0


=
1.4142+00+00+00+0
0+00+1.41420+00+0


=
1.4142000
01.414200


(U × Sigma)×(V^T)=
1.4142000
01.414200
×
0.707100.70710
00.707100.7071
-0.707100.70710
0-0.707100.7071


=
1.4142×0.7071+0×0+0×-0.7071+0×01.4142×0+0×0.7071+0×0+0×-0.70711.4142×0.7071+0×0+0×0.7071+0×01.4142×0+0×0.7071+0×0+0×0.7071
0×0.7071+1.4142×0+0×-0.7071+0×00×0+1.4142×0.7071+0×0+0×-0.70710×0.7071+1.4142×0+0×0.7071+0×00×0+1.4142×0.7071+0×0+0×0.7071


=
1+0+0+00+0+0+01+0+0+00+0+0+0
0+0+0+00+1+0+00+0+0+00+1+0+0


=
1010
0101



Verify 2^"nd" Solution A = U Sigma V^T


U×Sigma=
10
01
×
1.4142000
01.414200


=
1×1.4142+0×01×0+0×1.41421×0+0×01×0+0×0
0×1.4142+1×00×0+1×1.41420×0+1×00×0+1×0


=
1.4142+00+00+00+0
0+00+1.41420+00+0


=
1.4142000
01.414200


(U × Sigma)×(V^T)=
1.4142000
01.414200
×
0.707100.70710
00.707100.7071
-0.707100.70710
0-0.707100.7071


=
1.4142×0.7071+0×0+0×-0.7071+0×01.4142×0+0×0.7071+0×0+0×-0.70711.4142×0.7071+0×0+0×0.7071+0×01.4142×0+0×0.7071+0×0+0×0.7071
0×0.7071+1.4142×0+0×-0.7071+0×00×0+1.4142×0.7071+0×0+0×-0.70710×0.7071+1.4142×0+0×0.7071+0×00×0+1.4142×0.7071+0×0+0×0.7071


=
1+0+0+00+0+0+01+0+0+00+0+0+0
0+0+0+00+1+0+00+0+0+00+1+0+0


=
1010
0101





This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here



1. Example [[4,0],[3,-5]]
(Previous example)
3. Example [[1,1,1],[-1,-3,-3],[2,4,4]]
(Next example)





Share this solution or page with your friends.
 
 
Copyright © 2025. All rights reserved. Terms, Privacy
 
 

.