How would Pythagorean's theorem work in higher dimensions? (General Question) So for example when dealing with two dimensions you would use $a^2 + b^2 = c^2$ and for three dimensions you would use $a^2 + b^2 + c^2 = d^2$ (Say for example you are calculating the length of the diagonal of a box) but what about in the fourth dimension? (Not really sure if there is a fourth dimension or how that even works in math so correct me if that makes no sense to say) Wouldn't it be something like $a^2 + b^2 + c^2 + d^2 = e^2$ ?
 A: Given two points in $\mathbb{R}^n$, $x = (x_1,x_2,\ldots,x_n)$ and $y = (y_1,y_2,\ldots,y_n)$ we can define an $m$-dimensional "hyperbox" where $m\leq n$:
$$Box(x,y) := \{z = (z_1, z_2, \ldots , z_n)\mid z_i = t_i\cdot x_i + (1-t_i)\cdot y_i,\ t_i\in [0,1]\}$$
Where the lengths of its edges are $a_1:=|x_1-y_1|,\ a_2:=|x_2 - y_2|,\ \ldots\ ,\  a_n:=|x_n-y_n|$.
The length of the largest diagonal of said box is precisely the distance between $x$ and $y$:
$$d = \sqrt{\sum_{k=1}^n(x_k-y_k)^2} = \sqrt{\sum_{k=1}^n a_k^2}$$
A: That is right. One well-known application of this fact is the Euclidian norm $\| \mathbf x \|$ for a vector $\mathbf x \in \Bbb R^n$, which is defined as
$$ \| \mathbf x \| = \sqrt{x_1^2 + x_2^2+\dots+ x_n^2}.$$ This is exactly the generalization of the Pythagorean theorem you are referring to.
A: Yes.  Mathematicians are very happy in any number of dimensions - even infinite dimensions!
Another way to extend Pythagoras is to take a solid rectangular box, and slice off a corner.  The corner has three sides that were part of the old box; and one diagonal side.  The areas of these sides also obey $a^2+b^2+c^2=d^2$.
A: The length of a diagonal of a cube is square root of 3 times the length of a side. This is in three dimensions. I don't see how you arrive at this answer using a^2 + b^2 + c^2 though. Instead, you use a two dimensional slice with one side being square root of 2 times side and the other value the side length. Here d^2 = a^2 + b^2 which, with side being s equals sqrt((sqrt(2)s^2) + (s^2)) = sqrt(3)s = d. By extension, my guess of a four dimensional cube of length of side s would be e = sqrt( (sqrt(3)s^2) + (sqrt(2)s^2) + (s^2) ) which equals sqrt(6)s. I am not sure of this extension, however and unfortunately cannot prove this guess. After further analysis, a four dimensional cube of side equals 1 has diagonal of length sqrt(4) or 2.
