Definition D1
For two plane vectors a = (a₁, a₂), b = (b₁, b₂), define a·b = a₁b₁ + a₂b₂.
Proof.
(1)This is the definition of the dot product. No angle is used in it yet.convention
(2)Addition, subtraction, and scalar multiples are also componentwise: a ± b = (a₁ ± b₁, a₂ ± b₂), ta = (ta₁, ta₂)convention
∎
Definition D2
Define the magnitude of a by |a| = √(a₁² + a₂²). For a ≠ 0, b ≠ 0, the angle θ (0° ≤ θ ≤ 180°) between the ray from the origin O to A(a₁, a₂) and the ray from O to B(b₁, b₂) is called the angle between the two vectors.
Proof.
(1)|a| equals the length OA by the distance formula.A2, convention
(2)The zero vector determines no ray, so θ is defined only when a ≠ 0 and b ≠ 0. Below, this is always assumed.convention
∎
Lemma L1
|a − b|² = |a|² + |b|² − 2(a·b)
Proof.
(1)a − b = (a₁ − b₁, a₂ − b₂)D1
(2)|a − b|² = (√((a₁−b₁)² + (a₂−b₂)²))² = (a₁−b₁)² + (a₂−b₂)²(1), D2, A3
(3)(a₁−b₁)² = a₁² − 2a₁b₁ + b₁²A4
(4)(a₂−b₂)² = a₂² − 2a₂b₂ + b₂²A4
(5)Adding the two and collecting terms gives (a₁²+a₂²) + (b₁²+b₂²) − 2(a₁b₁ + a₂b₂)(2), (3), (4), A10, A11, A12
(6)|a|² = a₁² + a₂², |b|² = b₁² + b₂², a·b = a₁b₁ + a₂b₂D1, D2, A3
(7)|a − b|² = |a|² + |b|² − 2(a·b)(5), (6), E
∎
Lemma L2
|a − b|² = |a|² + |b|² − 2|a||b| cos θ
Proof.
(1)Setting O(0, 0), A(a₁, a₂), B(b₁, b₂) gives OA = |a|, OB = |b|, AB = |a − b|D1, D2, A2
(2)If 0° < θ < 180°, then b is not a scalar multiple of a, so O, A, B are not collinear, and in triangle OAB, ∠AOB = θ.A5, D2
(3)AB² = OA² + OB² − 2·OA·OB·cos θ(2), A1
(4)|a − b|² = |a|² + |b|² − 2|a||b| cos θ(1), (3), E
(5)If θ = 0° or θ = 180°, there exists t ≠ 0 with b = ta.A5
(6)|b| = √(t²a₁² + t²a₂²) = √(t²)·√(a₁²+a₂²) = |t||a|(5), D1, D2, A7, A8, A10, A13
(7)a − b = ((1−t)a₁, (1−t)a₂), so |a − b|² = (1−t)²(a₁²+a₂²) = (1−t)²|a|²(5), D1, D2, A3, A10, A13
(8)If t > 0, then |t| = t, θ = 0°, cos θ = 1, so |a||b| cos θ = |a|(t|a|) = t|a|²(5), (6), A5, A6, A9, A11, A13
(9)If t < 0, then |t| = −t, θ = 180°, cos θ = −1, so |a||b| cos θ = |a|((−t)|a|)(−1) = t|a|²(5), (6), A5, A6, A9, A11, A13
(10)|b|² = (|t||a|)² = t²|a|², so |a|² + |b|² − 2|a||b| cos θ = |a|² + t²|a|² − 2t|a|² = (1 − 2t + t²)|a|²(6), (8), (9), A8, A10, A11, A13
(11)(1 − t)² = 1 − 2t + t², so (7) and (10) agree. Hence the equation holds in this case as well.(7), (10), A4, E
(12)In every case with 0° ≤ θ ≤ 180°, |a − b|² = |a|² + |b|² − 2|a||b| cos θ(4), (11)
∎
Theorem T
If a ≠ 0, b ≠ 0 and the angle between the two vectors is θ, then a·b = |a||b| cos θ
Proof.
(1)|a|² + |b|² − 2(a·b) = |a − b|² = |a|² + |b|² − 2|a||b| cos θL1, L2, E
(2)Subtracting |a|² + |b|² from both sides gives −2(a·b) = −2|a||b| cos θ(1), E, A11, A12
(3)−2 ≠ 0, so cancelling gives a·b = |a||b| cos θ(2), A14, A13
∎