|
|
Code is changed on 22.07.2025, Now it also works for Complex Number.
For wrong or incomplete solution, please submit the feedback form.
So, I will try my best to improve it soon.
|
|
|
|
Solution
|
Solution provided by AtoZmath.com
|
|
SVD - Singular Value Decomposition calculator
|
1. `[[8,-6,2],[-6,7,-4],[2,-4,3]]`
2. `[[6,-2,2],[-2,3,-1],[2,-1,3]]`
3. `[[3,2,4],[2,0,2],[4,2,3]]`
4. `[[1,1,1],[-1,-3,-3],[2,4,4]]`
5. `[[2,3],[4,10]]`
6. `[[5,1],[4,2]]`
|
Example1. Find SVD - Singular Value Decomposition ... `[[4,0],[3,-5]]`Solution:
`A' * A`= | | `4×4+3×3` | `4×0+3×(-5)` | | | `0×4+(-5)×3` | `0×0+(-5)×(-5)` | |
|
= | | `16+9` | `0+(-15)` | | | `0+(-15)` | `0+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` `:.lamda=10 or lamda=40` `:.` The eigenvalues of the matrix `A' * 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)` `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` `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.4142` So, normalizing gives `v_1=((-1)/(1.4142),(1)/(1.4142))=(-0.7071,0.7071)`For Eigenvector-2 `(1,1)`, Length L = `sqrt(|1|^2+|1|^2)=1.4142` So, normalizing gives `v_2=((1)/(1.4142),(1)/(1.4142))=(0.7071,0.7071)`Solution `U` is found using formula `u_i=1/sigma_i A*v_i` `:. U = ` | | `-0.4472` | `0.8944` | | | `-0.8944` | `-0.4472` | |
|
`:. Sigma = ` | | `sqrt(40)` | `0` | | | `0` | `sqrt(10)` | |
| `=` | |
`:. V = ` | `[v_1,v_2]` | `=` | | `-0.7071` | `0.7071` | | | `0.7071` | `0.7071` | |
|
Verify Solution `A = U Sigma V^T``U×Sigma` | = | | `-0.44721` | `0.89442` | | | `-0.89442` | `-0.44721` | |
| × | |
= | | `-0.44721×6.32456+0.89442×0` | `-0.44721×0+0.89442×3.16228` | | | `-0.89442×6.32456+(-0.44721)×0` | `-0.89442×0+(-0.44721)×3.16228` | |
|
= | | `-2.82841+0` | `0+2.82841` | | | `-5.65681+0` | `0+(-1.4142)` | |
|
= | | `-2.82841` | `2.82841` | | | `-5.65681` | `-1.4142` | |
|
`(U × Sigma)×(V^T)` | = | | `-2.82841` | `2.82841` | | | `-5.65681` | `-1.4142` | |
| × | | `-0.70711` | `0.70711` | | | `0.70711` | `0.70711` | |
|
= | | `-2.82841×(-0.70711)+2.82841×0.70711` | `-2.82841×0.70711+2.82841×0.70711` | | | `-5.65681×(-0.70711)+(-1.4142)×0.70711` | `-5.65681×0.70711+(-1.4142)×0.70711` | |
|
= | | `1.99999+1.99999` | `-1.99999+1.99999` | | | `3.99999+(-1)` | `-3.99999+(-1)` | |
|
= | | `3.99999` | `0` | | | `2.99999` | `-4.99999` | |
|
Solution is possible. Solution is possible.
|
|
|
|
|