MathGroup Archive 2007

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

Search the Archive

Re: Matrix Inverse Issue

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80631] Re: [mg80556] Matrix Inverse Issue
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 26 Aug 2007 23:27:08 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

A = Table[
   If[j == i, 1 - i/10, If[j == i + 1, i/10, 0]], {i, 9}, {j, 9}];

Use Dot rather than Times

A.Inverse[A]

{{1, 0, 0, 0, 0, 0, 0, 0, 0}, 
   {0, 1, 0, 0, 0, 0, 0, 0, 0}, 
   {0, 0, 1, 0, 0, 0, 0, 0, 0}, 
   {0, 0, 0, 1, 0, 0, 0, 0, 0}, 
   {0, 0, 0, 0, 1, 0, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 1, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 1, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 1, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 1}}


Bob Hanlon

---- Brian Gladman <brg at nowhere.org> wrote: 
> I am having a problem with the matrix inverse for the following matrix in 
> Mathematica 6:
> 
> A = Table[If[j == i, 1 - i/10, If[j == i + 1, i/10, 0]], {i, 9}, {j, 9}]
> 
> {{9/10, 1/10, 0, 0, 0, 0, 0, 0, 0}, {0, 4/5, 1/5, 0, 0, 0, 0, 0,
>   0}, {0, 0, 7/10, 3/10, 0, 0, 0, 0, 0}, {0, 0, 0, 3/5, 2/5, 0, 0, 0,
>   0}, {0, 0, 0, 0, 1/2, 1/2, 0, 0, 0}, {0, 0, 0, 0, 0, 2/5, 3/5, 0,
>   0}, {0, 0, 0, 0, 0, 0, 3/10, 7/10, 0}, {0, 0, 0, 0, 0, 0, 0, 1/5, 4/
>   5}, {0, 0, 0, 0, 0, 0, 0, 0, 1/10}}
> 
> A Inverse[A]
> 
> {{1, -1/72, 0, 0, 0, 0, 0, 0, 0}, {0, 1, -1/14, 0, 0, 0, 0, 0, 0}, {0,
>    0, 1, -3/14, 0, 0, 0, 0, 0}, {0, 0, 0, 1, -8/15, 0, 0, 0, 0}, {0,
>   0, 0, 0, 1, -5/4, 0, 0, 0}, {0, 0, 0, 0, 0, 1, -3, 0, 0}, {0, 0, 0,
>   0, 0, 0, 1, -49/6, 0}, {0, 0, 0, 0, 0, 0, 0, 1, -32}, {0, 0, 0, 0,
>   0, 0, 0, 0, 1}}
> 
> I expected the identity matrix here but I get extra terms.
> 
> Am I doing something wrong?
> 
>    Brian Gladman
> 
> 



  • Prev by Date: Re: version 6 Plot3D exporting results in HUGE files
  • Next by Date: Re: BarChart inside a Frame. How to remove Labels from the top of
  • Previous by thread: Re: Matrix Inverse Issue
  • Next by thread: version 6 Plot3D exporting results in HUGE files