Pythagorean Theorem


How did I not know this

Steve Linberg

How did I make it to $adulthood * 2 without knowing that our old friend, the Pythagorean Theorem (\(a^2 + b^2 = c^2\)), works in any number of dimensions?

The Euclidean distance \(d\) between the origin (\(0, 0, \dots 0\)) and a point defined by \(n\) coordinates \(x\) is just

\[d = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2}\]

Add up all of the squares and take the square root. Dope-smack for me.


If you see mistakes or want to suggest changes, please create an issue on the source repository.


Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. Source code is available at, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Linberg (2022, Feb. 2). Pythagorean Theorem. Retrieved from

BibTeX citation

  author = {Linberg, Steve},
  title = { Pythagorean Theorem},
  url = {},
  year = {2022}