Inverse of a Hilbert matrix

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.


linalg::invhilbert(n, <R>)


linalg::invhilbert(n) returns the inverse of the n×n Hilbert matrix H. The n×n Hilbert matrix H = (hi, j)1 ≤ im, 1 ≤ jn is defined by .

linalg::invhilbert uses an explicit formula for the inverse.

Note that the entries of the inverse of a Hilbert matrix are integers. But the returned matrix is defined over the standard component domain Dom::ExpressionField() so that no conversion is necessary when working with other functions that expect or return matrices over that component domain.

linalg::invhilbert(n,Dom::Integer) returns the inverse of the n×n Hilbert matrix defined over the integers.


Example 1

We compute the inverse of the 3×3 Hilbert matrix:

A := linalg::invhilbert(3)

This is a matrix of the domain Dom::Matrix().

If you prefer a different component ring, the matrix may be converted into the desired domain afterwards (see coerce, for example). Alternatively, one can specify the component ring when calling linalg::invhilbert, for example the domain Dom::Float:

A := linalg::invhilbert(3, Dom::Float)

domtype( A )



The dimension of the matrix: a positive integer


The component ring: a domain of category Cat::Rng; default: Dom::ExpressionField()

Return Values

n×n matrix of the domain Dom::Matrix(R).


Hilbert matrices of large dimension are notoriously ill-conditioned, challenging any numerical inversion scheme.

linalg::invhilbert uses the formula


for the inverse of the n×n Hilbert matrix H. All entries of are integers.


N.J. Higham, Accuracy and Stability of Numerical Algorithms, SIAM 1996

Was this topic helpful?