This functionality does not run in MATLAB.
linalg::hilbert(n) returns the n×n Hilbert matrix H = (hi, j)1 ≤ i ≤ m, 1 ≤ j ≤ n defined by .
The entries of Hilbert matrices are rational numbers. Note, however, that the returned matrix is not defined over the component domain Dom::Rational, but over the standard component domain Dom::ExpressionField(). Thus, no conversion is necessary when working with other functions that expect or return matrices over that component domain.
Use linalg::hilbert(n, Dom::Rational) to define the n×n Hilbert matrix over the field of rational numbers.
We construct the 3×3 Hilbert matrix:
H := linalg::hilbert(3)
This is a matrix of the domain Dom::Matrix().
If you prefer a different component ring, the matrix may be converted to the desired domain after construction (see coerce, for example). Alternatively, one can specify the component ring when creating the Hilbert matrix. For example, specification of the domain Dom::Float generates floating-point entries:
H := linalg::hilbert(3, Dom::Float)
domtype( H )
The dimension of the matrix: a positive integer
n×n matrix of the domain Dom::Matrix(R).
Hilbert matrices are symmetric and positive definite.
Hilbert matrices of large dimension are notoriously ill-conditioned challenging any numerical inversion scheme. However, their inverse can also be computed by a closed formula (see linalg::invhilbert).