Pythagorean addition trick simplifies sqrt(a²+b²) mentally with 3% error
Estimate square root of squares instantly using alpha-max plus beta-min algorithm.
A LessWrong post by kqr introduces a mental math hack for the Pythagorean sum sqrt(x²+y²), which appears everywhere from geometry to statistics and physics. Instead of squaring numbers (which grow large) and extracting square roots, kqr suggests treating the operation as a fundamental composite (⊞) and learning a fast approximation: the alpha-max plus beta-min algorithm. For two nonnegative numbers with the larger called 'a' and the smaller 'b', compute 0.9*a + 0.5*b. That simple formula yields sqrt(a²+b²) with a maximum error of 3% and an average error of just 1.5%.
The post provides a concrete example: combining the within-group standard deviation of height (7 cm) with the between-gender variation (6 cm) gives total variation roughly sqrt(7²+6²) ≈ 0.9*7 + 0.5*6 = 6.3 + 3 = 9.3 cm. (Actual value: ~9.22 cm.) The approximation is also easy to invert—given the total and one component, subtract to recover the other. Kqr references a 1981 IBM paper for the technical details but notes that iterative algorithms are not suitable for mental arithmetic. This technique empowers quick, on-the-fly estimation for engineers, data scientists, and anyone who deals with combined uncertainties or distances.
- Algorithm: given larger a and smaller b, compute 0.9a + 0.5b to approximate sqrt(a²+b²).
- Maximum error is 3%, average error is 1.5%—remarkably accurate for mental math.
- Useful for adding standard deviations in statistics or computing radii in geometry without squares.
Why It Matters
Enables quick mental calculation of combined uncertainties and geometric distances without squaring or square roots.