Algosim documentation: InnerProduct

InnerProduct

Dot (inner, scalar) product of vectors.

Syntax

Description

If u and v are vectors of the same dimension, then InnerProduct(u, v) is their dot (inner, scalar) product. If both vectors are real, so is InnerProduct(u, v). If one or both of the vectors are complex, the complex inner product is used and the result is a complex number (typewise, that is: its imaginary part may well be zero).

Examples

u ≔ ❨1, 0, 1, 1❩/√3; a ≔ ❨1, 5, 2, 1❩;
InnerProduct(a, u)
2.30940107676	(=(4/3)⋅√3)

Notes

The dot (inner, scalar) product between u and v can also be written uv or (u|v).

The | operator is implemented by the InnerProduct function.

See also