The underpinnings of molecular dynamics are based on a formal structure for classical mechanics. This formal structure is not only of theoretical interest but is also the basis for actual method development in molecular dynamics methods. The formal structure can be formulated in two ways: the Lagrangian and Hamiltonian formulations. We shall begin with the former.