TwiddleLab / Math / Trig and Waves
Law of Cosines
What you will learn
- For any triangle, c² = a² + b² - 2ab cos C, where C is the angle across from c.
- At 90° cos C = 0 and the fix disappears: Pythagoras is the special case.
- c² smaller than a² + b² means C is under 90°, bigger means over 90°.
How the lesson goes
Pythagoras only works for right angles.
What happens when the angle opens up? Bet on the third side first.
Open the hinge and watch c².
The grey bar is a² + b² = 25. The blue bar is c². Three goals, then keep a hinge of your own.
Sort the triangles by c².
Each card gives sides a, b and c. Put it where c² stands against a² + b².
c² = a² + b² - 2ab cos C. When C is under 90°, cos C is positive and c² comes out smaller than a² + b². Over 90°, cos C is negative and c² comes out bigger.
This is the law of cosines.
Law of cosines: c² = a² + b² - 2ab cos C, where C is the angle between a and b, across from c.
At 90°, cos C = 0, so the fix vanishes and you get c² = a² + b². Pythagoras is the special case.
a = 5, b = 8 and C = 60°. How long is c?
c² = 5² + 8² - 2 × 5 × 8 × cos 60° = 25 + 64 - 40 = 49, so c = 7.
Make the loose stick fit.
Sticks 3 and 5 are on a hinge. Open it until the gap is exactly 7.
How does an AI know cat is closer to dog than to car?
Words become arrows. Measure the angle between both pairs and keep the more alike one.
The cosine of the angle between two arrows measures how much they point the same way. The law of cosines ties it to the gap between their tips.
Game: three holes of golf.
Each shot went off line by an angle. Work out ball to pin, set the lever and Walk.
c² = a² + b² - 2ab cos C.
Speed round: acute, right or obtuse? Your hinge from earlier is first.
Previous lesson: Law of Sines · Next lesson: Rotation with Trig · Part of the course: Trig and Waves
Lessons are interactive and need JavaScript. Turn it on to play them.