Assuming the earth is a sphere, what is the shortest distance between 2 points through the earth?

The sphere is actually a red herring here. Because your movement is not impeded by the sphere, this question is equivalent to finding the shortest distance between two points $P(a,b,c)$ and $Q(x,y,z)$. Do you know what to do from here?


If your points are given by longitude $\varphi$ and latitude $\theta$, and if $r$ is the radius of the Earth, then this gives you the spherical co-ordinates of the point on the surface.

The Cartesian co-ordinates of that point (assuming a suitably placed co-ordinate system so that the origin is in the centre of the Earth and the $z$ axis goes through the poles) can be then obtained from the spherical co-ordinates using the formula(e):

$$(x,y,z)=(r\cos\varphi\cos\theta, r\sin\varphi\cos\theta, r\sin\theta)$$

and now you can use the ordinary (Euclidean) distance between two points:

$$d((x_1,y_1,z_1),(x_2,y_2,z_2))=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}$$