Let
![{\displaystyle g:={\begin{pmatrix}q\\p\end{pmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b8da17da62204a99c47852c66476cd21ccceb31a)
be a vector of generalized coordinates, (
might itself be a vector of positions and
a vector of momenta, both of them having the same size)
![{\displaystyle \nabla :={\begin{pmatrix}{\partial \over \partial q}\\{\partial \over \partial p}\end{pmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8c04cc1de6fc1445c2ffa56dcc31232d68a3100c)
be a vector differential operator,
![{\displaystyle i:={\begin{pmatrix}0&-1\\1&0\end{pmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1849fb6934a73368d44f19671a5983dc6459595c)
be a Givens rotation matrix for a counterclockwise right-angle rotation. (NB: This is a square root of
, where
is the identity 2×2 matrix; this is a matric version of the imaginary unit.) Let H denote the Hamiltonian (function for total energy).
Then
![{\displaystyle {\dot {g}}={\begin{pmatrix}{\dot {q}}\\{\dot {p}}\end{pmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e3d2e86d414883ca951426c02ee47db6f948e9a2)
where overdot is Newton’s fluxional notation for time derivative.
This is a compactified form of Hamilton’s canonical equations (of motion). It could also be re-expressed (trivially) as
![{\displaystyle {\dot {g}}=-i\nabla H}](https://wikimedia.org/api/rest_v1/media/math/render/svg/87f567d5d03e37c3ea3ffb60a2e5eefe8c88800c)
To see that it is the pair of canonical equations, unpack the symbolism:
![{\displaystyle {\begin{pmatrix}{\partial H \over \partial q}\\{\partial H \over \partial p}\end{pmatrix}}={\begin{pmatrix}0&-1\\1&0\end{pmatrix}}{\begin{pmatrix}{\dot {q}}\\{\dot {p}}\end{pmatrix}}={\begin{pmatrix}-{\dot {p}}\\{\dot {q}}\end{pmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/54fbdf4a802bbb34c34556d9511a5d8008a348a8)
thus
![{\displaystyle {\partial H \over \partial q}=-{\dot {p}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/300e1fd467dc2eb10e5ae7f2a031681b9a3eebc8)
![{\displaystyle {\partial H \over \partial p}={\dot {q}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f8dbee31bc001644945a214b1a03c20cf7494a45)
An immediate consequence of the canonical equation is that
,
that is,
![{\displaystyle {\begin{pmatrix}{\dot {q}}\\{\dot {p}}\end{pmatrix}}\cdot {\begin{pmatrix}-{\dot {p}}\\{\dot {q}}\end{pmatrix}}=-{\dot {q}}{\dot {p}}+{\dot {p}}{\dot {q}}=0}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9f9e95fc05ff17680112f797add612fc8d92b83b)
so
This means (geometrically) that g moves perpendicularly to H’s gradient, so as to conserve H.
Let
![{\displaystyle H={1 \over 2m}p^{2}+{k \over 2}q^{2}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/32ea002ae6dd16c0765369a2d49b499249a5772c)
This corresponds to a simple harmonic oscillator, where m is mass and k is a spring constant. The first term is kinetic energy and the second term is potential energy (of displacement from the stable equilibrium).
Then
![{\displaystyle {\partial H \over \partial q}=kq=-F=-{\dot {p}}=-m{\ddot {q}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9361608614783aa4a0817591cb276c57fe6768b6)
Note how deriving H by q returns a multiple of q; q is an “eigen-derivator” of H, as it were. (
follows from
being true in general (for conservative forces), where U denotes potential energy;
is Newton’s second law, and m may be assumed to be constant)
On the other hand,
![{\displaystyle {\partial H \over \partial p}={p \over m}={m{\dot {q}} \over m}={\dot {q}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/cd80b556ea85f816cfa2ac45e4cc40cf4d3a1bb5)
and note how deriving H by p returns a multiple of p, so p is also an “eigen-derivator” of H.