 linalg(deprecated)/dotprod - Maple Help

linalg(deprecated)

 dotprod
 Vector dot (scalar) product Calling Sequence dotprod(u, v) dotprod(u, v, 'orthogonal') Parameters

 u, v - lists of the same length or vectors of the same dimension orthogonal - (optional) assume an orthogonal vector space Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[DotProduct], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • If called with only two arguments, dotprod computes the vector dot product using the standard definition for a vector space over the complex field: sum u[i]*conjugate(v[i]), as i ranges over the length of u and v.
 • If the third argument 'orthogonal' is specified, dotprod will compute the vector dot product using the definition: sum u[i]*v[i], as i ranges over the length of u and v.
 • If u and v are real vectors, then the two forms of dotprod are equivalent.
 • The command with(linalg,dotprod) allows the use of the abbreviated form of this command. Examples

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

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $u≔\mathrm{vector}\left(\left[1,x,y\right]\right)$
 ${u}{≔}\left[\begin{array}{ccc}{1}& {x}& {y}\end{array}\right]$ (1)
 > $v≔\mathrm{vector}\left(\left[1,0,0\right]\right)$
 ${v}{≔}\left[\begin{array}{ccc}{1}& {0}& {0}\end{array}\right]$ (2)
 > $\mathrm{dotprod}\left(u,v\right)$
 ${1}$ (3)
 > $a≔\left[1,I\right];$$b≔\left[I,1\right]$
 ${a}{≔}\left[{1}{,}{I}\right]$
 ${b}{≔}\left[{I}{,}{1}\right]$ (4)
 > $\mathrm{dotprod}\left(a,b\right)$
 ${0}$ (5)
 > $\mathrm{dotprod}\left(a,b,'\mathrm{orthogonal}'\right)$
 ${2}{}{I}$ (6)