MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: redefine Power[A_?MatrixQ,-1]


Hi,

Power[] has the attribute Listable and this must be removed

Unprotect[Power]
ClearAttributes[Power, Listable]
Power[m_?MatrixQ, -1] /; Equal @@ Dimensions[m] := Inverse[m]
Protect[Power]

and now

In[]:=m^(-1).m

gives 
Out[]= {{1, 0}, {0, 1}}


Regards
  Jens

Cyril Fischer wrote:
> 
> Hi,
> How can I redefine Power[A_?MatrixQ,-1] := Inverse[A] ?
> 
> Issuing
> Unprotect[Power];
> Power[A_?MatrixQ,-1] := Inverse[A]
> 
> does not work.
> Thanks, Cyril


  • Prev by Date: Re: dropping higher order terms
  • Next by Date: Re: mice wheels
  • Previous by thread: Re: redefine Power[A_?MatrixQ,-1]
  • Next by thread: RE: redefine Power[A_?MatrixQ,-1]