DotProduct - Maple Help

ListTools

 DotProduct
 compute the dot product of two lists

 Calling Sequence DotProduct(L1, L2)

Parameters

 L1, L2 - lists

Description

 • The DotProduct(L1, L2) calling sequence computes the real dot product of two lists, L1 and L2, where both lists have equal length.
 • To find the inner product, use DotProduct(L1, map(conjugate, L2)).

Examples

 > $\mathrm{with}\left(\mathrm{ListTools}\right):$
 > $L≔\left[0.,0.84,0.91,0.14,-0.76,-0.96,-0.28,0.66,0.99,0.41,-0.54\right]$
 ${L}{≔}\left[{0.}{,}{0.84}{,}{0.91}{,}{0.14}{,}{-0.76}{,}{-0.96}{,}{-0.28}{,}{0.66}{,}{0.99}{,}{0.41}{,}{-0.54}\right]$ (1)
 > $M≔\left[1.,0.54,-0.42,-0.99,-0.65,0.28,0.96,0.75,-0.15,-0.91,-0.84\right]$
 ${M}{≔}\left[{1.}{,}{0.54}{,}{-0.42}{,}{-0.99}{,}{-0.65}{,}{0.28}{,}{0.96}{,}{0.75}{,}{-0.15}{,}{-0.91}{,}{-0.84}\right]$ (2)
 > $\mathrm{DotProduct}\left(L,L\right)$
 ${5.0063}$ (3)
 > $\mathrm{DotProduct}\left(L,M\right)$
 ${0.3162}$ (4)