 linalg(deprecated)/scalarmul - Maple Help

linalg(deprecated)

 scalarmul
 multiply a matrix or vector by an expression Calling Sequence scalarmul(A, expr) Parameters

 A - matrix or vector expr - scalar expression Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Multiply], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The call scalarmul(A, expr) returns the matrix or vector which is the result of multiplying every entry in A by the scalar value expr.
 • The command with(linalg,scalarmul) allows the use of the abbreviated form of this command. Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Multiply], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $\mathrm{scalarmul}\left(\mathrm{array}\left(\left[\left[1,2\right],\left[3,4\right]\right]\right),2\right)$
 $\left[\begin{array}{cc}{2}& {4}\\ {6}& {8}\end{array}\right]$ (1)
 > $\mathrm{scalarmul}\left(\mathrm{array}\left(\left[1,2,3,4\right]\right),3\right)$
 $\left[\begin{array}{cccc}{3}& {6}& {9}& {12}\end{array}\right]$ (2)
 > $v≔\mathrm{vector}\left(4,\left[2,x,6,-3\right]\right)$
 ${v}{≔}\left[\begin{array}{cccc}{2}& {x}& {6}& {-3}\end{array}\right]$ (3)
 > $\mathrm{scalarmul}\left(v,x\right)$
 $\left[\begin{array}{cccc}{2}{}{x}& {{x}}^{{2}}& {6}{}{x}& {-}{3}{}{x}\end{array}\right]$ (4)
 > $\mathrm{scalarmul}\left(\mathrm{transpose}\left(v\right),x\right)$
 ${\mathrm{transpose}}{}\left(\left[\begin{array}{cccc}{2}{}{x}& {{x}}^{{2}}& {6}{}{x}& {-}{3}{}{x}\end{array}\right]\right)$ (5)