Return the Hilbert matrix of order n.
The i,j element of a Hilbert matrix is defined as
H(i, j) = 1 / (i + j - 1)
Hilbert matrices are close to being singular which make them difficult to invert with numerical routines. Comparing the condition number of a random matrix 5x5 matrix with that of a Hilbert matrix of order 5 reveals just how difficult the problem is.
cond (rand (5)) ⇒ 14.392 cond (hilb (5)) ⇒ 4.7661e+05
See also: invhilb.
Package: octave