This note is about the actual direction of Sun rise relative to the geographic East. The Sun rises from the East. This would have been true if the Earth axis of rotation was not tilted with respect to its orbital plane around the Sun.
But the fact is, it is tilted and makes an angle of with the normal to the orbital plane that passes through the Earth's center.
Another fact about the Earth axis of rotation, is that it always points in a fixed inertial direction with respect to our galaxy. Therefore, when it rotates about the Sun, the axis projection on the orbital plane rotates, with respect to the Sun's direction, clockwise at a constant rate when viewed from the North.
On June 21st. the projection of Earth's axis on the orbital plane, points directly towards the Sun. After June 21st, the angle this projection makes with the direction of the Sun ( ), increases linearly with time, completing in one year.
On a given day, we can determine the angle by the number of days that have passed since June 21st. The projection of the Earth's axis on the orbital plane will make an angle of with respect the line connecting the Earth's center and the Sun's center. Consider a point on the surface of Earth at a latitude of degrees North of the Equator. ( is negative for a location that is South of the Equator). Considering these variables, what will be the direction of Sunrise on a certain given day, with respect to the East direction. We have three coordinate reference frames to relate, the first one (Frame 1) is the reference frame that has its center at the center of Earth, with the z-axis set perpendicular to the orbital plane (the plane in which the Earth orbits the Sun). Also, the x-axis is selected to point towards the center of the Sun.
The second reference frame (Frame 2) is attached to Earth, centered at the Earth center, with its z-axis along the axis of Earth rotation. The x-axis orientation, results naturally when we look at this frame as being the result of two consecutive geometric rotations, the first is about the z-axis (of the orbital plane). And the second is about the y-axis of the frame resulting from the first rotation.
Finally, the third frame (Frame 3), is the frame attached to a moving point on the surface of Earth, with its three axes pointing towards the standard directions of local East, local North, and local Vertical. Thus, let be the coordinate vector in the orbital plane, and be the corresponding coordinate vector in the frame resulting from the first rotation, and let be the corresponding coordinate vector in Frame 2. We can relate these three vectors as follows
where is the rotation matrix about the z-axis by an angle , and is given by
where is the rotation matrix about the y-axis by an angle , and is given by
Next, we consider Frame 3. We note that the unit vectors pointing East and North and Vertically Up, at a given point that has a latitude of , is given by
Where is the rotation angle counterclockwise from the x-axis of the Earth reference frame, and .
Together, these three vectors form an orthornormal basis for the reference frame we name Frame 3, and can written with respect to frame 2 as
Now, in the orbital reference frame (Frame 1), the direction to the Sun is pointing in the positive x-direction,
It follows that the direction of the sun , when expressed with respect to Frame 3, is related to , by
Being a rotation matrix, the inverse of is its transpose. Performing the indicated multiplication, results in
Now, at sunrise , the z-component of this vector is zero, because the Sun will be coming from the horizon. Setting
Substituting this expression, in ,
Since is a unit vector, and , its y-component is the sine of the angle it makes with . Therefore, finally, the angle the vector pointing to the Sun at exact sunrise makes with the East is given by,
And this angle is the same deviation from the West direction at sunset.
As an example, to determine the sunrise direction in Ottawa, which is at a latitude of North, on December 11, we have to compute the number of days between June 21st, and Decemeber 11th, and that is equal to days.
Hence, by plugging in these values, we obtain,
The minus sign indicates that the Sun will rise south of East.