The dot product (also the scalar or inner product) is a map on a vector space to a scalar . Vectors are orthogonal if their dot product is zero.
Our most broadly applicable formula is:
We can also relate the angle between two vectors as follows:
We use in NumPy with np.dot(a, b)
and in MATLAB with dot(a, b)
.
Properties
The dot product is commutative and follows conjugate symmetry, i.e.,
Extensions
Some convenient inequalities:
- Cauchy-Schwarz inequality
- Triangle inequality