The vector algebra to derive the standard formula is equivalent to the calculation of the
long derivation for the compass course. The sign of the angle is basically kept, north over east in both cases, but as astronomers look at stars from the inside of the celestial sphere, the definition uses the convention that the is the angle in an image that turns the direction to the NCP
counterclockwise into the direction of the zenith. In the
equatorial system of
right ascension, , and
declination, , the star is at ::\mathbf{s} = \left(\begin{array}{c} \cos\delta \cos \alpha \\ \cos \delta\sin\alpha\\ \sin\delta\end{array} \right). The North Celestial Pole is at ::\mathbf{N} = \left(\begin{array}{c}0 \\ 0 \\ 1 \end{array}\right). In this same coordinate system the zenith is found by inserting altitude, , , into the
transformation formulas to get ::\mathbf{z} = \left(\begin{array}{c} \cos\varphi \cos l\\ \cos\varphi \sin l\\ \sin\varphi\end{array} \right), where is the observer's geographic latitude, and the local sidereal time. This also describes a rotating, right-handed, observer coordinate frame, with X-axis aligned to the south, where the local meridian intersects the horizon, Y-axis toward the eastern horizon, and Z-axis toward the zenith. This is the coordinate frame in which altitude and azimuth are measured. For the star, at some moment, , with expected altitude, , define its zenith distance as z = \pi/2-a. Its hour-angle, h = l - \alpha, measures the elapsed sidereal time interval since the star crossed the local Meridian and is negative if the star is east of the meridian and its crossing is pending. The normalized cross product is the rotation axis that turns the star into the direction of the zenith: ::\mathbf{\omega}_z = \frac{1}{\sin z}\mathbf{s}\times \mathbf{z} = \frac{1}{\sin z}\left(\begin{array}{c} \cos\delta\sin\alpha\sin\varphi -\sin\delta\cos\varphi\sin l\\ -\cos\delta\cos\alpha\sin\varphi +\sin\delta \cos\varphi\cos l\\ \cos\delta \cos\varphi \sin(\alpha-l) \end{array} \right). Finally is the third axis of the tilted coordinate system and the direction into which the star is moved on the great circle towards the zenith. The plane tangential to the celestial sphere at the star is spanned by the unit vectors to the north, ::\mathbf{u}_\delta = \left(\begin{array}{c} -\sin\delta\cos\alpha\\ -\sin\delta\sin\alpha\\ \cos\delta \end{array}\right), and to the east ::\mathbf{u}_\alpha = \left(\begin{array}{c} -\sin\alpha \\ \cos\alpha\\ 0 \end{array}\right). These are orthogonal: ::\mathbf{u}_\delta \cdot \mathbf{u}_\alpha=0;\quad \mathbf{u}^2_\delta = \mathbf{u}^2_\alpha=1. The parallactic angle is the angle of the initial section of the great circle at
s, east of north, ::\omega_z\times \mathbf{s} = \cos q\, \mathbf{u}_\delta + \sin q \, \mathbf{u}_\alpha. ::\cos q = (\omega_z\times \mathbf{s})\cdot \mathbf{u}_\delta = \frac{1}{\sin z}(\cos\delta\sin\varphi -\sin\delta \cos\varphi \cos h), ::\sin q = (\omega_z\times \mathbf{s})\cdot \mathbf{u}_\alpha = \frac{1}{\sin z}\sin h \cos\varphi. (The previous formula is the
sine formula of
spherical trigonometry.) The values of and of are positive, so using
atan2 functions one may divide both expressions through these without losing signs; eventually ::\tan q = \frac{\sin h\cos\varphi}{\cos\delta \sin\varphi -\sin\delta \cos\varphi \cos h}= \frac{\sin h}{\cos\delta \tan\varphi-\sin\delta \cos h} yields the angle in the full range . The advantage of this expression is that it does not depend on the various offset conventions of azimuth, ; the uncontroversial offset of the hour angle, , takes care of this. For a sidereal target, by definition a target where and are not time-dependent, the angle changes with a period of a
sidereal day . Let dots denote time derivatives; then the hour angle changes as ::\dot h =\frac{2\pi}{T_s} and the time derivative of the expression is ::\dot q \frac{1}{\cos^2 q}= \frac{\cos\varphi[\cos h \cos\delta \sin\varphi-\sin\delta\cos\varphi]}{(\cos\delta \sin\varphi-\sin\delta \cos\varphi \cos h)^2} \dot h; ::\dot q = \frac{\cos \varphi[\cos h \cos\delta \sin \varphi -\sin \delta \cos\varphi]}{\sin ^2z}\dot h = \frac{\cos \varphi \cos a \cos A}{\sin^2 z}\dot h =\frac{\cos\varphi \cos A}{\sin z}\dot h. The value derived above always refers to the north
celestial pole as the origin of coordinates even if it is not visible (i.e., if the telescope is south of the
equator). Some authors introduce more complicated formulas with variable signs to derive similar angles for telescopes south of the equator that use the south celestial pole as the reference. ==See also==