In linear algebra, a Hilbert matrix, introduced by Hilbert (1894), is a square matrix with entries being the unit fractions
For example, this is the 5 × 5 Hilbert matrix:
The entries can also be defined by the integral
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, being notoriously difficult to use in numerical computation. For example, the 2-norm condition number of the matrix above is about 4.8×105.