Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# linalg::invhilbert

Inverse of a Hilbert matrix

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```linalg::invhilbert(n, <R>)
```

## Description

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.

## Examples

### 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 )`

## Parameters

 n The dimension of the matrix: a positive integer R The component ring: a domain of category Cat::Rng; default: Dom::ExpressionField()

## Return Values

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

## Algorithms

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

linalg::invhilbert uses the formula

where

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

## References

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