note
chas
My recollection (which may be in error) is that the Moore-Penrose inverse of <c>A</c> is: <c>(A^tA)^{-1}A^t </c> which exists
if <c>A^tA</c> is invertible (i.e. if the columns of <c>A</c> are independent.) (I'm using ^ to indicate exponenents as in TeX
source.) <c>A^tA</c> is square, and there are many existing routines
to invert a square matrix - I'm sure there are some Perl modules that do this, although you could write your own as an exercise. You indicate above that <c>A</c> and the M-P inverse are
symmetric, but I don't believe this is correct. The point of the M-P inverse is that it can be applied to non-square matrices.<br>
chas<br>
(Update: BTW, if you have a system of equations <c>Ax=b</c>
then <c>x=(A^tA)^{-1}A^tb</c> is the usual "least squares"
solution, i.e. the <c>x</c> for which <c>Ax</c> is closest to <c>b</c>.)
480010
480010