17. SVD - Singular Value Decomposition example ( Enter your problem )
  1. Example `[[4,0],[3,-5]]`
  2. Example `[[1,0,1,0],[0,1,0,1]]`
  3. Example `[[1,1,1],[-1,-3,-3],[2,4,4]]`
  4. Example `[[2,3],[4,10]]`
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

16. Pivots
(Previous method)
2. Example `[[1,0,1,0],[0,1,0,1]]`
(Next example)

1. Example `[[4,0],[3,-5]]`





Find Singular Value Decomposition (SVD) of a Matrix ...
`[[4,0],[3,-5]]`


Solution:
`A = `
`4``0`
`3``-5`


`A * A'`
`A^T` = 
`4``0`
`3``-5`
T
 = 
`4``3`
`0``-5`


`A×(A^T)`=
`4``0`
`3``-5`
×
`4``3`
`0``-5`


=
`4×4+0×0``4×3+0×-5`
`3×4-5×0``3×3-5×-5`


=
`16+0``12+0`
`12+0``9+25`


=
`16``12`
`12``34`




`:. A * A' = `
`16``12`
`12``34`


Find Eigen vector for `A * A'`

`|A * A'-lamdaI|=0`

 `(16-lamda)`  `12` 
 `12`  `(34-lamda)` 
 = 0


`:.(16-lamda) × (34-lamda) - 12 × 12=0`

`:.(544-50lamda+lamda^2)-144=0`

`:.(lamda^2-50lamda+400)=0`

`:.(lamda-10)(lamda-40)=0`

`:.(lamda-10)=0 or(lamda-40)=0 `

`:.` The eigenvalues of the matrix A are given by `lamda=10,40`,

1. Eigenvectors for `lamda=40`




1. Eigenvectors for `lamda=40`

`A * A'-lamdaI = `
1612
1234
 - `40` 
10
01


 = 
1612
1234
 - 
400
040

 = 
`-24``12`
`12``-6`


Now, reduce this matrix
`R_1 larr R_1-:-24`

 = 
 `1` `1=-24-:-24`
`R_1 larr R_1-:-24`
 `-1/2` `-1/2=12-:-24`
`R_1 larr R_1-:-24`
`12``-6`


`R_2 larr R_2-12xx R_1`

 = 
`1``-1/2`
 `0` `0=12-12xx1`
`R_2 larr R_2-12xx R_1`
 `0` `0=-6-12xx-1/2`
`R_2 larr R_2-12xx R_1`


The system associated with the eigenvalue `lamda=40`

`(A * A'-40I)`
`x_1`
`x_2`
 = 
`1``-1/2`
`0``0`
 
`x_1`
`x_2`
 = 
`0`
`0`


`=>x_1-1/2x_2=0`

`=>x_1=1/2x_2`

`:.` eigenvectors corresponding to the eigenvalue `lamda=40` is

`v=`
`1/2x_2`
`x_2`


Let `x_2=1`

`v_1=`
`1/2`
`1`



2. Eigenvectors for `lamda=10`




2. Eigenvectors for `lamda=10`

`A * A'-lamdaI = `
1612
1234
 - `10` 
10
01


 = 
1612
1234
 - 
100
010

 = 
`6``12`
`12``24`


Now, reduce this matrix
interchanging rows `R_1 harr R_2`

 = 
`12``24`
`6``12`


`R_1 larr R_1-:12`

 = 
 `1` `1=12-:12`
`R_1 larr R_1-:12`
 `2` `2=24-:12`
`R_1 larr R_1-:12`
`6``12`


`R_2 larr R_2-6xx R_1`

 = 
`1``2`
 `0` `0=6-6xx1`
`R_2 larr R_2-6xx R_1`
 `0` `0=12-6xx2`
`R_2 larr R_2-6xx R_1`


The system associated with the eigenvalue `lamda=10`

`(A * A'-10I)`
`x_1`
`x_2`
 = 
`1``2`
`0``0`
 
`x_1`
`x_2`
 = 
`0`
`0`


`=>x_1+2x_2=0`

`=>x_1=-2x_2`

`:.` eigenvectors corresponding to the eigenvalue `lamda=10` is

`v=`
`-2x_2`
`x_2`


Let `x_2=1`

`v_2=`
`-2`
`1`



For Eigenvector-1 `(1/2,1)`, Length L = `sqrt(0.5^2+1^2)=1.11803`

So, normalizing gives `u_1=(0.5/1.11803,1/1.11803)=(0.4472,0.8944)`

For Eigenvector-2 `(-2,1)`, Length L = `sqrt((-2)^2+1^2)=2.23607`

So, normalizing gives `u_2=((-2)/2.23607,1/2.23607)=(-0.8944,0.4472)`



`A' * A`
`A^T` = 
`4``0`
`3``-5`
T
 = 
`4``3`
`0``-5`


`(A^T)×A`=
`4``3`
`0``-5`
×
`4``0`
`3``-5`


=
`4×4+3×3``4×0+3×-5`
`0×4-5×3``0×0-5×-5`


=
`16+9``0-15`
`0-15``0+25`


=
`25``-15`
`-15``25`




`:. A' * A = `
`25``-15`
`-15``25`


Find Eigen vector for `A' * A`

`|A' * A-lamdaI|=0`

 `(25-lamda)`  `-15` 
 `-15`  `(25-lamda)` 
 = 0


`:.(25-lamda) × (25-lamda) - (-15) × (-15)=0`

`:.(625-50lamda+lamda^2)-225=0`

`:.(lamda^2-50lamda+400)=0`

`:.(lamda-10)(lamda-40)=0`

`:.(lamda-10)=0 or(lamda-40)=0 `

`:.` The eigenvalues of the matrix A are given by `lamda=10,40`,

1. Eigenvectors for `lamda=40`




1. Eigenvectors for `lamda=40`

`A' * A-lamdaI = `
25-15
-1525
 - `40` 
10
01


 = 
25-15
-1525
 - 
400
040

 = 
`-15``-15`
`-15``-15`


Now, reduce this matrix
`R_1 larr R_1-:-15`

 = 
 `1` `1=-15-:-15`
`R_1 larr R_1-:-15`
 `1` `1=-15-:-15`
`R_1 larr R_1-:-15`
`-15``-15`


`R_2 larr R_2+15xx R_1`

 = 
`1``1`
 `0` `0=-15+15xx1`
`R_2 larr R_2+15xx R_1`
 `0` `0=-15+15xx1`
`R_2 larr R_2+15xx R_1`


The system associated with the eigenvalue `lamda=40`

`(A' * A-40I)`
`x_1`
`x_2`
 = 
`1``1`
`0``0`
 
`x_1`
`x_2`
 = 
`0`
`0`


`=>x_1+x_2=0`

`=>x_1=-x_2`

`:.` eigenvectors corresponding to the eigenvalue `lamda=40` is

`v=`
`-x_2`
`x_2`


Let `x_2=1`

`v_1=`
`-1`
`1`



2. Eigenvectors for `lamda=10`




2. Eigenvectors for `lamda=10`

`A' * A-lamdaI = `
25-15
-1525
 - `10` 
10
01


 = 
25-15
-1525
 - 
100
010

 = 
`15``-15`
`-15``15`


Now, reduce this matrix
`R_1 larr R_1-:15`

 = 
 `1` `1=15-:15`
`R_1 larr R_1-:15`
 `-1` `-1=-15-:15`
`R_1 larr R_1-:15`
`-15``15`


`R_2 larr R_2+15xx R_1`

 = 
`1``-1`
 `0` `0=-15+15xx1`
`R_2 larr R_2+15xx R_1`
 `0` `0=15+15xx-1`
`R_2 larr R_2+15xx R_1`


The system associated with the eigenvalue `lamda=10`

`(A' * A-10I)`
`x_1`
`x_2`
 = 
`1``-1`
`0``0`
 
`x_1`
`x_2`
 = 
`0`
`0`


`=>x_1-x_2=0`

`=>x_1=x_2`

`:.` eigenvectors corresponding to the eigenvalue `lamda=10` is

`v=`
`x_2`
`x_2`


Let `x_2=1`

`v_2=`
`1`
`1`



For Eigenvector-1 `(-1,1)`, Length L = `sqrt((-1)^2+1^2)=1.41421`

So, normalizing gives `v_1=((-1)/1.41421,1/1.41421)=(-0.7071,0.7071)`

For Eigenvector-2 `(1,1)`, Length L = `sqrt(1^2+1^2)=1.41421`

So, normalizing gives `v_2=(1/1.41421,1/1.41421)=(0.7071,0.7071)`

`1^"st"` Solution

`:. Sigma = `
`sqrt(40)``0`
`0``sqrt(10)`
`=`
`6.32456``0`
`0``3.16228`


`:. U = ``[u_1,u_2]``=`
`0.44721``-0.89443`
`0.89443``0.44721`


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

`:. V = `
`0.70711``-0.70711`
`-0.70711``-0.7071`


Or
`2^"nd"` Solution

`:. Sigma = `
`sqrt(40)``0`
`0``sqrt(10)`
`=`
`6.32456``0`
`0``3.16228`


`:. V = ``[v_1,v_2]``=`
`-0.70711``0.70711`
`0.70711``0.70711`


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

`:. U = `
`-0.44722``0.89443`
`-0.89443``-0.44722`


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


`U×Sigma`=
`0.4472``-0.8944`
`0.8944``0.4472`
×
`6.3246``0`
`0``3.1623`


=
`0.4472×6.3246-0.8944×0``0.4472×0-0.8944×3.1623`
`0.8944×6.3246+0.4472×0``0.8944×0+0.4472×3.1623`


=
`2.8284+0``0-2.8284`
`5.6569+0``0+1.4142`


=
`2.8284``-2.8284`
`5.6569``1.4142`


`(U × Sigma)×(V^T)`=
`2.8284``-2.8284`
`5.6569``1.4142`
×
`0.7071``-0.7071`
`-0.7071``-0.7071`


=
`2.8284×0.7071-2.8284×-0.7071``2.8284×-0.7071-2.8284×-0.7071`
`5.6569×0.7071+1.4142×-0.7071``5.6569×-0.7071+1.4142×-0.7071`


=
`2+2``-2+2`
`4-1``-4-1`


=
`4``0`
`3``-5`



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


`U×Sigma`=
`-0.4472``0.8944`
`-0.8944``-0.4472`
×
`6.3246``0`
`0``3.1623`


=
`-0.4472×6.3246+0.8944×0``-0.4472×0+0.8944×3.1623`
`-0.8944×6.3246-0.4472×0``-0.8944×0-0.4472×3.1623`


=
`-2.8284+0``0+2.8284`
`-5.6569+0``0-1.4142`


=
`-2.8284``2.8284`
`-5.6569``-1.4142`


`(U × Sigma)×(V^T)`=
`-2.8284``2.8284`
`-5.6569``-1.4142`
×
`-0.7071``0.7071`
`0.7071``0.7071`


=
`-2.8284×-0.7071+2.8284×0.7071``-2.8284×0.7071+2.8284×0.7071`
`-5.6569×-0.7071-1.4142×0.7071``-5.6569×0.7071-1.4142×0.7071`


=
`2+2``-2+2`
`4-1``-4-1`


=
`4``0`
`3``-5`





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



16. Pivots
(Previous method)
2. Example `[[1,0,1,0],[0,1,0,1]]`
(Next example)





Share this solution or page with your friends.


 
Copyright © 2023. All rights reserved. Terms, Privacy
 
 

.