The dot product is an operation that takes two vectors of the same dimension and returns a single real number (a scalar), often written with a centered dot like (\mathbf{a} \cdot \mathbf{b}).
Algebraic definition
For vectors in
their dot product is
Example in
Geometric definition
If
and
is the angle between them, then
where
is the Euclidean length (norm) of
From this, you also get
Basic calculation rules
Let
and
Then:
-
Commutativity:
-
Distributivity over addition:
-
Homogeneity (scalar multiplication in one slot):
-
Positivity:
Worked examples
- Simple 2D example
Let
Then
- 4D example
Let
Then
- Using the geometric form to find an angle
Let
Compute
So
and hence