2

How can I calculate the pseudoinverse for an arbitary mxn- matrix in PARI/GP ? Is there a simple way, or do I have to program the process completely ?

Peter
  • 214
  • 1
  • 10

2 Answers2

1

Jörg Arndt has written code for the (Moore-Penrose) pseudoinverse here:

http://www.jjj.de/pari/

where it appears under matsvd.gpi.

In the simple (but common) case where the matrix has full column rank, you can compute it as

pseudoinverse(M) = my(ct=conj(M)~); (ct*M)^-1 * ct;
Charles
  • 11,269
  • 13
  • 67
  • 105
0

I suppose you mean the Moore-Penrose pseudoinverse?

The tutorial and the manual for Pari/GP do not mention pseudoinverse, so you'll probably have to code your own solution.

The Wikipedia entry may help.You could also find algorithms in good advanced Linear Algebra books, as for example Jonathan Golan's The Linear Algebra a Beginning Graduate Student Ought to Know.

Jay
  • 9,585
  • 6
  • 49
  • 72