If I have 3 points on an N-D sphere, does there exist a law of cosines which holds, regardless of the number of dimensions that the sphere occupies?
If so - what is the N-D law of cosines?
EDIT for reference I provide links to wiki pages:
2D Plane Triangle law of cosines:
https://en.wikipedia.org/wiki/Law_of_cosines
3D Sphere Triangle law of cosines:
https://en.wikipedia.org/wiki/Spherical_law_of_cosines
4D+ Sphere Triangle law of cosines: WANTED
Use the vector dot product in the embedding space. Suppose the two points on the 3-sphere are defined by the coordinates $(\theta_1,\theta_2,\theta_3)$ and $(\phi_1,\phi_2,\phi_3)$. Then the coordinates embedded in the 4-d space are
$$\vec{x} = (\cos\theta_1,\sin\theta_1\cos\theta_2,\sin\theta_1\sin\theta_2\cos\theta_3,\sin\theta_1\sin\theta_2\sin\theta_3)$$ $$\vec{y} = (\cos\phi_1,\sin\phi_1\cos\phi_2,\sin\phi_2\sin\phi_2\cos\phi_3,\sin\phi_1\sin\phi_2\sin\phi_3)$$
In a positively curved space we have the relation $$\cos\psi = \langle x,y\rangle$$ where $\psi$ is the differential angle subtended by the two vectors on the 3-sphere. This can then be factored to get the final solution
$$\cos\psi = \cos\theta_1\cos\phi_1 + \sin\theta_1\sin\phi_1[\cos\theta_2\cos\phi_2 + \sin\theta_2\sin\phi_2\cos(\theta_3-\phi_3)]$$
You can see how this can be extended to higher dimensions by re-writing the vectors $\vec{x}$ and $\vec{y}$ with the appropriate trig terms.