A **Hamiltonian system** is a dynamical system governed by Hamilton's equations. In physics, this dynamical system describes the evolution of a physical system such as a planetary system or an electron in an electromagnetic field. These systems can be studied in both Hamiltonian mechanics and dynamical systems theory.

Informally, a Hamiltonian system is a mathematical formalism developed by Hamilton to describe the evolution equations of a physical system. The advantage of this description is that it gives important insight about the dynamics, even if the initial value problem cannot be solved analytically. One example is the planetary movement of three bodies: even if there is no simple solution to the general problem, Poincaré showed for the first time that it exhibits deterministic chaos.

Formally, a Hamiltonian system is a dynamical system completely described by the scalar function
H
(
q
,
p
,
t
)
, the Hamiltonian. The state of the system,
r
, is described by the generalized coordinates 'momentum'
p
and 'position'
q
where both
p
and
q
are vectors with the same dimension N. So, the system is completely described by the 2N dimensional vector

r
=
(
q
,
p
)
and the evolution equation is given by the Hamilton's equations:

d
p
d
t
=
−
∂
H
∂
q
d
q
d
t
=
+
∂
H
∂
p
.

The trajectory
r
(
t
)
is the solution of the initial value problem defined by the Hamilton's equations and the initial condition
r
(
0
)
=
r
0
∈
R
2
N
.

If the Hamiltonian is not time dependent, i.e. if
H
(
q
,
p
,
t
)
=
H
(
q
,
p
)
, the Hamiltonian does not vary with time:

and thus the Hamiltonian is a constant of motion, whose constant equals the total energy of the system,
H
=
E
. Examples of such systems are the pendulum, the harmonic oscillator or dynamical billiards.

One example of time independent Hamiltonian system is the harmonic oscillator. Consider the system defined by the coordinates
p
=
p
and
q
=
x
whose Hamiltonian is given by

H
=
p
2
2
m
+
1
2
k
x
2

The Hamiltonian of this system does not depend on time and thus the energy of the system is conserved.

One important property of a Hamiltonian dynamical system is that it has a symplectic structure. Writing

∇
r
H
(
r
)
=
[
∂
q
H
(
q
,
p
)
∂
p
H
(
q
,
p
)
]

the evolution equation of the dynamical system can be written as

d
r
d
t
=
S
N
⋅
∇
r
H
(
r
)
where

S
N
=
[
0
I
N
−
I
N
0
]
and *I*_{N} the *N*×*N* identity matrix.

One important consequence of this property is that an infinitesimal phase-space volume is preserved. A corollary of this is Liouville's theorem, which states that on a Hamiltonian system, the phase-space volume of a closed surface is preserved under time evolution.

d
d
t
∫
S
t
d
r
=
∫
S
t
d
r
d
t
⋅
d
S
=
∫
S
t
F
⋅
d
S
=
∫
S
t
∇
⋅
F
d
r
=
0
where the third equality comes from the divergence theorem.

Dynamical billiards
Planetary systems, more specifically, the n-body problem.
Canonical general relativity