linalg(deprecated)/innerprod - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : linalg(deprecated)/innerprod

linalg(deprecated)

 innerprod
 calculate the inner product

 Calling Sequence innerprod(u, A1, A2,..., An, v)

Parameters

 u, v - vectors A[1], ..., A[n] - matrices

Description

 • 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.

Examples

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

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $u≔\mathrm{vector}\left(2,\left[1,2\right]\right)$
 ${u}{≔}\left[\begin{array}{cc}{1}& {2}\end{array}\right]$ (1)
 > $v≔\mathrm{vector}\left(3,\left[1,2,3\right]\right)$
 ${v}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\end{array}\right]$ (2)
 > $A≔\mathrm{matrix}\left(2,3,\left[1,1,1,2,2,2\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {1}& {1}\\ {2}& {2}& {2}\end{array}\right]$ (3)
 > $\mathrm{innerprod}\left(u,A,v\right)$
 ${30}$ (4)
 > $w≔\mathrm{vector}\left(3,\left[3,2,1\right]\right)$
 ${w}{≔}\left[\begin{array}{ccc}{3}& {2}& {1}\end{array}\right]$ (5)
 > $\mathrm{innerprod}\left(v,w\right)$
 ${10}$ (6)

 See Also