# What is a Hamiltonian of a System?

What is a Hamiltonian of a System? When learning about Hamiltonian for first time it is an object introduced as Legendre Dual Transform of Lagrangian of the same system. And we learn further that it is equivalent to energy of the system. But there are systems where Hamiltonian and Energy doesn't match.(Ex:When is the Hamiltonian of a system not equal to its total energy?)

We see the use of Hamiltonian in physics is almost everywhere. It may have some deep physical implications about the nature of how things work. So how to understand the Hamiltonian of System other than the Energy concept? ( A more general idea).

I will go for a mathematical answer. Hopefully, you will get something from it. Sorry if I will be a little bit synthetic.

Take the configuration space $$M$$ (with charts $$q_u : U \to \mathbb{R}^n , U\subset M$$) of your physical system, which we suppose is a differentiable manifold, and consider its cotangent bundle $$T^*M$$ (with charts $$(q_u,p_u))$$. Then you can define a natural 2-form $$\omega := \sum_idq_i\wedge dp_i$$ which turns out to be non-degenerate and closed.

Then you might think: since this $$\omega$$ emerges quite naturally, it would be nice if time evolution didn't change it. So you ask yourself: what kind of vector fields $$v$$ generate flows $$\Phi_t^v$$ that preserve $$\omega$$ (i.e. $$\Phi_t^{v\ *}\ \omega = \omega\ \ \forall t$$, with $$^*$$ meaning pull-back)?

The answer is given by $$L_v\omega = 0$$, with $$L$$ being the Lie derivative. Applying Cartan's magic formula for Lie derivatives of differential forms, you get the condition $$0 = d(\iota_v\omega) + \iota_v(d\omega) = d(\iota_v \omega)$$ since $$\omega$$ is closed.

Then, at least locally (depending on the topology of your system), this means that there is a function $$H: T^*M \to \mathbb{R}$$ such that $$\iota_v\omega = dH$$. This $$H$$ is what (in full generality) you can call Hamiltonian.

Since $$\omega$$ is non-degenerate, we can invert the relation and write $$v = P(dH)$$ (P is called "Poisson Tensor") and conclude that there is a natural flow ("Hamiltonian Flow") on the cotangent bundle of the configuration space associated to any function $$H$$. It so happens that if you are doing Newtonian mechanics and let $$H$$ be the energy, then the flow you get is the time evolution of the system. But the formalism is more general than that.

• V. Arnold's Mathematical Methods of Classical Mechanics is a really good reference. – Angelo Brillante Romeo Jun 26 at 10:46

Quoting Classical Mechanics (3rd ed.), Goldstein:

In a very literal sense, the Hamiltonian is the generator of the system motion with time.

The motion of the system in a time interval $$\text dt$$ can be described by an infinitesimal contact transformation generated by the Hamiltonian.