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.
withlinalg:
scalarmularray1,2,3,4,2
2468
scalarmularray1,2,3,4,3
36912
v≔vector4,2,x,6,−3
v≔2x6−3
scalarmulv,x
2xx26x−3x
scalarmultransposev,x
transpose2xx26x−3x
See Also
linalg(deprecated)[mulcol]
linalg(deprecated)[multiply]
LinearAlgebra
Download Help Document