Re: PseudoInverse for exact matrices

*To*: mathgroup at smc.vnet.net*Subject*: [mg25187] Re: PseudoInverse for exact matrices*From*: Mark Fisher <mark.fisher at atl.frb.org>*Date*: Tue, 12 Sep 2000 21:24:30 -0400 (EDT)*Organization*: Federal Reserve Bank of Atlanta*References*: <8pkk7s$m2o@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

I don't know much about pseudoinverses, but I do know that myPseudoInverse gives a result different from what Mathematica's PseudoInverse gives. (* copied from original email *) myPseudoInverse[m_List?MatrixQ /; Precision[m] === Infinity] := Module[{n = NullSpace[m]}, n = If[n === {}, {Table[0, {Length[First[m]]}]}, n]; Inverse[Transpose[m].m + Transpose[n].n].Transpose[m]]; In[69]:= p = PseudoInverse[m = {{1 + I, 1}}] Out[69]= {{1/3 - I/3}, {1/3}} In[70]:= pp = myPseudoInverse[m] Out[70]= {{3/5 - I/5}, {1/5 - (2*I)/5}} In "Further Examples" from the help listing for PseudoInverse, it says that the pseudoinverse satisfies four conditions: In[72]:= {m.p.m == m, p.m.p == p, p.m == Transpose[p.m], m.p == Transpose[m.p]} Out[72]= {True, True, False, True} In[73]:= {m.pp.m == m, pp.m.pp == pp, pp.m == Transpose[pp.m], m.pp == Transpose[m.pp]} Out[73]= {True, True, True, True} Well it appears as though Mathematica's built in PseudoInverse has failed the tests, whereas myPseudoInverse has passed. Is this a bug or have I done something wrong? -- Mark Mark Fisher Economic Advisor Research Department Federal Reserve Bank of Atlanta Atlanta, GA 30303 404-521-8757 (voice) 404-521-8810 (fax) mark.fisher at atl.frb.org personal web page: www.markfisher.net