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

Find the inverse of the 5×5 matrix **A** that approximates
the inverse of the 5×5 Hilbert matrix .

**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.**

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

Construct the inverse matrix using Gauss-Jordan elimination.

**Remark.** All the
computations are printed too !

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

Verify that **B** is the inverse of **A**.

**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.

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

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

What do you conclude regarding the propagation of error ?

The elements of
and
satisfy the relation ,
which is easy to verify by the following calculation.

But the elements of and differ my much more, and the largest difference is 28259.

So that the error is magnified by at least a factor of .

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.

(c) John H. Mathews 2004