We had a couple of examples where we were supposed to calculate the Canonical Transformation (CT), but we never actually talked about a condition that decides whether a transformation is a canonical one or not.

Let me give you an example: We had the transformation: $$P=q \cdot \cot(p), \qquad Q=\ln \left(\frac{\sin(p)}{q}\right).$$ How do I see whether this transformation is a canonical one or not?

You don't have to carry out the full calculation, but maybe you can give me a hint what I need to show here?


4 Answers 4


There are three easy tests to check if a transformation is canonical. Note that some multiplicative constants might pop up in certain textbooks, depending on the exact definition of canonical transformation.


Let $x = (p, q)$ be the $2n$ variables, and the transformed variables be $\tilde{x}(x) = (\tilde{p}(p, q), \tilde{q}(p, q))$.

The method of the symplectic jacobian

Let $J = \partial \tilde{x} /\partial x $ be the Jacobian matrix of the transformation. Moreover, let $\mathbb{E}$ be a $2n \times 2n$ block matrix $$ \mathbb{E} = \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix} $$

Then the transformation is canonical if and only if

$$ J\mathbb{E}J^T = \mathbb{E} $$

The method of Poisson brackets

The transformation is canonical if and only if the fundamental Poisson brackets are preserved

$$ \{\tilde{p}_i, \tilde{p}_j\} = 0 \qquad \{\tilde{q}_i, \tilde{q}_j\} = 0 \qquad \{\tilde{q}_i, \tilde{p}_j\} = \delta_{ij} $$

The method of the Liouville differential form

This is somewhat less practical, but I include it for completeness. The transformation is canonical if and only if the differential form $\sum_i p_i \mathrm{d}q_i - \sum_i \tilde{p}_i \mathrm{d}\tilde{q}_i$ is closed.

  • $\begingroup$ Can you give a reference for the method of the symplectic jacobian (preferably a book)? :) $\endgroup$ Commented Jun 10, 2018 at 23:15
  • $\begingroup$ Its Goldstein-Classical mechanics $\endgroup$
    – Mass
    Commented Oct 9, 2021 at 5:54
  • $\begingroup$ Do you also have a reference for the Liouville differential form method? $\endgroup$
    – P11P
    Commented Dec 18, 2022 at 21:09

Hint: Poisson Brackets are canonical invariants, this is

$$\{F,G\}_{q,p}=\{F,G\}_{Q,P} $$

  • 5
    $\begingroup$ so it is sufficient to show that $\{Q,P\}_{q,p}=1$? $\endgroup$
    – Xin Wang
    Commented Jul 2, 2013 at 18:09
  • 3
    $\begingroup$ Yes; this is the more robust definition of a CT. Since PBs are derivative-like, i.e., obey the chain rule, you only need compute two terms, easily, to verify the relation you are asking about. $\endgroup$ Commented Aug 6, 2016 at 0:59

Another way (a practical shortcut) is to try to find a generating function. In this case, we shall use $F_3(Q, p)$ since $Q$ and $p$ appear to be more basic variable. The original equations are equivalent to \begin{align} P &= q \, \cot p \tag{1} \\ q &= e^{-Q} \, \sin p. \tag{2} \end{align} Eq. (1) is equivalent to \begin{align} P = e^{-Q} \, \cos p. \tag{3} \end{align}

Now from Eqs. (2) and (3), we can readily verify that $F_3(Q, p) = e^{-Q} \cos p$ satisfies \begin{align} P = - \frac{ \partial F_3 }{ \partial Q }, \tag{4} \\ q = - \frac{ \partial F_3 }{ \partial p }. \tag{5} \end{align} This means for the given transformation is generated by this $F_3(Q, p)$, and hence is canonical.

Note that the possible functional form of $F_3(Q, p)$ can be deduced from a trial-and-error approach. In this case, we actually integrated Eq. (4), $$ F_3 = -\int P \, dQ = -\int e^{-Q} \cos p \, dQ = e^{-Q} \cos p, $$ and then verified it satisfied Eq. (5).


The answer by Enucatl is satisfying enough. However, in the example $$P=q \cot(p),$$ $$Q=\ln \left (\frac{\sin(p)}{q}\right),$$ given in the question, it seems there is dimensional mismatching.

The argument inside $\cot$ must be some $[p/(p_o)]$ where $p_o$ has dimensions of momentum and the argument of the logarithm must be $$q_o \frac{\sin(p/p'_o)}{q},$$ $p'_o$ neednot be equal to $p_o$. Even if P and Q do not have dimensions of momentum and length respectively it may not matter (well known as per any general case of a canonical transformation).

I am curious to know if the operations for dimensional matching implied (like the fashionable(which I don't like) way of certain books taking $c=1$ and calling the relativistic energy of a free particle $E =(m^2+p^2)^{1/2}$ instead of $ E = (m^2 c^4+p^2c^2)^{1/2}$ etc.).

  • $\begingroup$ Throughout the chapter on Canonical Transformations we always assume that before carrying out any algebra we have divided $p$ and $q$ both by suitable scale factors so as to make them dimensionally consistent. $\endgroup$
    – Physiker
    Commented Nov 10, 2021 at 14:08

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