HilbertMatrix
Returns a Hilbert matrix.
Syntax
-
HilbertMatrix(n[, m])-
nis a positive integer -
mis a positive integer
-
Description
If n and m are positive integers, then HilbertMatrix(n, m) returns the Hilbert matrix of size n×m. If omitted, m defaults to n, thus creating a square matrix.
The Hilbert matrix H has entries H[i, j] = 1/(i + j − 1).
Examples
SetNumDigits(HilbertMatrix(10), 3)
⎛ 1 0.5 0.333 0.25 0.2 0.167 0.143 0.125 0.111 0.1⎞ ⎜ 0.5 0.333 0.25 0.2 0.167 0.143 0.125 0.111 0.1 0.0909⎟ ⎜ 0.333 0.25 0.2 0.167 0.143 0.125 0.111 0.1 0.0909 0.0833⎟ ⎜ 0.25 0.2 0.167 0.143 0.125 0.111 0.1 0.0909 0.0833 0.0769⎟ ⎜ 0.2 0.167 0.143 0.125 0.111 0.1 0.0909 0.0833 0.0769 0.0714⎟ ⎜ 0.167 0.143 0.125 0.111 0.1 0.0909 0.0833 0.0769 0.0714 0.0667⎟ ⎜ 0.143 0.125 0.111 0.1 0.0909 0.0833 0.0769 0.0714 0.0667 0.0625⎟ ⎜ 0.125 0.111 0.1 0.0909 0.0833 0.0769 0.0714 0.0667 0.0625 0.0588⎟ ⎜ 0.111 0.1 0.0909 0.0833 0.0769 0.0714 0.0667 0.0625 0.0588 0.0556⎟ ⎝ 0.1 0.0909 0.0833 0.0769 0.0714 0.0667 0.0625 0.0588 0.0556 0.0526⎠
IsPositiveDefinite(ans) ∧ IsHankel(ans)
true
inv(det(HilbertMatrix(5)))
266716800000