ConstantMatrix - Maple Help

Student[LinearAlgebra]

 ConstantMatrix
 construct a constant Matrix
 ConstantVector
 construct a constant Vector

 Calling Sequence ConstantMatrix(s, r, c, options) ConstantVector[o](s, d, options)

Parameters

 s - algebraic expression; the constant value in the Matrix or Vector r - (optional) non-negative integer; row dimension of the resulting Matrix c - (optional) non-negative integer; column dimension of the resulting Matrix [o] - (optional) use either [row] or [column]; specifies the orientation of the resulting Vector d - (optional) non-negative integer; dimension of the resulting Vector options - (optional) parameters; for a complete list, see LinearAlgebra[ConstantMatrix]

Description

 • The ConstantMatrix(s, r, c) command returns an $rxc$ Matrix in which all entries have the value s.
 The ConstantMatrix(s, r) command returns an $rxr$ Matrix in which all entries have the value s.
 The ConstantMatrix(s) command returns an $0x0$ Matrix.
 • The ConstantVector(s, d) command returns a d-dimensional column Vector in which all entries have the value s.
 The ConstantVector[row](s, d) command behaves like ConstantVector(s, d) except that a row Vector is returned.  If the orientation option is omitted or if ConstantVector[column](s, d) is used, a column Vector is returned.
 If the dimension is not provided, it defaults to zero.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{LinearAlgebra}\right]\right):$
 > $\mathrm{ConstantMatrix}\left(4,5,2\right)$
 $\left[\begin{array}{cc}{4}& {4}\\ {4}& {4}\\ {4}& {4}\\ {4}& {4}\\ {4}& {4}\end{array}\right]$ (1)
 > $\mathrm{ConstantMatrix}\left(n,3\right)$
 $\left[\begin{array}{ccc}{n}& {n}& {n}\\ {n}& {n}& {n}\\ {n}& {n}& {n}\end{array}\right]$ (2)
 > $\mathrm{ConstantVector}\left[\mathrm{row}\right]\left(x,4\right)$
 $\left[\begin{array}{cccc}{x}& {x}& {x}& {x}\end{array}\right]$ (3)
 > $\mathrm{ConstantVector}\left(3,2\right)$
 $\left[\begin{array}{c}{3}\\ {3}\end{array}\right]$ (4)