# Law of cosines is equivalent to a dot product identity

In this lecture, starting at around 18:00, it's shown the dot product identity $$a^T b=||a||_2 ||b||_2 \cos \theta$$ where $\theta$ is the angle formed b/w $a,b\in \mathbb{R}^3$, is the same as the law of cosines: $$||a-b||_2^2=||a||_2^2+||b||_2^2-2||a||_2 ||b||_2 \cos \theta$$ Prof Auroux shows they are equivalent: as he says, if you believe one, then you have a pf of the other.
But I'm curious: what is the easiest way to prove one of these w/o relying on the other?

• These are not two different laws, but rather the same one. Both of them are the law of cosines. So is your question : "is there more than one way to prove the law of cosines?" – uniquesolution Oct 29 '15 at 6:58

Geometrically, the law of cosines (and the law of sines, too) is just the statement that you can split one triangle into two right triangles by drawing an altitude -- i.e., the perpendicular to a side through the opposite vertex. (Technically, I guess if your triangle is obtuse then you're splitting it into a "negative" and a "positive" triangle).

Just draw the picture, label everything, and solve. Or, if you want to see it worked out, look at the second picture and equations 10-12 below it on the MathWorld article.

From the image it follows:

$$\begin{cases} \cos(t) = \frac{x}{B} \\ x^2 + z^2 = B^2 \\ y^2 + z^2 = C^2 \\ x + y = A \end{cases}$$

Three variables ($x$, $y$, and $z$) must be eliminated between 4 equations. Eliminate $y$:

$$\begin{cases} \cos(t) = \frac{x}{B} \\ x^2 + z^2 = B^2 \\ (A - x)^2 + z^2 = C^2 \\ \end{cases}$$

$$\begin{cases} B\cos(t) = x \\ x^2 + z^2 = B^2 \\ A^2 - 2Ax + x^2 + z^2 = C^2 \\ \end{cases}$$

Eliminate $z$ :

$$\begin{cases} B\cos(t) = x \\ A^2 - 2Ax + B^2 = C^2 \\ \end{cases}$$

Eliminate $x$ :

$$A^2 - 2AB\cos(t) + B^2 = C^2$$

• You are of course relying on Pythagoras' theorem, which relies on the inner product. I don't think the question was "prove the law of cosines." – uniquesolution Oct 29 '15 at 7:26
• Pythag can be proven from triangle equivalence. From the above image, choosing $x$ to make the angle opposite of $A$ a right angle, it follows by equivalent triangles: $$\begin{cases} \frac{x}{z} = \frac{z}{y} \\ \frac{c}{x + y} = \frac{y}{c} \end{cases}$$ from which it follows that $$c^2 = z^2 + y^2$$ You don't have to use dot products. – DanielV Oct 29 '15 at 7:39