18. Moore-Penrose Pseudoinverse of a Matrix example
( Enter your problem )
|
- Example `[[4,0],[3,-5]]` `("Formula " A^(+)=V Sigma^(+) U^T)`
- Example `[[1,0,1,0],[0,1,0,1]]` `("Formula " A^(+)=V Sigma^(+) U^T)`
- Example `[[4,0],[3,-5]]` `("Formula " A^(+)=A^T * (A*A^T)^(-1))`
- Example `[[1,0,1,0],[0,1,0,1]]` `("Formula " A^(+)=A^T * (A*A^T)^(-1))`
- Example `[[1,-2,3],[5,8,-1],[2,1,1],[-1,4,-3]]` `("Formula " A^(+)=(A^T*A)^(-1) * A^T)`
|
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
- Determinant by gaussian elimination
- Expanding determinant along row / column
- Determinants using montante (bareiss algorithm)
- Leibniz formula for determinant
- determinants using Sarrus Rule
- determinants using properties of determinants
- Row Space
- Column Space
- Null Space
|
|
1. Example `[[4,0],[3,-5]]` `("Formula " A^(+)=V Sigma^(+) U^T)`
1. Find Moore-Penrose Pseudoinverse ... `[[4,0],[3,-5]]`Solution:The Moore-Penrose pseudoinverse `A^(+)` is calculated from SVD (Singular Value Decomposition) of a matrix A, `A = U Sigma V^T` then Moore-Penrose pseudoinverse `A^(+)` is given by `A^(+) = V Sigma^(+) U^T` where `Sigma^(+)` is obtained by taking the reciprocal of each non-zero data on the diagonal of `Sigma`, leaving all other zeros as it is, and then taking transpose of the resultant matrix.
`U, Sigma, V` using SVD : `A = U Sigma V^T`Here we are trying to find out two solutions using `A*A'` and `A'*A` `1^"st"` Solution using `A*A'` for normalized vectors `u_i``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` `:.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-:(-24)` `R_2 larr R_2-12xx R_1` The system associated with the eigenvalue `lamda=40` `=>x_1-0.5x_2=0` `=>x_1=0.5x_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-:6` `R_2 larr R_2-12xx 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 `(0.5,1)`, Length L = `sqrt(|0.5|^2+|1|^2)=1.118` So, normalizing gives `u_1=((0.5)/(1.118),(1)/(1.118))=(0.4472,0.8944)`For Eigenvector-2 `(-2,1)`, Length L = `sqrt(|-2|^2+|1|^2)=2.2361` So, normalizing gives `u_2=((-2)/(2.2361),(1)/(2.2361))=(-0.8944,0.4472)` `2^"nd"` Solution using `A'*A` for normalized vectors `v_i``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)` `1^"st"` SVD Solution using `A*A'``:. U = ` | `[u_1,u_2]` | `=` | | `0.4472` | `-0.8944` | | | `0.8944` | `0.4472` | |
|
`:. Sigma = ` | | `sqrt(40)` | `0` | | | `0` | `sqrt(10)` | |
| `=` | |
`V` is found using formula `v_i=1/sigma_i A^T*u_i` `:. V = ` | | `0.7071` | `-0.7071` | | | `-0.7071` | `-0.7071` | |
|
`2^"nd"` SVD Solution using `A'*A``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 `1^"st"` Solution `A = U Sigma V^T``U×Sigma` | = | | `0.44721` | `-0.89443` | | | `0.89443` | `0.44721` | |
| × | |
= | | `0.44721×6.32456+(-0.89443)×0` | `0.44721×0+(-0.89443)×3.16228` | | | `0.89443×6.32456+0.44721×0` | `0.89443×0+0.44721×3.16228` | |
|
= | | `2.82841+0` | `0+(-2.82844)` | | | `5.65688+0` | `0+1.4142` | |
|
= | | `2.82841` | `-2.82844` | | | `5.65688` | `1.4142` | |
|
`(U × Sigma)×(V^T)` | = | | `2.82841` | `-2.82844` | | | `5.65688` | `1.4142` | |
| × | | `0.70709` | `-0.70709` | | | `-0.70709` | `-0.70709` | |
|
= | | `2.82841×0.70709+(-2.82844)×(-0.70709)` | `2.82841×(-0.70709)+(-2.82844)×(-0.70709)` | | | `5.65688×0.70709+1.4142×(-0.70709)` | `5.65688×(-0.70709)+1.4142×(-0.70709)` | |
|
= | | `1.99994+1.99996` | `-1.99994+1.99996` | | | `3.99992+(-0.99997)` | `-3.99992+(-0.99997)` | |
|
= | | `3.9999` | `0` | | | `2.99995` | `-4.99989` | |
|
`1^"st"` Solution is possible. `1^"st"` Solution is possible.Verify `2^"nd"` 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` | |
|
`2^"nd"` Solution is possible. `2^"nd"` Solution is possible.`:. U = ` | | `0.4472` | `-0.8944` | | | `0.8944` | `0.4472` | |
| `, E = ` | | `, V = ` | | `0.7071` | `-0.7071` | | | `-0.7071` | `-0.7071` | |
|
Now, `Sigma^(+)` is obtained by taking the reciprocal of each non-zero data on the diagonal of `Sigma`, leaving all other zeros as it is, and then taking transpose of the resultant matrix. `:. Sigma^(+) = ` | | `1/6.3246` | `0` | | | `0` | `1/3.1623` | |
| T |
| = | | = | |
Now, Moore-Penrose pseudoinverse `A^(+) = V Sigma^(+) U^T` `V×(Sigma^(+))` | = | | `0.7071` | `-0.7071` | | | `-0.7071` | `-0.7071` | |
| × | |
= | | `0.7071×0.1581+(-0.7071)×0` | `0.7071×0+(-0.7071)×0.3162` | | | `-0.7071×0.1581+(-0.7071)×0` | `-0.7071×0+(-0.7071)×0.3162` | |
|
= | | `0.1118+0` | `0+(-0.2236)` | | | `-0.1118+0` | `0+(-0.2236)` | |
|
= | | `0.1118` | `-0.2236` | | | `-0.1118` | `-0.2236` | |
|
`(V × (Sigma^(+)))×(U^T)` | = | | `0.1118` | `-0.2236` | | | `-0.1118` | `-0.2236` | |
| × | | `0.4472` | `0.8944` | | | `-0.8944` | `0.4472` | |
|
= | | `0.1118×0.4472+(-0.2236)×(-0.8944)` | `0.1118×0.8944+(-0.2236)×0.4472` | | | `-0.1118×0.4472+(-0.2236)×(-0.8944)` | `-0.1118×0.8944+(-0.2236)×0.4472` | |
|
= | | `0.05+0.2` | `0.1+(-0.1)` | | | `-0.05+0.2` | `-0.1+(-0.1)` | |
|
This material is intended as a summary. Use your textbook for detail explanation. Any bug, improvement, feedback then
|
|
|