       Re: Why does Inverse[M] hesitate?

• To: mathgroup at smc.vnet.net
• Subject: [mg54390] Re: Why does Inverse[M] hesitate?
• From: David Bailey <dave at Remove_Thisdbailey.co.uk>
• Date: Sun, 20 Feb 2005 00:07:49 -0500 (EST)
• References: <cv6t0c\$6re\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

Skirmantas wrote:
> The Inverse function sometimes calculates the inverse of a matrix
> immediately, sometimes it does not. Try this example in Mathematica
> 5.1:
>
> A={{(1-g)-1,1},{-w P(1-g)/C,-1}}//MatrixForm
> B={{0},{-P(w+1)}}//MatrixForm
>
> I get
> Out: Inverse[(expanded A)].(expanded B)
>
> If I do just
> A={{a,b},{c,d}}
> B={{e},{f}}
> Inverse[A].B
>
> I get the final correct result.
>
If you write A= <some matrix expression> //MatrixForm it displays
beautifully, but the expression assigned to A actually contains the
MatrixForm! You can check this by looking at FullForm[A].

You should write A=<some matrix expression>;
A//MatrixForm

That way the expression containing the MatrixForm gets discarded.

BTW - This example just goes to show how useful it is to include ACTUAL
CODE with a query!

David Bailey
dbaileyconsultancy.co.uk

• Prev by Date: Re: Re: Why does Inverse[M] hesitate?
• Next by Date: Re: How do I get a DSolve'd function
• Previous by thread: Re: Re: Why does Inverse[M] hesitate?
• Next by thread: Re: Re: Why does Inverse[M] hesitate?