Law of Cosines is the habit of generalizing the Pythagorean theorem to connect two sides and an included angle. In contest math, that habit turns a crowded setup into a relation the student can test, bound, count, or compute. MathGrit teaches it as a recognizable signal, a deliberate move, and a final translation back to the original question.
It generalizes the Pythagorean theorem: the square of one side equals the sum of the other two squares minus a correction term using the included angle.
Why It Works
1
Place $C$ at the origin with side $b = CA$ along the $x$-axis, so $A = (b, 0)$ and $B = (a\cos C, a\sin C)$.
Solve: $40\cos C = 41 - 36 = 5$, so $\cos C = \dfrac{5}{40} = \dfrac{1}{8}$.
Answer:
$\cos C = \dfrac{1}{8}$
Contest level
A triangle has sides $6$, $10$, and $14$. Determine the measure of its largest angle.
1
The largest angle is opposite the longest side, $14$. Set $c = 14$, $a = 6$, $b = 10$.
2
Law of Cosines: $14^2 = 6^2 + 10^2 - 2(6)(10)\cos C$, i.e. $196 = 36 + 100 - 120\cos C = 136 - 120\cos C$.
3
So $120\cos C = 136 - 196 = -60$, giving $\cos C = -\dfrac{1}{2}$.
4
Therefore $C = 120^\circ$ (the negative cosine signals an obtuse triangle).
Answer:
The largest angle is $120^\circ$.
Olympiad / Challenge
Prove the median-length formula: in $\triangle ABC$ the median $m_a$ from $A$ to the midpoint $M$ of $BC$ satisfies $m_a^2 = \dfrac{2b^2 + 2c^2 - a^2}{4}$, where $a = BC$, $b = CA$, $c = AB$.
1
Let $M$ be the midpoint of $BC$, so $BM = MC = \dfrac{a}{2}$. Let $\theta = \angle AMB$, so $\angle AMC = 180^\circ - \theta$ with $\cos\angle AMC = -\cos\theta$.
2
Law of Cosines in $\triangle ABM$: $c^2 = m_a^2 + \dfrac{a^2}{4} - 2\cdot m_a\cdot\dfrac{a}{2}\cos\theta = m_a^2 + \dfrac{a^2}{4} - a\,m_a\cos\theta$.
3
Law of Cosines in $\triangle ACM$: $b^2 = m_a^2 + \dfrac{a^2}{4} + a\,m_a\cos\theta$.
4
Add the two equations; the $\pm a\,m_a\cos\theta$ terms cancel: $b^2 + c^2 = 2m_a^2 + \dfrac{a^2}{2}$. Solve for $m_a^2$: $m_a^2 = \dfrac{2b^2 + 2c^2 - a^2}{4}$.
Answer:
$m_a^2 = \dfrac{2b^2 + 2c^2 - a^2}{4}$ (Apollonius' theorem; the $a = 0$ case is the parallelogram law).
Going Deeper
Generalization: the Law of Cosines is the $n = 2$ case of the more general identity $|\vec{u} - \vec{v}|^2 = |\vec{u}|^2 + |\vec{v}|^2 - 2\vec{u}\cdot\vec{v}$ — the $-2ab\cos C$ term is literally a dot product. The median formula above is just two applications glued at the supplementary angle, which is exactly the Stewart's-theorem derivation.
Where it appears: use it whenever you have two sides and the included angle (SAS, to find the third side) or all three sides (SSS, to find an angle). On AMC/AIME it is the workhorse for triangles given by lengths, and the SIGN of the cosine instantly classifies the angle as acute ($> 0$), right ($= 0$), or obtuse ($< 0$).
Pitfall: the correction term uses the angle BETWEEN the two named sides, i.e. the angle OPPOSITE the side you are solving for. Pairing $c^2$ with $\cos A$ or $\cos B$ instead of $\cos C$ is the most common slip — always match the squared side to its opposite angle.
Spot the Signal
Look for problems where the key step is generalizing the Pythagorean theorem to connect two sides and an included angle.
You can describe the hard part as generalizing the Pythagorean theorem to connect two sides and an included angle, but a direct attack starts producing clutter.
The problem rewards preserving structure instead of expanding, listing, or guessing too early.
Learn the Move
Start by identify the diagram relation that calls for law of cosines, then rewrite the givens around it.
Name the relation that makes Law of Cosines legal before doing computation.
Use the new relation to replace the messiest part of the problem with a cleaner one.
Translate the result back to the quantity the problem actually asks for.
Avoid These Traps
Do not use Law of Cosines just because the surface looks familiar; verify the required condition first.
Applying Law of Cosines because it sounds relevant, without checking the trigger first.
Stopping after spotting the technique instead of finishing the calculation or proof.
MathGrit Coach Note
Let law of cosines reveal the geometric configuration; then compute only what remains.
Try it on:
Practice a contest problem where the key step is generalizing the Pythagorean theorem to connect two sides and an included angle.