Computing the pseudo inverse of a matrix in R -
i trying compute pseudo inverse of matrix, call m, might following way:
m=matrix(c(-1,-1,1,0,0,1),nrow=2,ncol=3)
what need left inverse of matrix, such that:
m_inv_l m=i
using mass package, able find right inverse:
m_inv_r=ginv(m)
where m m_inv_r=i.
is there way compute left inverse instead of right inverse? haven't been able find answer on forum.
thanks
i don't think possible in general - you're trying solve 9 linear equations 6 values. specifically, @ top row of inverse:
-1* minv[1,1] + -1*minv[1,2] = 1 [1] 1* minv[1,1] + 0*minv[1,2] = 0 => minv[1,1]=0 [2] 0* minv[1,1] + 1*minv[1,2] = 0 => minv[1,2]=0 [3]
it should clear substituting [2] , [3] [1] produces contradiction.
Comments
Post a Comment