Spherical law of cosines The spherical law of cosines states that $$\cos c = \cos a \cos b + \cos C \sin a \sin b,$$ where $a,b,c$ are sides of a spherical triangle, and $C$ the angle. 


*

*Is there a proof for this theorem using matrices (and not vectors)?

*How do I modify this theorem such that it includes two spheres, say the sun and the moon (for example, with the distance between the two spheres replacing $c$ in the equation)?

 A: $\newcommand{\Alpha}{A}$In case it helps, consider first the Euclidean situation: We have a disk of radius $R_{0}$ centered at $(X_{0}, Y_{0})$ representing the sun at a specific time, and a disk of radius $r_{0}$ centered at $(x_{0}, y_{0})$ representing the moon at the same time. The distance between their centers is given by the Pythagorean theorem,
$$
d = \sqrt{(X_{0} - x_{0})^{2} + (Y_{0} - y_{0})^{2}}.
$$
The disks overlap (partial eclipse) if $d < R_{0} + r_{0}$; one disk completely occludes the other (total eclipse) if $d < |R_{0} - r_{0}|$.

In the extract, all coordinates refer to the celestial sphere. The sun at 4:30 is represented on the celestial sphere as a disk of (angular) radius $R_{0}$ whose center has right ascention $\Alpha_{0}$ and declination $\Delta_{0}$; the moon at 4:30 is represented on the celestial sphere as a disk of (angular) radius $r_{0}$ whose center has right ascention $\alpha_{0}$ and declination $\delta_{0}$.
The question is whether or not the centers of these disks are close enough for a partial or total eclipse. The crucial quantity is the spherical (i.e., angular) distance $\theta$ between the centers, which the author claims is given, at 4:30, by
$$
\cos \theta = \sin \Delta_{0} \sin\delta_{0} + \cos\Delta_{0} \cos\delta_{0} \cos a_{0}.
\tag{1}
$$
Being more familiar with vectors and dot products than with spherical trigonometry, I'd derive (1) as follows: in an earth-centered coordinate system, the Cartesian positions of the sun and moon (on the celestial sphere, assuming unit radius) are, respectively,
\begin{align*}
(X, Y, Z) &= (\cos\Alpha \cos\Delta, \sin\Alpha \cos\Delta, \sin\Delta), \\
(x, y, z) &= (\cos\alpha \cos\delta, \sin\alpha \cos\delta, \sin\delta).
\end{align*}
The (angular) distance $\theta$ between the centers satisfies
\begin{align*}
\cos \theta &= (X, Y, Z) \cdot (x, y, z) \\
  &= (\cos\Alpha \cos\alpha + \sin\Alpha \sin\alpha)\cos\Delta \cos\delta + \sin\Delta \sin\delta \\
  &= \cos(\Alpha - \alpha)\cos\Delta \cos\delta + \sin\Delta \sin\delta \\
  &= \sin\Delta \sin\delta + \cos\Delta \cos\delta \cos a;
\end{align*}
the third equality is the sum formula for cosine, and the last is simple rearrangement.
