MathGroup Archive 2001

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

Search the Archive

Re: matrix inversion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27125] Re: [mg27120] matrix inversion
  • From: Ken Levasseur <Kenneth_Levasseur at uml.edu>
  • Date: Sun, 4 Feb 2001 21:27:09 -0500 (EST)
  • References: <200102040758.CAA11807@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Elias:

A "random" matrix with zeros in its diagonal isn't necessarly singular.
If A is such a matrix, Inverse[A] works fine:

In[8]:=
A = Table[(i - j)Random[Integer, {-10, 10}], {i, 1, 3}, {j, 1, 3}]
Out[8]=
{{0, 1, -10}, {6, 0, 10}, {16, 6, 0}}
In[9]:=
Inverse[A]
Out[9]=
{{3/10, 3/10, -(1/20)}, {-(4/5), -(4/5), 3/10},
  {-(9/50), -(2/25), 3/100}}

If you're writing your own code, what algorithm are you using?  Assiming
it's some variationof gaussian elimination, then you should pivot in each
column about the entry with maximal absolute value (particularly if you
have real entries).  If you do this, division by zero is simply an
indication that the matrix is singular.

Ken Levasseur
Math Sciences
UMass Lowell

Elias Kyriakides wrote:

> Dear friends,
>
> I am trying to write a code regarding inversion of a square matrix. The
> problem is that the matrix has diagonal terms zero and therefore i get
> division by zero. Does anybody know how to go about this? Is there a
> certain mathematical method to use?
>
> Thanks,
> Elias



  • References:
  • Prev by Date: MATHEMATICA PROGRAM
  • Next by Date: Re: Export challenge
  • Previous by thread: matrix inversion
  • Next by thread: Re: matrix inversion