TITLE: Show that geodesic distance on the $n$-sphere respects the triangle inequality
QUESTION [7 upvotes]: Let $S^n$ be the standard unit $n$-sphere, embedded in Euclidian space as $S^n = \{ x \in {\mathbb{R}}^{n+1} | \| x \| = 1 \}$. Define geodesic distance as $d(x, y) = \arccos (x \cdot y)$, where $\cdot$ is the Euclidian dot product.
My lecture notes introduce geodesic distance on page 11, but they're quite hand-wavy about the proof that distance is subadditive.

To establish the triangle inequality, let $x, y, z ∈ S^{n}$, $\theta = \arccos(\langle x, y \rangle)$ and
  $\varphi = \arccos(\langle y, z \rangle)$. Then we can write $x = y \cos \theta + u \sin \theta$ and $z = y \cos \varphi +
v \sin \varphi$ where $u$ and $v$ are unit vectors orthogonal to $y$. An easy calculation now gives $\langle x, z \rangle = \cos \theta \cos \varphi + \langle u, v \rangle \sin \theta \sin \varphi$.


Concretely, how do I find $u$ and $v$?
What is this "easy calculation"?

REPLY [5 votes]: You are projecting $x, z$ onto $y$ respectively: Consider the plane spanned by $x, y$ (let's say $x\neq \pm y$). Then one can find a unit vector in this plane which is orthogonal to $y$. Call this $u$. Then one has 
$$ x = \langle x, y\rangle y + \langle x, u\rangle u.$$
By definition, $\arccos \langle x, y\rangle = \theta$, so $\cos\theta = \langle x, y\rangle$. Since$x, y, u$ are orthonormal to each other, this force $\langle x, u\rangle = \sin \theta$. Thus 
$$ x = y\cos \theta  + u\sin\theta .$$
(Similar for $z,v$). 
(2) is really easy calculations, starting at 
$$ \langle x,z\rangle = \langle y \cos\theta  + u\sin\theta , y\cos\varphi  + v\sin\varphi \rangle$$
and then expanding the right hand side.