# Hilbert matrix

In linear algebra, a Hilbert matrix, introduced by Hilbert (1894), is a square matrix with entries being the unit fractions

${\displaystyle H_{ij}={\frac {1}{i+j-1}}.}$

For example, this is the 5 × 5 Hilbert matrix:

${\displaystyle H={\begin{bmatrix}1&{\frac {1}{2}}&{\frac {1}{3}}&{\frac {1}{4}}&{\frac {1}{5}}\\[4pt]{\frac {1}{2}}&{\frac {1}{3}}&{\frac {1}{4}}&{\frac {1}{5}}&{\frac {1}{6}}\\[4pt]{\frac {1}{3}}&{\frac {1}{4}}&{\frac {1}{5}}&{\frac {1}{6}}&{\frac {1}{7}}\\[4pt]{\frac {1}{4}}&{\frac {1}{5}}&{\frac {1}{6}}&{\frac {1}{7}}&{\frac {1}{8}}\\[4pt]{\frac {1}{5}}&{\frac {1}{6}}&{\frac {1}{7}}&{\frac {1}{8}}&{\frac {1}{9}}\end{bmatrix}}.}$

The Hilbert matrix can be regarded as derived from the integral

${\displaystyle H_{ij}=\int _{0}^{1}x^{i+j-2}\,dx,}$

that is, as a Gramian matrix for powers of x. It arises in the least squares approximation of arbitrary functions by polynomials.

The Hilbert matrices are canonical examples of ill-conditioned matrices, making them notoriously difficult to use in numerical computation. For example, the 2-norm condition number of the matrix above is about 4.8 · 105.

## Historical note

Hilbert (1894) introduced the Hilbert matrix to study the following question in approximation theory: "Assume that I = [a, b], is a real interval. Is it then possible to find a non-zero polynomial P with integral coefficients, such that the integral

${\displaystyle \int _{a}^{b}P(x)^{2}dx}$

is smaller than any given bound ε > 0, taken arbitrarily small?" To answer this question, Hilbert derives an exact formula for the determinant of the Hilbert matrices and investigates their asymptotics. He concludes that the answer to his question is positive if the length ba of the interval is smaller than 4.

## Properties

The Hilbert matrix is symmetric and positive definite. The Hilbert matrix is also totally positive (meaning the determinant of every submatrix is positive).

The Hilbert matrix is an example of a Hankel matrix. It is also a specific example of a Cauchy Matrix.

The determinant can be expressed in closed form, as a special case of the Cauchy determinant. The determinant of the n × n Hilbert matrix is

${\displaystyle \det(H)={{c_{n}^{\;4}} \over {c_{2n}}}}$

where

${\displaystyle c_{n}=\prod _{i=1}^{n-1}i^{n-i}=\prod _{i=1}^{n-1}i!.\,}$

Hilbert already mentioned the curious fact that the determinant of the Hilbert matrix is the reciprocal of an integer (see sequence in the OEIS) which also follows from the identity

${\displaystyle {1 \over \det(H)}={{c_{2n}} \over {c_{n}^{\;4}}}=n!\cdot \prod _{i=1}^{2n-1}{i \choose [i/2]}.}$

Using Stirling's approximation of the factorial one can establish the following asymptotic result:

${\displaystyle \det(H)=a_{n}\,n^{-1/4}(2\pi )^{n}\,4^{-n^{2}}}$

where an converges to the constant ${\displaystyle e^{1/4}2^{1/12}A^{-3}\approx 0.6450}$  as ${\displaystyle n\rightarrow \infty }$ , where A is the Glaisher–Kinkelin constant.

The inverse of the Hilbert matrix can be expressed in closed form using binomial coefficients; its entries are

${\displaystyle (H^{-1})_{ij}=(-1)^{i+j}(i+j-1){n+i-1 \choose n-j}{n+j-1 \choose n-i}{i+j-2 \choose i-1}^{2}}$

where n is the order of the matrix.[1] It follows that the entries of the inverse matrix are all integer.

The condition number of the n-by-n Hilbert matrix grows as ${\displaystyle O((1+{\sqrt {2}})^{4n}/{\sqrt {n}})}$ .

## References

1. ^ Choi, Man-Duen (1983). "Tricks or Treats with the Hilbert Matrix". The American Mathematical Monthly. 90 (5): 301–312. doi:10.2307/2975779. JSTOR 2975779.