linalg(deprecated)
scalarmul
multiply a matrix or vector by an expression
Calling Sequence
Parameters
Description
Examples
scalarmul(A, expr)
A
-
matrix or vector
expr
scalar expression
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.
with⁡linalg:
scalarmul⁡array⁡1,2,3,4,2
2468
scalarmul⁡array⁡1,2,3,4,3
36912
v≔vector⁡4,2,x,6,−3
v≔2x6−3
scalarmul⁡v,x
2⁢xx26⁢x−3⁢x
scalarmul⁡transpose⁡v,x
transpose⁡2⁢xx26⁢x−3⁢x
See Also
linalg(deprecated)[mulcol]
linalg(deprecated)[multiply]
LinearAlgebra
Download Help Document