17. SVD - Singular Value Decomposition example
( Enter your problem )
|
- Example `[[4,0],[3,-5]]`
- Example `[[1,0,1,0],[0,1,0,1]]`
- Example `[[1,1,1],[-1,-3,-3],[2,4,4]]`
- Example `[[2,3],[4,10]]`
|
Other related methods
- Transforming matrix to Row Echelon Form
- Transforming matrix to Reduced Row Echelon Form
- Rank of matrix
- Characteristic polynomial of matrix
- Eigenvalues
- Eigenvectors (Eigenspace)
- Triangular Matrix
- LU decomposition using Gauss Elimination method of matrix
- LU decomposition using Doolittle's method of matrix
- LU decomposition using Crout's method of matrix
- Diagonal Matrix
- Cholesky Decomposition
- QR Decomposition (Gram Schmidt Method)
- QR Decomposition (Householder Method)
- LQ Decomposition
- Pivots
- Singular Value Decomposition (SVD)
- Moore-Penrose Pseudoinverse
- Power Method for dominant eigenvalue
- determinants using Sarrus Rule
- determinants using properties of determinants
- Row Space
- Column Space
- Null Space
|
|
1. Example `[[4,0],[3,-5]]`
1. Find Singular Value Decomposition (SVD) of a Matrix ... `[[4,0],[3,-5]]`
Solution:
`A * A'`= | | `4×4+0×0` | `4×3+0×-5` | | | `3×4-5×0` | `3×3-5×-5` | |
|
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 = ` | | - `40` | |
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` `=>x_1-1/2x_2=0` `=>x_1=1/2x_2` `:.` eigenvectors corresponding to the eigenvalue `lamda=40` is Let `x_2=1`
2. Eigenvectors for `lamda=10`
2. Eigenvectors for `lamda=10` `A * A'-lamdaI = ` | | - `10` | |
Now, reduce this matrix interchanging rows `R_1 harr R_2` `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` `=>x_1+2x_2=0` `=>x_1=-2x_2` `:.` eigenvectors corresponding to the eigenvalue `lamda=10` is Let `x_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`= | | `4×4+3×3` | `4×0+3×-5` | | | `0×4-5×3` | `0×0-5×-5` | |
|
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 = ` | | - `40` | |
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` `=>x_1+x_2=0` `=>x_1=-x_2` `:.` eigenvectors corresponding to the eigenvalue `lamda=40` is Let `x_2=1`
2. Eigenvectors for `lamda=10`
2. Eigenvectors for `lamda=10` `A' * A-lamdaI = ` | | - `10` | |
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` `=>x_1-x_2=0` `=>x_1=x_2` `:.` eigenvectors corresponding to the eigenvalue `lamda=10` is Let `x_2=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)` | |
| `=` | |
`:. 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)` | |
| `=` | |
`:. 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` | |
| × | |
= | | `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` | |
|
Verify `2^"nd"` Solution `A = U Sigma V^T``U×Sigma` | = | | `-0.4472` | `0.8944` | | | `-0.8944` | `-0.4472` | |
| × | |
= | | `-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` | |
|
This material is intended as a summary. Use your textbook for detail explanation. Any bug, improvement, feedback then
|
|
|