Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  1. While deriving Hamiltonian from Lagrangian density, we use the formula $$\mathcal{H} ~=~ \pi \dot{\phi} - \mathcal{L}.$$ But since we are considering space and time as parameters, why the formula $$\mathcal{H} ~=~ \pi_{\mu}\partial^{\mu} \phi - \mathcal{L}$$ is not used?

  2. Is there any particular book/lecture notes dealing with these kind of issues in theoretical physics, I would love to know them?

share|cite|improve this question
up vote 19 down vote accepted

Vladimir's answer has the right essence but it is also misleading, so let me clarify.

The formula $$ H = \sum_i p_i\dot q_i - L $$ relating the Hamiltonian and the Lagrangian is completely general. It holds in all theories that admit both Lagrangians and Hamiltonians, whether they're relativistic or not, whether or not they have any other symmetry aside from the Lorentz symmetry.

When you have field theory, both the Hamiltonian and the Lagrangian may be written as spatial integrals of their densities. $$ H = \int d^3x \, {\mathcal H}, \quad L = \int d^3x\, {\mathcal L} $$ Combining that with the first formula, we get the relationship $$ \mathcal{H} = \sum_i\pi_i \dot{\phi_i} - \mathcal{L} $$ Now, you proposed a different formula and I guess that the reason why you proposed it is that it looks more Lorentz-invariant to you, as appropriate for Lorentz-invariant field theories. That's a nice motivation.

However, what's wrong about your reasoning is the assumption that both the Hamiltonian density and the Lagrangian density are Lorentz-invariant. While the Lagrangian density is a nice scalar, so it is Lorentz-invariant (the density at the origin, at least), and it's because the integral of it is the Lorentz-invariant action which should be stationary, the same is not true for the Hamiltonian and its density.

The Hamiltonian is intrinsically linked to the time direction: it is the generator of the translations in time (the spatial counterparts of the Hamiltonian are the spatial components of the momentum); it is the energy, the 0th component of a 4-vector, $H\equiv p^0$. So the argument that this formula should be Lorentz-covariant is invalid, your proposed formula is wrong, and the right formula was justified at the beginning of my comment.

share|cite|improve this answer

Lubos Motl and Vladimir Kalitvianski have already provided correct conventional answers concerning the Legendre transformation from Lagrangian to Hamiltonian formalism.

Nevertheless, it seems appropriate to mention that OP's second equation(v2)

$$\mathcal{H} ~=~ \pi_{\mu}\partial^{\mu} \phi - \mathcal{L}$$

is precisely the starting point for De Donder–Weyl theory, which introduces polymomenta.

Concerning manifestly covariant Hamiltonian formalism, see also e.g. Ref. 1 and this Phys.SE post.


  1. C. Crnkovic and E. Witten, Covariant description of canonical formalism in geometrical theories. Published in Three hundred years of gravitation (Eds. S. W. Hawking and W. Israel), (1987) 676.
share|cite|improve this answer
If we stay in the frame of a standard theory, any Heisenberg operator $F$ obeys the following equations including not only $H=P^0$, but also the other components of the four-vector of energy-momentum $P^\mu$: $\frac{\partial F}{\partial x_\mu}=i[F,P^\mu]$. – Vladimir Kalitvianski Sep 26 '12 at 11:36

Time plays a particular role, even in relativity. Time and space coordinates ("lengths") are not interchangeable. In other words, there is no complete symmetry between them despite they may transform together. So we apply a usual formula for constructing a Hamiltonian if the corresponding Lagrangian is known.

By the way, the Hamiltonian formalism in QFT is as relativistic invariant as the Lagrangian formalism; the former is just not manifest invariant contrary to the latter.

share|cite|improve this answer
This is correct but misleading to a beginner like the OP. – centralcharge Dec 1 '13 at 4:26

Another reference to such approach (a short paper):

Hamiltonian Mechanics of Fields R. H. Good, Jr. Department of Physics, University of California, Berkeley, California

from the abstract:

In relativistic field mechanics one ordinarily introduces the time derivative of a field component as its velocity and the partial derivative of the Lagrangian density with respect to the velocity as its canonically conjugate momentum. In order to treat the time and space equivalently, Born and Weyl once treated the four space-time derivatives of a field component as four velocities and introduced the four partial derivatives of the Lagrangian density with respect to the velocities as four momenta. In the present paper this idea is carried further in order to introduce the generalizations of the point-mechanics ideas of Hamiltonian equations, Lagrange brackets, Poisson brackets, and integrals of motion.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.