linalg(deprecated)
innerprod
calculate the inner product
Calling Sequence
Parameters
Description
Examples
innerprod(u, A1, A2,..., An, v)
u, v
-
vectors
A[1], ..., A[n]
matrices
Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Modular][Multiply], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The function innerprod calculates the inner product of a sequence of vectors and matrices. The dimension of each matrix and vector must be compatible for multiplication in the order given.
The command with(linalg,innerprod) allows the use of the abbreviated form of this command.
with⁡linalg:
u≔vector⁡2,1,2
u≔12
v≔vector⁡3,1,2,3
v≔123
A≔matrix⁡2,3,1,1,1,2,2,2
A≔111222
innerprod⁡u,A,v
30
w≔vector⁡3,3,2,1
w≔321
innerprod⁡v,w
10
See Also
linalg(deprecated)[crossprod]
linalg(deprecated)[dotprod]
LinearAlgebra
Download Help Document