Prove the triangle inequality on the sphere $S^2$ in $\mathbb{R}^3$. Let $S^2 = \{x=(x_1,x_2,x_3) \in \mathbb{R}^3: x_1^2+x_2^2+x_3^2=1\}$ be the unit sphere in $\mathbb{R}^3$ and $d_i(x,y) = \cos^{-1}(x\cdot y)$, where $x\cdot y$ is the usual dot product of vectors in $\mathbb{R}^3$, be the intrinsic metric on $S^2$ (the length of the great circle arc joining $x$ and $y$). Prove that $d_i$ satisfies the triangle inequality, $d_i(x,z) \le d_i(x,y)+d_i(y,z)$.
It has been suggested that I use the Gram Matrix $$A=\left( \begin{array}{ccccc}
x\cdot x &\ & x\cdot y &\ & x\cdot z \\
y\cdot x &\ & y\cdot y &\ & y\cdot z \\
z\cdot x &\ & z\cdot y &\ & z\cdot z 
\end{array} \right)$$ and the fact that $det(A) \ge 0$ and somehow reduce the desired inequality, $\cos^{-1}(x\cdot z) \le \cos^{-1}(x\cdot y)+\cos^{-1}(y\cdot z)$, to $det(A)\ge 0$. 
I'm just missing out on how to do that. Thank you.
 A: Denote $\theta_{xy}=\cos^{-1}(x\cdot y)$, $\theta_{yz}=\cos^{-1}(y\cdot z)$ and $\theta_{xz}=\cos^{-1}(x\cdot z)$. Then 
$$A=\begin{pmatrix} 1 & \cos\theta_{xy} & \cos\theta_{xz}\\
\cos\theta_{xy} & 1 & \cos\theta_{yz} \\
\cos\theta_{xz} & \cos\theta_{yz} & 1 \end{pmatrix}.$$
As $\det(A)\geq 0$, we get
$$1-\cos^{2}\theta_{xy}-\cos^{2}\theta_{yz}-\cos^{2}\theta_{xz}+2\cos\theta_{xy}\cos\theta_{yz}\cos\theta_{xz}\geq 0.$$
This implies that
$$(1-\cos^{2}\theta_{xy}-\cos^{2}\theta_{yz}+\cos^{2}\theta_{xy}\cos^{2}\theta_{yz})-(\cos^{2}\theta_{xy}\cos^{2}\theta_{yz}-2\cos\theta_{xy}\cos\theta_{yz}\cos\theta_{xz}+\cos^{2}\theta_{xz})\geq 0.$$
Hence 
$$(1-\cos^{2}\theta_{xy})(1-\cos^{2}\theta_{yz})-(\cos\theta_{xy}\cos\theta_{yz}-\cos\theta_{xz})^{2}\geq 0,$$
or
$$\sin^{2}\theta_{xy}\sin^{2}\theta_{yz}\geq (\cos\theta_{xy}\cos\theta_{yz}-\cos\theta_{xz})^{2}.$$
Taking square roots and using that $\theta_{xy},\theta_{yz}\in[0,\pi]$: $$\sin\theta_{xy}\sin\theta_{yz}\geq \cos\theta_{xy}\cos\theta_{yz}-\cos\theta_{xz}.$$
Using that $\cos(\theta_{xy}+\theta_{yz})=\cos\theta_{xy}\cos\theta_{yz}-\sin\theta_{xy}\sin\theta_{yz}$, we get
$$\cos\theta_{xz}\geq \cos(\theta_{xy}+\theta_{yz}).$$
Since $\cos^{-1}$ is decreasing, this implies
$$\theta_{xz}=\cos^{-1}(\cos(\theta_{xz}))\leq \cos^{-1}(\cos(\theta_{xy}+\theta_{yz}))\leq \theta_{xy}+\theta_{yz}.$$
