[Date Index]
[Thread Index]
[Author Index]
Re: Re: PseudoInverse for exact matrices
*To*: mathgroup at smc.vnet.net
*Subject*: [mg25207] Re: [mg25187] Re: PseudoInverse for exact matrices
*From*: Andrzej Kozlowski <andrzej at tuins.ac.jp>
*Date*: Fri, 15 Sep 2000 02:21:44 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
I think there is a lot of confusion caused by the fact that Mathematica
implements PseudoInverse for complex matrices while most definitions refer
only to real ones. In particular Gianluca's myPseudoInverse and
mathematica's built-in PseudoInverse agree only for real matrices. For
complex matrices in the conditions defining the PseudoInverse the Transpose
of a matrix ought to be replaced by the adjoint (sometimes called Hermitian
Transpose). Thus they take the form:
{m.p.m == m, p.m.p == p, p.m == Conjugate[Transpose[p.m]],
m.p == Conjugate[ Transpose[m.p]]}
To see what hapens consider this example:
In[37]:=
p = PseudoInverse[m = {{2 + I}, {1}}]
Out[37]=
1 I 1
{{- - -, -}}
3 6 6
In[38]:=
pp = myPseudoInverse[m]
Out[38]=
3 I 1 I
{{- - -, - - -}}
8 8 8 8
now:
In[39]:=
{m.p.m == m, p.m.p == p, p.m == Conjugate[Transpose[p.m]],
m.p == Conjugate[ Transpose[m.p]]}
Out[39]=
{True, True, True, True}
In[40]:=
{m.pp.m == m, pp.m.pp == pp, pp.m == Conjugate[Transpose[pp.m]],
m.pp ==
Conjugate[Transpose[m.pp]]}
Out[40]=
{True, True, True, False}
Of course without Conjugate we get:
In[41]:=
{m.p.m == m, p.m.p == p, p.m == Transpose[p.m], m.p == Transpose[m.p]}
Out[41]=
{True, True, True, False}
In[42]:=
{m.pp.m == m, pp.m.pp == pp, pp.m == Transpose[pp.m],
m.pp ==
Transpose[m.pp]}
Out[42]=
{True, True, True, True}
For this and other reasons Gianluca's myPseudoInverse is not the appropriate
definiton for complex matrices. On the other hand computing the complex
PseudoInverse for symbolic matrices takes much longer than the real one. It
is thus clear that there is a need for a RealPseudoInverse (or an option
Real->True/False in PseudoInverse). This has already been mentioned in this
list more than once before Gianluca's message: I remember one posting by
Daniel Lichtblau and two by myself.
--
Andrzej Kozlowski
Toyama International University, JAPAN
For Mathematica related links and resources try:
<http://www.sstreams.com/Mathematica/>
on 9/13/00 10:24 AM, Mark Fisher at mark.fisher at atl.frb.org wrote:
> 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
>
Prev by Date:
**Re: Re: Mathematica 3.0 & MathReader 4.0**
Next by Date:
**Dormand-Prince Runge-Kutta**
Previous by thread:
**Re: PseudoInverse for exact matrices**
Next by thread:
**Random spherical troubles**
| |