Pythagoras' theorem in higher dimensions Does Pythagoras' theorem follow same pattern in higher dimensions as in 2D,3D
Is this true in 4D?
$$a^2+b^2+c^2+d^2=f^2$$
for any real value of $a$, $b$, $c$, $d$, $f$.
 A: Yes, this is the definition of Euclidean distance.
The distance between two $n$-dimensional vectors $\boldsymbol{a} = \langle a_1, a_2, \ldots, a_n \rangle$ and $\boldsymbol{b} = \langle b_1, b_2, \ldots, b_n \rangle$ is defined as as:
$$ D(\boldsymbol{a}, \boldsymbol{b}) = \sqrt{ \sum_{i=1}^n (a_i-b_i)^2 } $$
If you don’t know sigma notation, this just means $\displaystyle \sqrt{(a_1-b_1)^2 + (a_2-b_2)^2 + \cdots + (a_n-b_n)^2}$.
If you let $\boldsymbol{d} = \boldsymbol{a} - \boldsymbol{b} = \langle a_1-b_1, a_2-b_2, \ldots, a_n-b_n \rangle $ and let $d_i = a_i-b_i$, then:
$$ D(\boldsymbol{a}, \boldsymbol{b}) = \sqrt{ \sum_{i=1}^n d_i^2 } = \sqrt{d_1^2 + d_2^2 + \cdots + d_n^2} $$
In this case, $d_i$ basically represents the side length of the right triangle between the points $\boldsymbol{a}$ and $\boldsymbol{b}$ in the $i$th dimension. You can see that it’s basically an extended version of the Pythagorean formula.
This extended Pythagorean formula is actually pretty intuitive (even though it’s extremely difficult to visualize space with an arbitrary number of dimensions).
Imagine a triangle on a plane. Of course you can calculate its hypotenuse using the Pythagorean formula. If its side lengths are $d_1$ and $d_2$, then its hypotenuse's length is $\displaystyle \sqrt{d_1^2 + d_2^2}$.
Now imagine going above the point in the triangle, going up by $d_3$ units. Then, since you are moving perpendicular to the plane, another right triangle is formed with side lengths $\displaystyle \sqrt{d_1^2 + d_2^2}$ (the original triangle’s hypotenuse) and $d_3$ (the other side, from going upwards).
Using the Pythagorean formula on this yields:
$$ \sqrt{ \left(\sqrt{d_1^2 + d_2^2}\right)^2 + d_3^2 } = \sqrt{d_1^2 + d_2^2 + d_3^2} $$
Which is the Pythagorean formula in $3$ dimensions.
For four dimensions, you can imagine further going in a direction perpendicular to the other three dimensions. Also, let’s call the distance you travel in that direction $d_4$. It’s hard to visualize but you can tell that the movement forms another right triangle: the side lengths of this right triangle are the hypotenuse of the other triangle and $d_4$.
Plugging this into the Pythagorean formula, we get:
$$ \sqrt{ \left(\sqrt{d_1^2 + d_2^2 + d_3^2}\right)^2 + d_4^2 } = \sqrt{d_1^2 + d_2^2 + d_3^2 + d_4^2} $$
You can see that this keeps following the formula for Euclidean distance that I posted above, and now you can see why as well. Extending the formula to an arbitrary amount of dimensions just keeps adding distances under the square root.
