Of course! This is an excellent and fundamental question in linear algebra. The fact that these two seemingly different formulas are equal is what makes the dot product so powerful. It provides a bridge between the world of algebra (components) and the world of geometry (angles and lengths).
Let's break down why a₁b₁ + a₂b₂ is the same as |a| |b| cos(θ).
First, a small correction to your notation for clarity:
- Vector
a = (a₁, a₂)
- Vector
b = (b₁, b₂)
- The length of
a, denoted |a|, is √(a₁² + a₂²).
- The length of
b, denoted |b|, is √(b₁² + b₂²).
The most elegant way to prove the equivalence is by using the Law of Cosines.
The Setup: The Vector Triangle
Imagine two vectors, a and b, placed tail-to-tail, starting from the origin (0,0). The angle between them is θ.
Now, let's create a triangle by drawing a third vector, c, from the head of b to the head of a.
[image: Vector Triangle] open
Based on how we add and subtract vectors, this new vector c is equal to a - b.
a = (a₁, a₂)
b = (b₁, b₂)
c = a - b = (a₁ - b₁, a₂ - b₂)
Step 1: Apply the Law of Cosines
The Law of Cosines is a generalization of the Pythagorean theorem. For any triangle with side lengths L₁, L₂, L₃, and the angle θ opposite side L₃, the law states:
L₃² = L₁² + L₂² - 2 * L₁ * L₂ * cos(θ)
In our vector triangle, the side lengths are the magnitudes (lengths) of the vectors |a|, |b|, and |c|. So, we can apply the Law of Cosines:
|c|² = |a|² + |b|² - 2 * |a| * |b| * cos(θ)
Step 2: Express the Lengths Using Components
Now, let's replace the squared magnitudes (|vector|²) with their component definitions. Remember, the squared magnitude is just the sum of the squares of the components (this avoids using square roots, making the algebra much cleaner).
|a|² = a₁² + a₂²
|b|² = b₁² + b₂²
|c|² = |a - b|² = (a₁ - b₁)² + (a₂ - b₂)²
Step 3: Substitute and Simplify
Let's substitute these component formulas back into our Law of Cosines equation.
Left Side:
|c|² = (a₁ - b₁)² + (a₂ - b₂)²
Expanding this out, we get:
|c|² = (a₁² - 2a₁b₁ + b₁²) + (a₂² - 2a₂b₂ + b₂²)
Right Side:
|a|² + |b|² - 2|a||b|cos(θ) = (a₁² + a₂²) + (b₁² + b₂²) - 2|a||b|cos(θ)
Now, let's set the expanded Left Side equal to the Right Side:
(a₁² - 2a₁b₁ + b₁²) + (a₂² - 2a₂b₂ + b₂²) = (a₁² + a₂²) + (b₁² + b₂²) - 2|a||b|cos(θ)
Look closely at this equation. We can cancel out several terms that appear on both sides:
- Cancel
a₁² from both sides.
- Cancel
a₂² from both sides.
- Cancel
b₁² from both sides.
- Cancel
b₂² from both sides.
What are we left with?
-2a₁b₁ - 2a₂b₂ = -2 |a| |b| cos(θ)
Finally, we just divide the entire equation by -2:
a₁b₁ + a₂b₂ = |a| |b| cos(θ)
And there you have it! We started with the geometric Law of Cosines and, by using the algebraic definitions of vector components and lengths, we proved that the two formulas for the dot product are identical.
Intuitive Meaning: The Idea of Projection
The formula |a| |b| cos(θ) gives us a beautiful geometric interpretation.
The term |b| cos(θ) is the scalar projection of vector b onto vector a. It's the length of the "shadow" that b casts on the line containing a.
[image: Projection] open
So, the dot product a · b can be thought of as:
The length of a multiplied by the length of the shadow of b on a.
This explains the key properties:
- If
a and b are perpendicular (θ = 90°): cos(90°) = 0. The dot product is 0. This makes perfect sense, as b casts no shadow on a.
- If
a and b are parallel (θ = 0°): cos(0°) = 1. The dot product is |a||b|. The shadow is as long as possible, equal to the full length of b.
- If
a and b point in opposite directions (θ = 180°): cos(180°) = -1. The dot product is -|a||b|. The shadow is full length but points "backwards," hence the negative sign.