NapkinCalc

Trigonometry A — Triangles & the Unit Circle

Right triangles — SOH-CAH-TOA

ELI5: in a right triangle, each acute angle is fixed by the ratio of two sides — not their size. Shrink the triangle and the ratios (hence the angle) stay put. The memory hook is SOH-CAH-TOA:

  • Sin = Opposite / Hypotenuse
  • Cos = Adjacent / Hypotenuse
  • Tan = Opposite / Adjacent

and the three sides obey the Pythagorean theorem a² + b² = c².

lega=3leg_{a} = 3 adjacent leg
legb=4leg_{b} = 4 opposite leg
hypc=lega2+legb2hyp_{c} = \sqrt{leg_{a}^{2} + leg_{b}^{2}} = 55 Pythagoras: the hypotenuse
θ=atan(legblega)\theta = \mathrm{atan}\left(\frac{leg_{b}}{leg_{a}}\right) = 0.92730.9273 angle from the tangent ratio (radians)
θdeg=θ180π\theta_{deg} = \frac{\theta \cdot 180}{\pi} = 53.130153.1301 the same angle in degrees

right(leg_a, leg_b)

34553.13°A90°B36.87°C

drawn to scale — note the right-angle mark

✓ pass abs(hypc5)<109\mathrm{abs}\left(hyp_{c} - 5\right) < 10^{-9} the famous 3-4-5 right triangle

Real-world hook: SOH-CAH-TOA is how a wheelchair ramp's angle is set from its rise and run, how surveyors turn a measured angle into a height, and how a game converts a joystick angle into x/y movement.

Try it yourself: a right triangle has legs 5 and 12. How long is the hypotenuse?

Show the answer

√(5² + 12²) = √169 = 13 (another classic triple).

hypyou=13hyp_{you} = 13 ✏️ Your turn: find the hypotenuse of a 5-12 right triangle. The check confirms hyp² = 5² + 12² — so it never just states the answer.
✓ pass abs(hypyou252+122)<109\mathrm{abs}\left(hyp_{you}^{2} - 5^{2} + 12^{2}\right) < 10^{-9} green when your hypotenuse satisfies Pythagoras