The isorotation contours of the solar convective zone (SCZ) show three distinct morphologies, corresponding to two boundary layers (inner and outer), and the bulk of the interior. Previous work has shown that the thermal wind equation (TWE) together with informal arguments on the nature of convection in a rotating fluid could be used to deduce the shape of the isorotation surfaces in the bulk of the SCZ with great fidelity, and that the tachocline contours could also be described by relatively simple phenomenology. In this paper, we show that the form of these surfaces can be understood more broadly as a mathematical consequence of the TWE and a narrow convective shell. The analysis does not yield the angular velocity function directly; an additional surface boundary condition is required. However, much can already be deduced without constructing the entire rotation profile. The mathematics may be combined with dynamical arguments put forth in previous works to the mutual benefit of each. An important element of our approach is to regard the constant angular velocity surfaces as an independent coordinate variable for what is termed the ‘residual entropy’, a quantity that plays a key role in the equation of thermal wind balance. The difference between the dynamics of the bulk of the SCZ and the tachocline is due to a different functional form of the residual entropy in each region. We develop a unified theory for the rotational behaviour of both the SCZ and the tachocline, using the solutions for the characteristics of the TWE. These characteristics are identical to the isorotation contours in the bulk of the SCZ, but the two deviate in the tachocline. The outer layer may be treated, at least descriptively, by similar mathematical techniques, but this region probably does not obey thermal wind balance.