This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Inverse of a Hilbert matrix

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.


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?