Linear Algebra and the C Language/a03k
Become Familiar with the concept of pseudo-inverse.
In mathematics, and in particular, algebra, a generalized inverse (or, g-inverse) of an element x is an element y that has some properties of an inverse element but not necessarily all of them... Wikipedia: Generalized inverse
You have the left inverse, when the matrix is square or has more rows than columns. You have the right inverse, when the matrix is not square or has more columns than rows.
The left inverse of A: Pinv_Rn_mR(); (More Rows than columns.)
The right inverse of A: Pinv_Cn_mR(); (More Columns than rows.)
Code study
The code
The left Inverse with: inv(A_TA) A_T
You can use the inverse function and the transpose function to compute the left inverse of a matrix.
Use inv(A_TA)*A_T to calculate:
The right Inverse with: A_T inv(AA_T)
You can use the inverse function and the transpose function to compute the right inverse of a matrix.