Vectors: Using Pythagoras's theorem for magnitude in the 4th dimension For a simple x and y plane (2 dimensional), to find the distance between two points we would use the formula 
$$
a^2 +b^2 = c^2
$$
For a slightly more complicated plane; x,y and z (3 dimensional), to find the distance between two points we would use the formula
$$
d^2 = a^2 + b^2 + c^2
$$
My question is this; is it possible to use pythagoras's theorem to find the distance/magnitude/modulus between two points in 4 dimensions? And what format would it be in?
Using graphs of triangles and cuboids, I have proved for the 2 dimensional and 3 dimensional pythagorean theorem usage, but since I do not understand the 4th dimension entirely (for convenience and understanding, I assume that it is time), I cannot picture how to start nor work this.
Note: I am a highschool student, and new. If I have not provided enough information or something is unclear please comment and I will try to change it. Thank you in advance
 A: Good question.
In the theory of relativity the fourth dimension is time, and the distance formula is weird, as @Arthur comments.
But it's quite possible and (for mathematicians) very natural to study spaces with four (or even $n$) geometric dimensions. You just think of a point as a list of its $n$ coordinates. In the plane points are $(x,y)$. In space they are $(x,y,z)$. In four dimensions they are $(x,y,z,w)$, and the distance $d$ from that point to the origin $(0,0,0,0)$ is, as you might guess, given by the Pythagorean relationship
$$
d^2 = x^2 + y^2 + z^2 + w^2 .
$$
As a high school student you might be able to see how to prove that by analogy with how you proved your formula for three dimensions. Later on in your study of mathematics you'll understand how think of it as the definition of distance.
The wikipedia page https://en.wikipedia.org/wiki/Four-dimensional_space is a good place to begin reading about geometry in the four  dimensions.
A: The Pythagorean theorem works for any dimensions >1. We can find examples by constructing n-tuples made of multiple triples. We begin by find a side $A$ to match the $C$ of any previous triangle.
Here we substitute and solve $C=A=m^2-n^2\implies n=\sqrt{m^2-C}$ where $$\lceil\sqrt{C+1}\space\rceil\le m\le \bigl\lceil\frac{C}{2}\bigr\rceil$$
If any $m$ yields a positive integer $n$, we have $(m,n)$ for a Pythagorean triple.
The simplest triple is $3,4,5$ and we let $A=\sqrt{m^2-5}$ where;
$$m_{min}=\lceil\sqrt{5+1}\space\rceil=3\quad M_{max}=\lceil\frac{5}{2}\space\rceil=3$$
This one was easy: $n=\sqrt{m^2-C}=\sqrt{3^2-5}=2\quad f(3,2)=(5,12,13)$
Now we have $3^2+4^2+12^2=13^2$ and the logic is that, since $5^2=3^2+4^2$, we can substitute $\sqrt{3^2+4^2}$ for the $5$ leg in $5,12,13$.
Let's try $(21,20,29)$. We have $C=29\implies 6\le m \le 15$ and we find $only$ $f(15,14)=(29,420,421)$
If we continue the process begun with $(3,4,5)$ we can find $(3,4,5)\rightarrow(5,12,13)\rightarrow(13,84,85)\rightarrow(85,132,157)\rightarrow(157,12324,12325)\text{ and so on.}$
So far, we have $3^2+4^2+12^2+84^2+132^2+12324^2=12325^2$
