This paper presents a novel Lagrangian approach to attitude tracking for rigid spacecraft using unit quaternions. In this approach, the motion equations of a spacecraft are described by a four degrees of freedom (DOF) Lagrangian dynamics subject to a holonomic constraint imposed by the norm of a unit quaternion. The basic energy-conservation property as well as some additional useful properties of the Lagrangian dynamics are explored. Since the controller is developed on the Euclidean space \(\mathbb {R}^4\) , the resulting potential function is the same as used for control designs for mechanical systems on Euclidean spaces, which has a unique isolated minimum in \(\mathbb {R}^4\) . Interestingly, this potential function turns out to be the height function in the unit quaternion group \(\mathcal {S}^3\)  used in [1]} for robust attitude controller designs, and the switching is carried out when a simple switching condition is fulfilled. This is in contrast to the potential functions commonly used for hybrid controller designs on \(SO(3)\)  [2]}, [3]}, [4]} or \(\mathcal {S}^3\)  [5]}, where a set of more elaborated potential functions was employed.
