 LinearAlgebra - Maple Programming Help

Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Constructors : LinearAlgebra/HilbertMatrix

LinearAlgebra

 HilbertMatrix
 construct a generalized Hilbert Matrix

 Calling Sequence HilbertMatrix(r, c, s, cpt, options)

Parameters

 r - (optional) non-negative integer; row dimension of the resulting Matrix c - (optional) non-negative integer; column dimension of the resulting Matrix s - (optional) algebraic expression cpt - (optional) equation of the form compact=true or false; selects the compact form of the output options - (optional); constructor options for the result object

Description

 • The HilbertMatrix() function returns a generalized Hilbert Matrix.
 • If H := HilbertMatrix(r, c, s), then H is an r x c Matrix with entries H[i, j] = 1/(i+j-s).
 • If the row dimension is not provided, it defaults to zero.  If the column dimension is not provided, it defaults to the row dimension.
 • If s is not specified in the calling sequence, then s = 1 is used.
 • If the compact option (cpt) is included in the calling sequence as just the symbol compact or in the form compact=true, then the result is built by using a shape function designed to minimize storage.  If the option is omitted or entered as compact=false, a full rectangular Matrix is constructed.  Generally, if space is not a consideration, the full rectangular form (the default) is more efficient.
 Note:  If the compact form is selected, any datatype specification in the constructor options is silently ignored.  The datatype of any data retrieved from the constructed Matrix is determined by the data used to build the Matrix.
 • The constructor options provide additional information (readonly, shape, storage, order, datatype, and attributes) to the Matrix constructor that builds the result. These options may also be provided in the form outputoptions=[...], where [...] represents a Maple list.  If a constructor option is provided in both the calling sequence directly and in an outputoptions option, the latter takes precedence (regardless of the order).
 • This function is part of the LinearAlgebra package, and so it can be used in the form HilbertMatrix(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[HilbertMatrix](..).

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $\mathrm{HilbertMatrix}\left(4\right)$
 $\left[\begin{array}{cccc}{1}& \frac{{1}}{{2}}& \frac{{1}}{{3}}& \frac{{1}}{{4}}\\ \frac{{1}}{{2}}& \frac{{1}}{{3}}& \frac{{1}}{{4}}& \frac{{1}}{{5}}\\ \frac{{1}}{{3}}& \frac{{1}}{{4}}& \frac{{1}}{{5}}& \frac{{1}}{{6}}\\ \frac{{1}}{{4}}& \frac{{1}}{{5}}& \frac{{1}}{{6}}& \frac{{1}}{{7}}\end{array}\right]$ (1)
 > $\mathrm{HilbertMatrix}\left(3,5,x\right)$
 $\left[\begin{array}{ccccc}\frac{{1}}{{2}{-}{x}}& \frac{{1}}{{3}{-}{x}}& \frac{{1}}{{4}{-}{x}}& \frac{{1}}{{5}{-}{x}}& \frac{{1}}{{6}{-}{x}}\\ \frac{{1}}{{3}{-}{x}}& \frac{{1}}{{4}{-}{x}}& \frac{{1}}{{5}{-}{x}}& \frac{{1}}{{6}{-}{x}}& \frac{{1}}{{7}{-}{x}}\\ \frac{{1}}{{4}{-}{x}}& \frac{{1}}{{5}{-}{x}}& \frac{{1}}{{6}{-}{x}}& \frac{{1}}{{7}{-}{x}}& \frac{{1}}{{8}{-}{x}}\end{array}\right]$ (2)