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::hilbert(n
, <R
>)
linalg::hilbert(n)
returns the n×n Hilbert
matrix H = (h_{i, 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 floatingpoint
entries:
H := linalg::hilbert(3, Dom::Float)
domtype( H )

The dimension of the matrix: a positive integer 

The component ring: a domain of category 
n×n matrix
of the domain Dom::Matrix
(R)
.
Hilbert matrices are symmetric and positive definite.
Hilbert matrices of large dimension are notoriously illconditioned
challenging any numerical inversion scheme. However, their inverse
can also be computed by a closed formula (see linalg::invhilbert
).