What is the maximum number of spheres with same radius that can touch each other in n dimensions. For 2 dimensions there can be three circles that can touch each other. In 3 dimensions there can be 4 spheres that can touch each other. What would be the number of hyper-spheres that can touch each other directly in n dimensions?
 A: In $n$ dimensions, the maximum is $n+1$.
Two spheres (I'll use that term regardless of dimension) of radius $r$ are tangent to each other if and only if the distance between their centers is $2r$. Thus, $n+1$ spheres are all tangent to each other if and only if the distance between any two of those points is $2r$.
These $n+1$ points thus form a $n$-simplex with all sides equal to $2r$. We wish to show that this figure requires at least $n$ dimensions. Why? Because we can calculate its $n$-volume, and that volume is positive.
The $n$-volume of a $n$-simplex with vertices $z_0,z_1,\dots,z_n$ is $\frac1{n!}\left|\det\begin{pmatrix}z_1-z_0&z_2-z_0&\cdots&z_n-z_0\end{pmatrix}\right|$. Or, at least, it is if those vectors are all in $\mathbb{R}^n$. Since we're  varying the number of dimensions, we need a volume formula that can hold up to that. For example, in $\mathbb{R}^3$, the area of a triangle will come from the length of the cross product of two of its side vectors; the cross product serves as a sort of directed area formula.
That matrix $Z$ we took the determinant of in the $\mathbb{R}^n$ case still makes sense if all the vectors are in $\mathbb{R}^m$ for some other $m$; it just won't be square. So, what can we do? Multiply it by its transpose. The resulting matrix is square, symmetric, and positive semidefinite, so we can take its determinant, and then the square root of that determinant. The volume we seek, if the $z_i$ are points in any $\mathbb{R}^m$, is $\frac1{n!}\sqrt{\det(Z^TZ)}$. Writing down the entries of $Z^TZ$, we get
$$Z^TZ = \begin{bmatrix}\|z_1-z_0\|^2&(z_1-z_0)\cdot(z_2-z_0)&\cdots&(z_1-z_0)\cdot(z_n-z_0)\\(z_2-z_0)\cdot(z_1-z_0)&\|z_2-z_0\|^2&\cdots&(z_2-z_0)\cdot(z_n-z_0)\\ \vdots&\vdots&\ddots&\vdots\\ (z_n-z_0)\cdot(z_1-z_0)&(z_n-z_0)\cdot(z_2-z_0)&\cdots&\|z_n-z_0\|^2\end{bmatrix}$$
Those dots are the usual dot product of vectors, of course. Next, we convert all those dot products into a form based entirely on the distances between the points. If $d_{ij}$ is the distance between points $z_i$ and $z_j$, then $(z_i-z_0)\cdot (z_j-z_0) = \frac12\left(d_{0i}^2+d_{0j}^2-d_{ij}^2\right)$. Apply this in our case with all the $d_{ij}$ equal to $2r$, and
$$Z^TZ = \begin{bmatrix}4r^2&2r^2&\cdots&2r^2\\2r^2&4r^2&\cdots&2r^2\\ \vdots&\vdots&\ddots&\vdots\\2r^2&2r^2&\cdots&4r^2\end{bmatrix}$$
The determinant of that $n\times n$ matrix is $2^n\cdot r^{2n}\cdot (n+1)$, so the $n$-volume is $r^n\sqrt{\frac{2^n(n+1)}{n!}}$. That's not zero, so we need at least $n$ dimensions to fit our $n+1$ points at equal distances.
As a side note, I prefer working with that determinant formula a bit more. With some clever linear algebra, we can replace $Z^tZ$ with a $(n+2)\times (n+2)$ matrix that has just squared distances as entries:
$$V^2=\frac{(-1)^{n+1}}{2^n (n!)^2}\det\begin{bmatrix}0&1&1&1&1&\cdots&1\\1&0&d_{10}^2&d_{20}^2&d_{30}^2&\cdots&d_{n0}^2\\1&d_{01}^2&0&d_{21}^2&d_{31}^2&\cdots&d_{n1}^2\\1&d_{02}^2&d_{12}^2&0&d_{32}^2&\cdots&d_{n2}^2\\1&d_{03}^2&d_{13}^2&d_{23}^2&0&\cdots&d_{n3}^2\\ \vdots&\vdots&\vdots&\vdots&\vdots&\ddots&\vdots\\ 1&d_{0n}^2&d_{1n}^2&d_{2n}^2&d_{3n}^2&\cdots&0\end{bmatrix}$$
It wasn't necessary for this problem, but it's a neat one to know - the higher-dimensional generalization of Heron's formula.
