next up previous contents
Next: Linear Least Squares Up: Tests Previous: A singular system.   Contents

The Hilbert matrix

The Hilbert matrix is defined as


and we construct such that the solution of the system has all the components equal to 1.



Write a routine that generates and for given .

Find the inverse for . What can you say about the errors in the solution? (subtract the exact solution from the numerical solution obtained).

The exact inverses are

     4    -6
    -6    12

     25        -300        1050       -1400         630
   -300        4800      -18900       26880      -12600
   1050      -18900       79380     -117600       56700
  -1400       26880     -117600      179200      -88200
    630      -12600       56700      -88200       44100

Solve the system for . What can you say about the errors in the solution? (subtract the exact solution from the numerical solution obtained).

This is an example of an ill-conditioned system.

The main program and all additional routines for this example will be submitted in a file lin_hilbert.f90.



Adrian Sandu 2001-08-26