A sufficient illustration of Hamiltonian mechanics is given by the Hamiltonian of a charged particle in an electromagnetic field. In Cartesian coordinates the Lagrangian of a non-relativistic classical particle in an electromagnetic field is (in SI Units): L = ∑ ∑ i 1 2 m x ˙ ˙ i 2 + ∑ ∑ i q x ˙ ˙ i A i − − q φ φ , where q is the electric charge of the particle, φ is the electric scalar potential, and the A i are the components of the magnetic vector potential that may all explicitly depend on x i and ⁠ t ⁠.