Tetrahedral Analog of the Pythagorean Theorem

Turns out Pythagoras works in 3D too—cue shock, memes, and a PhD facepalm

TLDR: John D. Cook spotlights De Gua’s theorem—a 3D twist on Pythagoras—showing it works (almost exactly) in Python, with tiny errors explained by computer math limits. Community reaction ranges from awe to “how did I not know this?” and a playful math-versus-machine debate over precision.

Math Twitter/Reddit-style corners lit up after John D. Cook dropped De Gua’s theorem—the 3D Pythagorean: in a “right” tetrahedron, the area of the opposite face squared equals the sum of squares of the other three. Cue the collective gasp when a commenter with a PhD in high-dimensional geometry admitted they’d never heard of it. The vibe? Equal parts delight and “how did school not teach this?” with casuals saying it finally makes 3D shapes feel less scary, and pros cheering the clean elegance.

Then came the Python proof and the spicy number: not zero, but “basically zero.” The code prints a tiny negative (-9.458e-11), sparking the classic math vs machine drama. Engineers shrugged—“close enough.” Purists rolled in with the Precision Police, explaining that subtracting near-equal values nukes accuracy. The crowd loved the simple breakdown: floating point math has limits, calm down.

Cook also teases the next level: a 4D version where volumes play Pythagoras, backed by the Gram matrix (think: a table of how vectors align). Fans dubbed it “Pythagoras DLC.” Detractors? “I just learned triangles.” But the mood is upbeat—accessible math, elegant result, and a new party trick for geometry nerds.

Key Points

  • De Gua’s theorem states that for a right-angled tetrahedron, the square of the area of the face opposite the right corner equals the sum of squares of the other three face areas.
  • The theorem generalizes to higher dimensions; for a 4-simplex with a right-angled corner, the square of one tetrahedral volume equals the sum of squares of the other four.
  • The volume of a tetrahedron can be computed as V = sqrt(det(G))/6, where G is the Gram matrix of edge vectors.
  • Python examples verify the 3D and 4D identities, yielding results at or near zero, as expected.
  • Observed numerical discrepancies arise from floating-point precision limits and cancellation when subtracting nearly equal numbers.

Hottest takes

"was unaware of this lovely and quite intuitive result" — anandkulkarni
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.