In theoretical physics, Hamiltonian field theory is the field-theoretic analogue to classical Hamiltonian mechanics. It is a formalism in classical field theory alongside Lagrangian field theory, and has applications in quantum field theory also.The Hamiltonian for a system of discrete particles is a function of their generalized coordinates and conjugate momenta, and possibly, time. For continua and fields, Hamiltonian mechanics is unsuitable but can be extended by considering a large number of point masses, and taking the continuous limit, that is, infinitely many particles forming a continuum or field. Since each point mass has one or more degrees of freedom, the field formulation has infinitely many degrees of freedom.The equations of motion for the fields are similar to the Hamiltonian equations for discrete particles. For any number of fields: ϕ ˙ i = + δ H δ π i , π ˙ i = − δ H δ ϕ i , {displaystyle {dot {phi }}_{i}=+{frac {delta {mathcal {H}}}{delta pi _{i}}},,quad {dot {pi }}_{i}=-{frac {delta {mathcal {H}}}{delta phi _{i}}},,} The fields φi and conjugates πi form an infinite dimensional phase space, because fields have an infinite number of degrees of freedom.For two functions which depend on the fields φi and πi, their spatial derivatives, and the space and time coordinates,The following results are true if the Lagrangian and Hamiltonian densities are explicitly time-independent (they can still have implicit time-dependence via the fields and their derivatives),Covariant Hamiltonian field theory is the relativistic formulation of Hamiltonian field theory.