Re: redefine Power[A_?MatrixQ,-1]
- To: mathgroup at smc.vnet.net
- Subject: [mg32624] Re: redefine Power[A_?MatrixQ,-1]
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 1 Feb 2002 02:02:25 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <a3ap6u$48c$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
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