## bug #41454: Inaccurate/incorrect result for inverse of symmetric matrix

 Submitted by: Mattias Linde Submitted on: Tue 04 Feb 2014 11:32:42 AM UTC Category: Octave Function Severity: 3 - Normal Priority: 5 - Normal Item Group: Incorrect Result Status: None Assigned to: None Originator Name: Open/Closed: Open Release: dev Operating System: GNU/Linux

## You are not logged in

Sat 30 Jan 2016 05:59:31 AM UTC, comment #2:

I can reproduce the error, but get yet another set of answers

However, note also that I get

Perhaps the problem is just much less well conditioned than the condition number suggests. I note that the top left 145x145 block is just the identity. I assume that makes the condition number very good, despite the complexity in the remainder of the matrix. (This is where I should learn some linear algebra... Could either of you tell me the definition of the condition number?)

Lachlan Andrew <lachlan>
Mon 17 Mar 2014 08:50:57 AM UTC, comment #1:

I can reproduce that error. Anyhow, I'm confused about the small differences that occured.

Max GĂ¶rner <maxg>
Tue 04 Feb 2014 11:32:42 AM UTC, original submission:

Double precision calculations, machine epsilon at 2.2204e-16.
Input is a symmetric matrix with condition number 4.9337e+07
so at best I cant expect results with more precision than e-09.

AB = BA = Identity, where B = inverse(A)

Since A is symmetric, B should also be symmetric.

Problems I see is that:

• B is not close to symmetric.
• norm(AB-I) is 5e-1 where as norm(BA-I) is 5e-8

Problem seen in all the versions I've tested: 3.2.4,
3.6.0 and build from dev sources as of today.

Script:

Results from octave

Results from matlab 8.0:

I also tested changing from using sparse matrices, Hs = full(Hs) and that made things far worse.

Mattias Linde <linde>

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Comment:

Attached Files
file #30454:  invprecision.m added by linde (434B - text/x-objcsrc)
file #30455:  hs.mat added by linde (7KiB - application/octet-stream)

Depends on the following items: None found

Items that depend on this one: None found

Carbon-Copy List
• -unavailable- added by lachlan (Posted a comment)
• -unavailable- added by maxg (Posted a comment)
• -unavailable- added by linde (Submitted the item)
•

Do you think this task is very important?
This task has 0 encouragements so far.

Only project members can vote.

Please enter the title of George Orwell's famous dystopian book (it's a date):