From: "Steven Lord" <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Inversion of a matrix
Date: Thu, 18 Mar 2010 09:43:13 -0400
Organization: The MathWorks, Inc.
Lines: 36
Message-ID: <hntala$qv6$>
References: <hnrlj3$nh8$>
Reply-To: "Steven Lord" <>
X-Trace: 1268919786 27622 (18 Mar 2010 13:43:06 GMT)
NNTP-Posting-Date: Thu, 18 Mar 2010 13:43:06 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: comp.soft-sys.matlab:617892

"Matthew " <> wrote in message 
> Hi there, I am trying to invert the following matrix (please copy and 
> paste into an ordinary text document to see the rows and columns).  My 
> lecturer says it is possible using a tool which deals with sparse 
> matrices, but I can't find it anywhere.  I have had a look at other posts 
> and there are some different methods for inverting matrices but none of 
> them seem to work.

Three comments.

1) Don't invert a matrix unless you KNOW what you're doing and KNOW that you 
really, truly need the inverse.  If you're inverting a matrix A so that you 
can solve A*x = b by using x = inv(A)*b, you do NOT need the inverse.  Use 
the backslash operator instead:  x = A\b.

2) As Roger has called out, column 8 of your matrix contains all zeros; 
therefore this matrix is singular and has no inverse.

3) Assuming that this matrix were invertible, if you were to invert your 
original version of A22 and the version you created by typing in the 
elements as displayed below, you may NOT receive the same results.  By 
default, numbers in MATLAB are stored as double precision values -- that 
means roughly 16 digits of precision.  As written below, we can't tell 
whether the first element of A22 
is -0.0281000000000000, -0.0281499999999999, or something inbetween.  That 
small difference may actually have a significant impact on the inverse of 
the matrix.

Steve Lord
comp.soft-sys.matlab (CSSM) FAQ: