Udwadia-Kalaba approach which presents a new, general and explicit equation of motion for constrained mechanical systems with holonomic or nonholonomic constraints is applied to the trajectory tracking control of the mobile robot in this paper. Unlike any other nonlinear control methods, the inspiration for this methodology which does not make any linearization or approximations comes from a different, though closely allied, field, namely analytical dynamics. The control torques required to control the mobile robot so that it precisely satisfies the trajectory requirements which are represented by an arbitrary (sufficiently smooth) function of time are obtained explicitly and in closed form by solving Udwadia-Kalaba equation. Numerical simulations are performed to show the simplicity, efficacy and accuracy of this closed-form method.