Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

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


  • 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]