Home > Matrix & Vector calculators > Moore-Penrose Pseudoinverse of a Matrix example

18. Moore-Penrose Pseudoinverse of a Matrix example ( Enter your problem )
  1. Example `[[4,0],[3,-5]]` `("Formula " A^(+)=V Sigma^(+) U^T)`
  2. Example `[[1,0,1,0],[0,1,0,1]]` `("Formula " A^(+)=V Sigma^(+) U^T)`
  3. Example `[[4,0],[3,-5]]` `("Formula " A^(+)=A^T * (A*A^T)^(-1))`
  4. Example `[[1,0,1,0],[0,1,0,1]]` `("Formula " A^(+)=A^T * (A*A^T)^(-1))`
  5. Example `[[1,-2,3],[5,8,-1],[2,1,1],[-1,4,-3]]` `("Formula " A^(+)=(A^T*A)^(-1) * A^T)`
Other related methods
  1. Transforming matrix to Row Echelon Form (ref)
  2. Transforming matrix to Reduced Row Echelon Form (rref)
  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. Determinant by gaussian elimination
  21. Expanding determinant along row / column
  22. Determinants using montante (bareiss algorithm)
  23. Leibniz formula for determinant
  24. determinants using Sarrus Rule
  25. determinants using properties of determinants
  26. Row Space
  27. Column Space
  28. Null Space

1. Example `[[4,0],[3,-5]]` `("Formula " A^(+)=V Sigma^(+) U^T)`
(Previous example)
3. Example `[[4,0],[3,-5]]` `("Formula " A^(+)=A^T * (A*A^T)^(-1))`
(Next example)

2. Example `[[1,0,1,0],[0,1,0,1]]` `("Formula " A^(+)=V Sigma^(+) U^T)`





Find Moore-Penrose Pseudoinverse ...
`[[1,0,1,0],[0,1,0,1]]`


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`


`A = `
`1``0``1``0`
`0``1``0``1`


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'`
`A^T` = 
`1``0``1``0`
`0``1``0``1`
T
 = 
`1``0`
`0``1`
`1``0`
`0``1`


`A×(A^T)`=
`1``0``1``0`
`0``1``0``1`
×
`1``0`
`0``1`
`1``0`
`0``1`


=
`1×1+0×0+1×1+0×0``1×0+0×1+1×0+0×1`
`0×1+1×0+0×1+1×0``0×0+1×1+0×0+1×1`


=
`1+0+1+0``0+0+0+0`
`0+0+0+0``0+1+0+1`


=
`2``0`
`0``2`
`A * A' = `
`2``0`
`0``2`


Find Eigen vector for `A * A'`

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

 `(2-lamda)`  `0` 
 `0`  `(2-lamda)` 
 = 0


`:.(2-lamda) × (2-lamda) - 0 × 0=0`

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

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

`:.(lamda-2)(lamda-2)=0`

`:.(lamda-2)=0 or (lamda-2)=0`

`:.lamda=2 or lamda=2`

`:.` The eigenvalues of the matrix `A * A'` are given by `lamda=2`

1. Eigenvectors for `lamda=2`




1. Eigenvectors for `lamda=2`

`A * A'-lamdaI = `
20
02
 - `2` 
10
01


 = 
20
02
 - 
20
02

 = 
`0``0`
`0``0`


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

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


`=>`

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

`v=`
`x_1`
`x_2`


Let `x_1=1,x_2=0`

`v_1=`
`1`
`0`


Let `x_1=0,x_2=1`

`v_2=`
`0`
`1`
`v_1=`
`1`
`0`
,`v_2=`
`0`
`1`


1. Orthogonal Eigenvectors for `lamda=2`

`v_1=`
`1`
`0`
,`v_2=`
`0`
`1`


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

So, normalizing gives `u_1=((1)/(1),(0)/(1))=(1,0)`

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

So, normalizing gives `u_2=((0)/(1),(1)/(1))=(0,1)`


`2^"nd"` Solution using `A'*A` for normalized vectors `v_i`

`A' * A`
`A^T` = 
`1``0``1``0`
`0``1``0``1`
T
 = 
`1``0`
`0``1`
`1``0`
`0``1`


`(A^T)×A`=
`1``0`
`0``1`
`1``0`
`0``1`
×
`1``0``1``0`
`0``1``0``1`


=
`1×1+0×0``1×0+0×1``1×1+0×0``1×0+0×1`
`0×1+1×0``0×0+1×1``0×1+1×0``0×0+1×1`
`1×1+0×0``1×0+0×1``1×1+0×0``1×0+0×1`
`0×1+1×0``0×0+1×1``0×1+1×0``0×0+1×1`


=
`1+0``0+0``1+0``0+0`
`0+0``0+1``0+0``0+1`
`1+0``0+0``1+0``0+0`
`0+0``0+1``0+0``0+1`


=
`1``0``1``0`
`0``1``0``1`
`1``0``1``0`
`0``1``0``1`
`A' * A = `
`1``0``1``0`
`0``1``0``1`
`1``0``1``0`
`0``1``0``1`


Find Eigen vector for `A' * A`

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

 `(1-lamda)`  `0`  `1`  `0` 
 `0`  `(1-lamda)`  `0`  `1` 
 `1`  `0`  `(1-lamda)`  `0` 
 `0`  `1`  `0`  `(1-lamda)` 
 = 0


`:.(1-lamda) × |[(1-lamda),0,1],[0,(1-lamda),0],[1,0,(1-lamda)]|+0 × |[0,0,1],[1,(1-lamda),0],[0,0,(1-lamda)]|+1 × |[0,(1-lamda),1],[1,0,0],[0,1,(1-lamda)]|+0 × |[0,(1-lamda),0],[1,0,(1-lamda)],[0,1,0]|=0`

`:.(1-lamda) × (-2lamda+3lamda^2-lamda^3)+0 × (0)+1 × (2lamda-lamda^2)+0 × (0)=0`

`:.(-2lamda+5lamda^2-4lamda^3+lamda^4)+(0)+(2lamda-lamda^2)+(0)=0`

`:.(lamda^4-4lamda^3+4lamda^2)=0`

`:.lamda^2(lamda-2)(lamda-2)=0`

`:.lamda^2=0 or (lamda-2)=0 or (lamda-2)=0`

`:.lamda=0 or lamda=2 or lamda=2`

`:.` The eigenvalues of the matrix `A' * A` are given by `lamda=0,2`

1. Eigenvectors for `lamda=2`




1. Eigenvectors for `lamda=2`

`A' * A-lamdaI = `
1010
0101
1010
0101
 - `2` 
1000
0100
0010
0001


 = 
1010
0101
1010
0101
 - 
2000
0200
0020
0002

 = 
`-1``0``1``0`
`0``-1``0``1`
`1``0``-1``0`
`0``1``0``-1`


Now, reduce this matrix
`R_1 larr R_1-:(-1)`

 = 
`1``0``-1``0`
`0``-1``0``1`
`1``0``-1``0`
`0``1``0``-1`


`R_3 larr R_3- R_1`

 = 
`1``0``-1``0`
`0``-1``0``1`
`0``0``0``0`
`0``1``0``-1`


`R_2 larr R_2-:(-1)`

 = 
`1``0``-1``0`
`0``1``0``-1`
`0``0``0``0`
`0``1``0``-1`


`R_4 larr R_4- R_2`

 = 
`1``0``-1``0`
`0``1``0``-1`
`0``0``0``0`
`0``0``0``0`


The system associated with the eigenvalue `lamda=2`

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


`=>x_1-x_3=0,x_2-x_4=0`

`=>x_1=x_3,x_2=x_4`

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

`v=`
`x_3`
`x_4`
`x_3`
`x_4`


Let `x_3=1,x_4=0`

`v_1=`
`1`
`0`
`1`
`0`


Let `x_3=0,x_4=1`

`v_2=`
`0`
`1`
`0`
`1`
`v_1=`
`1`
`0`
`1`
`0`
,`v_2=`
`0`
`1`
`0`
`1`


1. Orthogonal Eigenvectors for `lamda=2`

`v_1=`
`1`
`0`
`1`
`0`
,`v_2=`
`0`
`1`
`0`
`1`


3. Eigenvectors for `lamda=0`




3. Eigenvectors for `lamda=0`

`A' * A-lamdaI = `
1010
0101
1010
0101
 - `0` 
1000
0100
0010
0001


 = 
`1``0``1``0`
`0``1``0``1`
`1``0``1``0`
`0``1``0``1`


Now, reduce this matrix
`R_3 larr R_3- R_1`

 = 
`1``0``1``0`
`0``1``0``1`
`0``0``0``0`
`0``1``0``1`


`R_4 larr R_4- R_2`

 = 
`1``0``1``0`
`0``1``0``1`
`0``0``0``0`
`0``0``0``0`


The system associated with the eigenvalue `lamda=0`

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


`=>x_1+x_3=0,x_2+x_4=0`

`=>x_1=-x_3,x_2=-x_4`

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

`v=`
`-x_3`
`-x_4`
`x_3`
`x_4`


Let `x_3=1,x_4=0`

`v_3=`
`-1`
`0`
`1`
`0`


Let `x_3=0,x_4=1`

`v_4=`
`0`
`-1`
`0`
`1`
`v_3=`
`-1`
`0`
`1`
`0`
,`v_4=`
`0`
`-1`
`0`
`1`


3. Orthogonal Eigenvectors for `lamda=0`

`v_3=`
`-1`
`0`
`1`
`0`
,`v_4=`
`0`
`-1`
`0`
`1`


For Eigenvector-1 `(1,0,1,0)`, Length L = `sqrt(|1|^2+|0|^2+|1|^2+|0|^2)=1.4142`

So, normalizing gives `v_1=((1)/(1.4142),(0)/(1.4142),(1)/(1.4142),(0)/(1.4142))=(0.7071,0,0.7071,0)`

For Eigenvector-2 `(0,1,0,1)`, Length L = `sqrt(|0|^2+|1|^2+|0|^2+|1|^2)=1.4142`

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

For Eigenvector-3 `(-1,0,1,0)`, Length L = `sqrt(|-1|^2+|0|^2+|1|^2+|0|^2)=1.4142`

So, normalizing gives `v_3=((-1)/(1.4142),(0)/(1.4142),(1)/(1.4142),(0)/(1.4142))=(-0.7071,0,0.7071,0)`

For Eigenvector-4 `(0,-1,0,1)`, Length L = `sqrt(|0|^2+|-1|^2+|0|^2+|1|^2)=1.4142`

So, normalizing gives `v_4=((0)/(1.4142),(-1)/(1.4142),(0)/(1.4142),(1)/(1.4142))=(0,-0.7071,0,0.7071)`


`1^"st"` SVD Solution using `A*A'`

`:. U = ``[u_1,u_2]``=`
`1``0`
`0``1`


`:. Sigma = `
`sqrt(2)``0``0``0`
`0``sqrt(2)``0``0`
`=`
`1.4142``0``0``0`
`0``1.4142``0``0`


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

`:. V = `
`0.7071``0``-0.7071``0`
`0``0.7071``0``-0.7071`
`0.7071``0``0.7071``0`
`0``0.7071``0``0.7071`




`2^"nd"` SVD Solution using `A'*A`

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

`:. U = `
`1``0`
`0``1`


`:. Sigma = `
`sqrt(2)``0``0``0`
`0``sqrt(2)``0``0`
`=`
`1.4142``0``0``0`
`0``1.4142``0``0`


`:. V = ``[v_1,v_2,v_3,v_4]``=`
`0.7071``0``-0.7071``0`
`0``0.7071``0``-0.7071`
`0.7071``0``0.7071``0`
`0``0.7071``0``0.7071`




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


`U×Sigma`=
`1``0`
`0``1`
×
`1.41421``0``0``0`
`0``1.41421``0``0`


=
`1×1.41421+0×0``1×0+0×1.41421``1×0+0×0``1×0+0×0`
`0×1.41421+1×0``0×0+1×1.41421``0×0+1×0``0×0+1×0`


=
`1.41421+0``0+0``0+0``0+0`
`0+0``0+1.41421``0+0``0+0`


=
`1.41421``0``0``0`
`0``1.41421``0``0`


`(U × Sigma)×(V^T)`=
`1.41421``0``0``0`
`0``1.41421``0``0`
×
`0.70711``0``0.70711``0`
`0``0.70711``0``0.70711`
`-0.70711``0``0.70711``0`
`0``-0.70711``0``0.70711`


=
`1.41421×0.70711+0×0+0×(-0.70711)+0×0``1.41421×0+0×0.70711+0×0+0×(-0.70711)``1.41421×0.70711+0×0+0×0.70711+0×0``1.41421×0+0×0.70711+0×0+0×0.70711`
`0×0.70711+1.41421×0+0×(-0.70711)+0×0``0×0+1.41421×0.70711+0×0+0×(-0.70711)``0×0.70711+1.41421×0+0×0.70711+0×0``0×0+1.41421×0.70711+0×0+0×0.70711`


=
`1+0+0+0``0+0+0+0``1+0+0+0``0+0+0+0`
`0+0+0+0``0+1+0+0``0+0+0+0``0+1+0+0`


=
`1``0``1``0`
`0``1``0``1`


`1^"st"` Solution is possible.

`1^"st"` Solution is possible.


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


`U×Sigma`=
`0.99999``0`
`0``0.99999`
×
`1.41421``0``0``0`
`0``1.41421``0``0`


=
`0.99999×1.41421+0×0``0.99999×0+0×1.41421``0.99999×0+0×0``0.99999×0+0×0`
`0×1.41421+0.99999×0``0×0+0.99999×1.41421``0×0+0.99999×0``0×0+0.99999×0`


=
`1.4142+0``0+0``0+0``0+0`
`0+0``0+1.4142``0+0``0+0`


=
`1.4142``0``0``0`
`0``1.4142``0``0`


`(U × Sigma)×(V^T)`=
`1.4142``0``0``0`
`0``1.4142``0``0`
×
`0.70711``0``0.70711``0`
`0``0.70711``0``0.70711`
`-0.70711``0``0.70711``0`
`0``-0.70711``0``0.70711`


=
`1.4142×0.70711+0×0+0×(-0.70711)+0×0``1.4142×0+0×0.70711+0×0+0×(-0.70711)``1.4142×0.70711+0×0+0×0.70711+0×0``1.4142×0+0×0.70711+0×0+0×0.70711`
`0×0.70711+1.4142×0+0×(-0.70711)+0×0``0×0+1.4142×0.70711+0×0+0×(-0.70711)``0×0.70711+1.4142×0+0×0.70711+0×0``0×0+1.4142×0.70711+0×0+0×0.70711`


=
`0.99999+0+0+0``0+0+0+0``0.99999+0+0+0``0+0+0+0`
`0+0+0+0``0+0.99999+0+0``0+0+0+0``0+0.99999+0+0`


=
`0.99999``0``0.99999``0`
`0``0.99999``0``0.99999`


`2^"nd"` Solution is possible.

`2^"nd"` Solution is possible.


`:. U = `
`1``0`
`0``1`
`, E = `
`1.4142``0``0``0`
`0``1.4142``0``0`
`, V = `
`0.7071``0``-0.7071``0`
`0``0.7071``0``-0.7071`
`0.7071``0``0.7071``0`
`0``0.7071``0``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/1.4142``0``0``0`
`0``1/1.4142``0``0`
T
=
`0.70711``0``0``0`
`0``0.70711``0``0`
T
=
`0.7071``0`
`0``0.7071`
`0``0`
`0``0`


Now, Moore-Penrose pseudoinverse `A^(+) = V Sigma^(+) U^T`

`V×(Sigma^(+))`=
`0.7071``0``-0.7071``0`
`0``0.7071``0``-0.7071`
`0.7071``0``0.7071``0`
`0``0.7071``0``0.7071`
×
`0.7071``0`
`0``0.7071`
`0``0`
`0``0`


=
`0.7071×0.7071+0×0+(-0.7071)×0+0×0``0.7071×0+0×0.7071+(-0.7071)×0+0×0`
`0×0.7071+0.7071×0+0×0+(-0.7071)×0``0×0+0.7071×0.7071+0×0+(-0.7071)×0`
`0.7071×0.7071+0×0+0.7071×0+0×0``0.7071×0+0×0.7071+0.7071×0+0×0`
`0×0.7071+0.7071×0+0×0+0.7071×0``0×0+0.7071×0.7071+0×0+0.7071×0`


=
`0.5+0+0+0``0+0+0+0`
`0+0+0+0``0+0.5+0+0`
`0.5+0+0+0``0+0+0+0`
`0+0+0+0``0+0.5+0+0`


=
`0.5``0`
`0``0.5`
`0.5``0`
`0``0.5`


`(V × (Sigma^(+)))×(U^T)`=
`0.5``0`
`0``0.5`
`0.5``0`
`0``0.5`
×
`1``0`
`0``1`


=
`0.5×1+0×0``0.5×0+0×1`
`0×1+0.5×0``0×0+0.5×1`
`0.5×1+0×0``0.5×0+0×1`
`0×1+0.5×0``0×0+0.5×1`


=
`0.5+0``0+0`
`0+0``0+0.5`
`0.5+0``0+0`
`0+0``0+0.5`


=
`0.5``0`
`0``0.5`
`0.5``0`
`0``0.5`


`:. A^(+) = `
`0.5``0`
`0``0.5`
`0.5``0`
`0``0.5`





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]]` `("Formula " A^(+)=V Sigma^(+) U^T)`
(Previous example)
3. Example `[[4,0],[3,-5]]` `("Formula " A^(+)=A^T * (A*A^T)^(-1))`
(Next example)





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

.