Example 3.  Hilbert matrices are known to be ill-conditioned. Consider the matrix A given by

    [Graphics:Images/InverseMatrixMod_gr_125.gif]  
    
Find the inverse of the 5×5 matrix A that approximates the inverse of the  5×5 Hilbert matrix [Graphics:Images/InverseMatrixMod_gr_126.gif].

Remark. The entries in the matrix for this exercise must be typed in by hand in order to make sure that only six decimal places are stored in the computer.

Solution 3.

 

[Graphics:../Images/InverseMatrixMod_gr_127.gif]

Form the augmented matrix [A, I] and store it in the variable AI.

[Graphics:../Images/InverseMatrixMod_gr_128.gif]


[Graphics:../Images/InverseMatrixMod_gr_129.gif]

Construct the inverse matrix using Gauss-Jordan elimination.
Remark.  All the computations are printed too !

[Graphics:../Images/InverseMatrixMod_gr_130.gif]




[Graphics:../Images/InverseMatrixMod_gr_131.gif]

[Graphics:../Images/InverseMatrixMod_gr_132.gif]

[Graphics:../Images/InverseMatrixMod_gr_133.gif]

[Graphics:../Images/InverseMatrixMod_gr_134.gif]

[Graphics:../Images/InverseMatrixMod_gr_135.gif]

[Graphics:../Images/InverseMatrixMod_gr_136.gif]

Extract the inverse matrix B. from the augmented matrix M = [I,B].

[Graphics:../Images/InverseMatrixMod_gr_137.gif]


[Graphics:../Images/InverseMatrixMod_gr_138.gif]

[Graphics:../Images/InverseMatrixMod_gr_139.gif]

Verify that B is the inverse of A.

[Graphics:../Images/InverseMatrixMod_gr_140.gif]


[Graphics:../Images/InverseMatrixMod_gr_141.gif]
[Graphics:../Images/InverseMatrixMod_gr_142.gif]

[Graphics:../Images/InverseMatrixMod_gr_143.gif]

Remark.  This is not a error, there is a problem with the matrix, it is ill-conditioned.  Mathematica's built in subroutine gets the same answer as our subroutines.

[Graphics:../Images/InverseMatrixMod_gr_144.gif]


[Graphics:../Images/InverseMatrixMod_gr_145.gif]

[Graphics:../Images/InverseMatrixMod_gr_146.gif]

Everything might appear to be working nicely, but compare the inverse of the Hilbert matrix using exact arithmetic with the inverse of the chopped Hilbert matrix

[Graphics:../Images/InverseMatrixMod_gr_147.gif]


[Graphics:../Images/InverseMatrixMod_gr_148.gif]

[Graphics:../Images/InverseMatrixMod_gr_149.gif]

Observe the difference between the computed inverse matrices when the Hilbert matrix is chopped.

[Graphics:../Images/InverseMatrixMod_gr_150.gif]


[Graphics:../Images/InverseMatrixMod_gr_151.gif]

What do you conclude regarding the propagation of error ?

The elements of  [Graphics:../Images/InverseMatrixMod_gr_152.gif] and  [Graphics:../Images/InverseMatrixMod_gr_153.gif] satisfy the relation [Graphics:../Images/InverseMatrixMod_gr_154.gif], which is easy to verify by the following calculation.

[Graphics:../Images/InverseMatrixMod_gr_155.gif]

[Graphics:../Images/InverseMatrixMod_gr_156.gif]

But the elements of  [Graphics:../Images/InverseMatrixMod_gr_157.gif] and  [Graphics:../Images/InverseMatrixMod_gr_158.gif]  differ my much more, and the largest difference is  28259.

[Graphics:../Images/InverseMatrixMod_gr_159.gif]
[Graphics:../Images/InverseMatrixMod_gr_160.gif]

So that the error is magnified by at least a factor of  [Graphics:../Images/InverseMatrixMod_gr_161.gif].

[Graphics:../Images/InverseMatrixMod_gr_162.gif]
[Graphics:../Images/InverseMatrixMod_gr_163.gif]

Would you have suspected that this could happen?

Warning.  The Hilbert matrix is a classic example of an ill-conditioned matrix which has a large condition number.  Calculations involving the Hilbert matrix and its inverse sometimes cannot be trusted.  Unless exact arithmetic is carried available.

[Graphics:../Images/InverseMatrixMod_gr_164.gif]




[Graphics:../Images/InverseMatrixMod_gr_165.gif]

[Graphics:../Images/InverseMatrixMod_gr_166.gif]

[Graphics:../Images/InverseMatrixMod_gr_167.gif]
[Graphics:../Images/InverseMatrixMod_gr_168.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004