  We give a pedagogical introduction to the Hamiltonian formalism of general
relativity at an advanced undergraduate and graduate levels. After covering the
mathematical pre-requisites as well as the $3+1$-decomposition of spacetime, we
proceed to discuss the Arnowitt-Deser-Misner (ADM) formalism (a Hamiltonian
approach) of general relativity. Then we proceed to give a brief but
self-contained introduction to homogeneous (but not necessarily isotropic)
universes and discuss the associated Bianchi classification. We first study
their dynamics in the Lagrangian formulation, followed by the Hamiltonian
formulation to show the equivalence of both approaches. We present a variety of
examples to illustrate the ADM formalism: (i) free & massless scalar field
coupled to homogeneous (in particular, Bianchi IX) universe, (ii) scalar field
with a potential term coupled to Bianchi IX universe, (iii) electromagnetic
field coupled to gravity in general, and (iv) electromagnetic field coupled to
Bianchi IX universe.
