Given two vectors $u, v \in \mathbb{R}^d$ represented the spherical coordinates is there a simple formula to compute the angle between the two vectors? Without loss of generality, we can assume that the vectors $u$ and $v$ have unit norm.
I am not sure that the following notation is standard, but I assume that the vector $u$ is defined with $\rho = 1$ and the angular components $\theta_1, \ldots, \theta_{d-1}$. We can obtain the Euclidean components as follows: $$u_{x_1} = \cos \theta_1$$ $$u_{x_2} = \sin \theta_1 \cos \theta_2$$ $$\ldots$$ $$u_{x_{d-1}} = \sin \theta_1 \ldots \sin \theta_{d-2} \cos \theta_{d-1}$$ $$u_{x_d} = \sin \theta_1 \ldots \sin \theta_{d-2} \sin \theta_{d-1}.$$
One way to find the angle is to represent the two vectors in the Euclidean coordinates and compute arccos of the dot product. Is there a simpler way?
As pointed out in comments, is there a generalization of the Haversine formula?
$\alpha =\arccos \frac{N}{D}$
where
$\begin{eqnarray} N &=&u_{x}v_{x}+u_{y}v_{y}+u_{z}v_{z} \ &=&|\overrightarrow{u}|\sin \theta _{u}\cos \varphi _{u}|\overrightarrow{v}% |\sin \theta _{v}\cos \varphi _{v} \ &&+|\overrightarrow{u}|\sin \theta _{u}\sin \varphi _{u}|\overrightarrow{v}% |\sin \theta _{v}\sin \varphi _{v} \ &&+|\overrightarrow{u}|\cos \theta _{u}|\overrightarrow{v}|\cos \theta _{v} \end{eqnarray}$
– Américo Tavares Nov 22 '10 at 19:38$\begin{eqnarray} D^{2} &=&(u_{x}^{2}+u_{y}^{2}+u_{z}^{2})(v_{x}^{2}+v_{y}^{2}+v_{z}^{2}) \&=&[\left( |\overrightarrow{u}|\sin \theta _{u}\cos \varphi _{u}\right)^{2}+\left( |\overrightarrow{u}|\sin \theta _{u}\sin \varphi _{u}\right) ^{2}+\left( |\overrightarrow{u}|\cos \theta _{u}\right) ^{2}] \ &&\times \lbrack \left( |\overrightarrow{v}|\sin \theta _{v}\cos \varphi _{v}\right) ^{2}+\left( |\overrightarrow{v}|\sin \theta _{v}\sin \varphi _{v}\right) ^{2}+\left( |\overrightarrow{v}|\cos \theta _{v}\right) ^{2}]. \end{eqnarray}$
– Américo Tavares Nov 22 '10 at 19:39