How would Pythagorean's theorem work in higher dimensions? (General Question)
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}$$