Table of Contents

Angle Between two Vectors in Spherical Coordinates - Calculator

Formulas Used in Calculations

Given two vectors by their spherical coordinates, this calculator calculates angle \( \alpha \) between the two vectors..
Given two vectors whose initial point is the origin of a system of spherical coordintes and terminal points \( P_1(\rho_1,\theta_1,\phi_1) \) and point \( P_2(\rho_2,\theta_2,\phi_2) \) given by their spherical coordinates.
angle between two vectors
Fig.1 - Angle \( \alpha\) between two vectors

We first convert the coordinates of points \( P_1 \) and \( P_2 \) into rectangular coordinates \( P_1(x_1,y_1,z_1) \) and \( P_2(x_2,y_2,z_2) \) where
\( x_1 = \rho_1 \sin \phi_1 \cos \theta_1 \) , \( y_1 = \rho_1 \sin \phi_1 \sin \theta_1 \) , \( z_1= \rho_1 \cos \phi_1 \)
\( x_2 = \rho_2 \sin \phi_2 \cos \theta_2 \) , \( y_2 = \rho_2 \sin \phi_2 \sin \theta_2 \) , \( z_2= \rho_2 \cos \phi_2 \)

The vectors \( \vec{OP_1} = \vec V_1 \) and \( \vec{OP_2} = \vec V_2 \) have the components
\( \vec V_1 < x_1 , y_1 , z_1 > \) and \( \vec V_2 < x_2 , y_2 , z_2 > \)

The dot product of \( \vec V_1 \) and \( \vec V_2 \) is given by
\( \vec V_1 \cdot \vec V_2 = ||\vec V_1 || \cdot ||\vec V_1 || \cos \alpha \)
Hence
\( \alpha = \arccos \left(\dfrac {\vec V_1 \cdot \vec V_2}{||\vec V_1 || \cdot ||\vec V_1 ||} \right) \)
where
\( \vec V_1 \cdot \vec V_2 = x_1 x_2 + y_1 y_2 + z_1 z_2 \)
and
\( ||\vec V_1 || = \sqrt {x_1^2 + y_1^2 + z_1^2} \) and \( ||\vec V_2 || = \sqrt {x_2^2 + y_2^2 + z_2^2} \)
Note that if \( ||\vec V_1 || = 0 \) or \( ||\vec V_2 || = 0 \), the angle between the two vectors is undefined


Use Calculator to Calculate Angle Bewteen two Vectors in Spherical Coordinates

1 - Enter the spherical coordinates \( \rho_1 \) , \( \theta_1 \), \( \phi_1 \) of point \( P_1 \), and the spherical coordinates \( \rho_2\) , \( \theta_2\), \( \phi_2 \) of point \( P_2 \), selecting the desired units for the angles, and press the button "Calculate". You may also change the number of decimal places as needed; it has to be a positive integer.

\( \rho_1 = \)
\( \theta1 = \)
\( \phi_1 = \)
\( \rho_2 = \)
\( \theta2 = \)
\( \phi_2 = \)
Number of Decimal Places =


\( \alpha = \) (degrees)
\( \alpha = \) (radians)


More References and links

Maths Calculators and Solvers.