The Hamiltonian is an important quantity that characterizes a physical body or system in Classical Mechanics and Quantum Mechanics. The Hamiltonian is useful in obtaining powerful equations of motion for a system in classical mechanics, the so called 'canonical equations', and is an essential quantity in the Shroedinger Equation in non-relativistic quantum mechanics. In many physical situations it is equal to the total kinetic energy plus the total potential engergy, but this is not necessarily the case.

The Hamiltonian function is defined as:

h = Σj (∂L/∂q'j) q'j - L(qk,q'k,t)

where the q's are the generalized coordinates,1 where ' indicates the time derivative of the quantity in question, and where L(qk,q'k,t) is the Lagrangian function expressed in the generalized coordinates and generalized velocities. The Lagrangian function of a body or system is equal to the Kinetic Energy minus the Potential Energy, or, in symbols:
L(qk,q'k,t) = T - U.

In general, the Hamiltonian is expressed as a function of the generalized coordinates, the generalized momenta, and the time:
H = H(qk,pk,t)

In Lagrangian mechanics we can define generalized momenta corresponding to the generalized coordinates1.
pj = ∂L/∂q'j. This allows us to rewrite the Hamiltonian

H = Σj q'jpj - L(qk,q'k,t)

In a so-called monogenic system, one in which the potential energies involved do not depend on the generalized velocities, the differentials of the Hamiltonian and the Lagrangian are such that the following must be true:

q'j = ∂H/∂pj
and
p'j = - ∂H/∂qj
also
∂H/∂t = - ∂L/∂q

These equations are the canonical equations of motion, and since they relate the time derivative, and therefore the change in time, of the generalized coordinates and generalized momenta to the Hamiltonian in any system where the potential energy is not an explicit function of the generalized velocities. This Hamiltonian can be determined, and then they theoretically tell us everything we need to know about the evolution of a system. This is provided, of course, that we pick meaningful generalized coordinates and can solve the necessary equations.

If the Lagrangian is not explicitly a function of time, as is the case in a closed system, then by the equation above the Hamiltonian is a constant.

If the potential energy term appearing in the Lagrangian does not depend on the generalized velocities, and the generalized coordinates used to express the Hamiltonian are so-called scleronomic, meaning that the equations that transform them from ordinary cartesian coordinates don't explicitly contain the time, then we also know from Lagrangian Mechanics that
Σj qj dT/dq'j = 2T, so then the Hamiltonian is 2T - (T - U) = T + U = E.

So in the case that the generalized coordinates are scleronomic, and of course that the potential energy is not an explicit function of the generalized velocities, then the Hamiltonian is equal to the total energy:
H = T + U
and, of course, T is a function only of velocity and from the conditions before U is a function only of position.

In this case where the Hamiltonian is equal to the total energy and we are working in cartesian coordinates, it can, by elementary mechanics, be expressed (in the non-relativistic case, of course) as
H = p^2/2m + U(x)
where p is the ordinary momentum.

The Hamiltonian enters into the Shroedinger Equation of Quantum Mechainics as an operator, which states that H(hat) ψ = i hbar ∂Ψ/∂t, where H(hat) is the Hamiltonian operator, and Ψ is the wave function.

The physical significance of the Hamiltonian is rather mystical and subtle, but extremely important. It can be seen as the generator of system evolution in time. It can also be seen as the conjugate momentum to time, meaning that if time is thought of a generalized coordinate, the momentum corresponding to that coordinate will be the Hamiltonian, just as the momentum corresponding to a Cartesian coordinate is the familiar linear momentum.

The Hamiltonian is named for Sir William Rowan Hamilton (1805-1865), an Irish Mathematician who articulated Hamilton's Principle, which motivated much of the development of Lagrangian Mechanics.


1 Generalized coordinates are analagous to regular 'cartesian' coordinates in that they are quanities that discribe a system and can change as it evolves over time. However, they need not be lengths, indeed they can be angles, volumes, or almost anything. The cooresponding generalized velocities are the time derivatives of the generalized coordinates, just as regular velocity is the time derivative of cartesian coordinates. A generalized momentum, however, is defined as the as the partial derivative of the Lagrangian with respect to the corresponding generalized coordinate, which happens to be the regular momentum in the case of a cartesian coordinate. For more information, see Lagrangian mechanics.