"Variational principles in mechanics: geometric aspects" A geometric description of variational principles in mechanics is given, with special attention to constrained systems. The equations of motion for the case of nonholonomic constraints are obtained in both the vakonomic and nonholonomic formalisms from a variational principle. Both formalisms are compared and it is proved that they coincide when the constraints are integrable. As an example of vakonomic mechanics, a formulation of the theory of optimal control is described.