Algosim documentation: |

| (vertical line)

Dot (inner, scalar) product of vectors.

Syntax

Description

If u and v are vectors of the same dimension, then (u|v) is their dot (inner, scalar) product. If both vectors are real, so is (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; v ≔ ❨−1, 1, 0, 1❩/√3; w ≔ ❨0, 1, 1, −1❩/√3
a ≔ ❨1, 5, 2, 1❩;
(a|u)⋅u + (a|v)⋅v + (a|w)⋅w
 ⎛−0.333333333333⎞
 ⎜ 3.66666666667 ⎟
e⎜ 3.33333333333 ⎟
 ⎝       1       ⎠
a ≔ ❨4, 1, 2❩; b ≔ ❨1, 0, 2❩; c ≔ ❨−2, 1, −1❩;
(a | b × c)
−9

Notes

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

The | operator is implemented by the InnerProduct function.

See also