linalg(deprecated)
dotprod
Vector dot (scalar) product
Calling Sequence
Parameters
Description
Examples
dotprod(u, v)
dotprod(u, v, 'orthogonal')
u, v
-
lists of the same length or vectors of the same dimension
orthogonal
(optional) assume an orthogonal vector space
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.
with⁡linalg:
u≔vector⁡1,x,y
u≔1xy
v≔vector⁡1,0,0
v≔100
dotprod⁡u,v
1
a≔1,I;b≔I,1
a≔1,I
b≔I,1
dotprod⁡a,b
0
dotprod⁡a,b,orthogonal
2⁢I
See Also
evalc
linalg(deprecated)[crossprod]
linalg(deprecated)[innerprod]
LinearAlgebra
LinearAlgebra[DotProduct]
VectorCalculus[DotProduct]
Download Help Document