# Length of arc connecting 2 points in N dimensions

Suppose two have two points that lie on a sphere with known radius in N Dimensions.Is it possible to find the length of the shortest arc connecting them?

What about the length of the arc connecting the two points and going back to the starting point (it would be the full circumference in N=2).Is the problem even possible to solve beyond the usual 3 dimensions?

-

## 2 Answers

Everything is happening in a plane, so you can use your 2 dimensional geometry. If the sphere radius is $r$ and the straight line distance between the points is $d$, the straight line makes a chord of the circle. You can calculate the central angle $\theta=2 \arcsin \frac d{2r}$, then the distance on the sphere is $r \theta$. The circumference is still $2 \pi r$

-

Yes, it is very easy in any number of dimensions. Let's suppose that the sphere is centred on the origin, for simplicity. Consider the two-dimensional plane that contains the origin and your two points (if they are antipodal, there will be an infinite number of such planes, but otherwise it will be unique). This plane will intersect the sphere in a circle, and the problem is reduced to finding the distance between two points on a circle, which presumably you know how to do.

Suppose you are given the two points as $N$-dimensional real vectors $\mathbf{u, v}$, each of length $r$. Then the angle between them is just given by $\cos(\theta) = \frac{\mathbf{u\cdot v}}{r^2}$, and the length of the arc is $r \theta$.

-