# Canonical transformation

In Hamiltonian mechanics, a canonical transformation is a change of canonical coordinates (q, p) → (Q, P) that preserves the form of Hamilton's equations. This is sometimes known as form invariance. Although Hamilton's equations are preserved, it need not preserve the explicit form of the Hamiltonian itself. Canonical transformations are useful in their own right, and also form the basis for the Hamilton–Jacobi equations (a useful method for calculating conserved quantities) and Liouville's theorem (itself the basis for classical statistical mechanics).

Since Lagrangian mechanics is based on generalized coordinates, transformations of the coordinates qQ do not affect the form of Lagrange's equations and, hence, do not affect the form of Hamilton's equations if the momentum is simultaneously changed by a Legendre transformation into ${\displaystyle P_{i}={\frac {\partial L}{\partial {\dot {Q}}_{i}}}\ ,}$ where ${\displaystyle \left\{\ (P_{1},Q_{1}),\ (P_{2},Q_{2}),\ (P_{3},Q_{3}),\ \ldots \ \right\}}$ are the new co‑ordinates, grouped in canonical conjugate pairs of momenta ${\displaystyle P_{i}}$ and corresponding positions ${\displaystyle Q_{i},}$ for ${\displaystyle i=1,2,\ldots \ N,}$ with ${\displaystyle N}$ being the number of degrees of freedom in both co‑ordinate systems.

Therefore, coordinate transformations (also called point transformations) are a type of canonical transformation. However, the class of canonical transformations is much broader, since the old generalized coordinates, momenta and even time may be combined to form the new generalized coordinates and momenta. Canonical transformations that do not include the time explicitly are called restricted canonical transformations (many textbooks consider only this type).

Modern mathematical descriptions of canonical transformations are considered under the broader topic of symplectomorphism which covers the subject with advanced mathematical prerequisites such as cotangent bundles, exterior derivatives and symplectic manifolds.

## Notation

Boldface variables such as q represent a list of N generalized coordinates that need not transform like a vector under rotation and similarly p represents the corresponding generalized momentum, e.g., {\displaystyle {\begin{aligned}\mathbf {q} &\equiv \left(q_{1},q_{2},\ldots ,q_{N-1},q_{N}\right)\\\mathbf {p} &\equiv \left(p_{1},p_{2},\ldots ,p_{N-1},p_{N}\right).\end{aligned}}}

A dot over a variable or list signifies the time derivative, e.g., ${\displaystyle {\dot {\mathbf {q} }}\equiv {\frac {d\mathbf {q} }{dt}}}$and the equalities are read to be satisfied for all coordinates, for example:${\displaystyle {\dot {\mathbf {p} }}=-{\frac {\partial f}{\partial \mathbf {q} }}\quad \Longleftrightarrow \quad {\dot {p_{i}}}=-{\frac {\partial f}{\partial {q_{i}}}}\quad (\forall i).}$

The dot product notation between two lists of the same number of coordinates is a shorthand for the sum of the products of corresponding components, e.g., ${\displaystyle \mathbf {p} \cdot \mathbf {q} \equiv \sum _{k=1}^{N}p_{k}q_{k}.}$

The dot product (also known as an "inner product") maps the two coordinate lists into one variable representing a single numerical value. The coordinates after transformation are similarly labelled with Q for transformed generalized coordinates and P for transformed generalized momentum.

## Conditions for restricted canonical transformation

Restricted canonical transformations are coordinate transformations where transformed coordinates Q and P do not have explicit time dependence, ie. ${\textstyle \mathbf {Q} =\mathbf {Q} (\mathbf {q} ,\mathbf {p} )}$ and ${\textstyle \mathbf {P} =\mathbf {P} (\mathbf {q} ,\mathbf {p} )}$. The functional form of Hamilton's equations is{\displaystyle {\begin{aligned}{\dot {\mathbf {p} }}&=-{\frac {\partial H}{\partial \mathbf {q} }}\\{\dot {\mathbf {q} }}&={\frac {\partial H}{\partial \mathbf {p} }}\end{aligned}}} In general, a transformation (q, p) → (Q, P) does not preserve the form of Hamilton's equations but in the absence of time dependence in transformation, some simplifications are possible. Following the formal definition for a canonical transformation, it can be shown that for this type of transformation, the new Hamiltonian (sometimes called the Kamiltonian[1]) can be expressed as:${\displaystyle K(\mathbf {Q} ,\mathbf {P} ,t)=H(q(\mathbf {Q} ,\mathbf {P} ),p(\mathbf {Q} ,\mathbf {P} ),t)+{\frac {\partial G}{\partial t}}(t)}$where it differs by a partial time derivative of a function known as generator, which reduces to being only a function of time for restricted canonical transformations.

In addition to leaving the form of the Hamiltonian unchanged, it is also permits the use of the unchanged Hamiltonian in the Hamilton's equations of motion due to the above form as:

{\displaystyle {\begin{alignedat}{3}{\dot {\mathbf {P} }}&=-{\frac {\partial K}{\partial \mathbf {Q} }}&&=-\left({\frac {\partial H}{\partial \mathbf {Q} }}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\\{\dot {\mathbf {Q} }}&=\,\,\,\,{\frac {\partial K}{\partial \mathbf {P} }}&&=\,\,\,\,\,\left({\frac {\partial H}{\partial \mathbf {P} }}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\\\end{alignedat}}}

Although canonical transformations refers to a more general set of transformations of phase space corresponding with less permissive transformations of the Hamiltonian, it provides simpler conditions to obtain results that can be further generalized. All of the following conditions, with the exception of bilinear invariance condition, can be generalized for canonical transformations, including time dependance.

### Indirect conditions

Since restricted transformations have no explicit time dependence (by definition), the time derivative of a new generalized coordinate Qm is

{\displaystyle {\begin{aligned}{\dot {Q}}_{m}&={\frac {\partial Q_{m}}{\partial \mathbf {q} }}\cdot {\dot {\mathbf {q} }}+{\frac {\partial Q_{m}}{\partial \mathbf {p} }}\cdot {\dot {\mathbf {p} }}\\&={\frac {\partial Q_{m}}{\partial \mathbf {q} }}\cdot {\frac {\partial H}{\partial \mathbf {p} }}-{\frac {\partial Q_{m}}{\partial \mathbf {p} }}\cdot {\frac {\partial H}{\partial \mathbf {q} }}\\&=\lbrace Q_{m},H\rbrace \end{aligned}}}
where {⋅, ⋅} is the Poisson bracket.

Similarly for the identity for the conjugate momentum, Pm using the form of the Kamiltonian it follows that:

{\displaystyle {\begin{aligned}&{\frac {\partial K(\mathbf {Q} ,\mathbf {P} ,t)}{\partial P_{m}}}\\&={\frac {\partial K(\mathbf {Q} (\mathbf {q} ,\mathbf {p} ),\mathbf {P} (\mathbf {q} ,\mathbf {p} ),t)}{\partial \mathbf {q} }}\cdot {\frac {\partial \mathbf {q} }{\partial P_{m}}}+{\frac {\partial K(\mathbf {Q} (\mathbf {q} ,\mathbf {p} ),\mathbf {P} (\mathbf {q} ,\mathbf {p} ),t)}{\partial \mathbf {p} }}\cdot {\frac {\partial \mathbf {p} }{\partial P_{m}}}\\&={\frac {\partial H(\mathbf {q} ,\mathbf {p} ,t)}{\partial \mathbf {q} }}\cdot {\frac {\partial \mathbf {q} }{\partial P_{m}}}+{\frac {\partial H(\mathbf {q} ,\mathbf {p} ,t)}{\partial \mathbf {p} }}\cdot {\frac {\partial \mathbf {p} }{\partial P_{m}}}\\&={\frac {\partial H}{\partial \mathbf {q} }}\cdot {\frac {\partial \mathbf {q} }{\partial P_{m}}}+{\frac {\partial H}{\partial \mathbf {p} }}\cdot {\frac {\partial \mathbf {p} }{\partial P_{m}}}\end{aligned}}}

Due to the form of the Hamiltonian equations of motion,

{\displaystyle {\begin{aligned}{\dot {\mathbf {P} }}&=-{\frac {\partial K}{\partial \mathbf {Q} }}\\{\dot {\mathbf {Q} }}&=\,\,\,\,{\frac {\partial K}{\partial \mathbf {P} }}\end{aligned}}}

if the transformation is canonical, the two derived results must be equal, resulting in the equations: {\displaystyle {\begin{aligned}\left({\frac {\partial Q_{m}}{\partial p_{n}}}\right)_{\mathbf {q} ,\mathbf {p} }&=-\left({\frac {\partial q_{n}}{\partial P_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} }\\\left({\frac {\partial Q_{m}}{\partial q_{n}}}\right)_{\mathbf {q} ,\mathbf {p} }&=\left({\frac {\partial p_{n}}{\partial P_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} }\end{aligned}}}

The analogous argument for the generalized momenta Pm leads to two other sets of equations: {\displaystyle {\begin{aligned}\left({\frac {\partial P_{m}}{\partial p_{n}}}\right)_{\mathbf {q} ,\mathbf {p} }&=\left({\frac {\partial q_{n}}{\partial Q_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} }\\\left({\frac {\partial P_{m}}{\partial q_{n}}}\right)_{\mathbf {q} ,\mathbf {p} }&=-\left({\frac {\partial p_{n}}{\partial Q_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} }\end{aligned}}}

These are the indirect conditions to check whether a given transformation is canonical.

### Symplectic condition

Sometimes the Hamiltonian relations are represented as:

${\displaystyle {\dot {\eta }}=J\nabla _{\eta }H}$

Where ${\textstyle J:={\begin{pmatrix}0&I_{n}\\-I_{n}&0\\\end{pmatrix}},}$

and ${\textstyle \mathbf {\eta } ={\begin{bmatrix}q_{1}\\\vdots \\q_{n}\\p_{1}\\\vdots \\p_{n}\\\end{bmatrix}}}$. Similarly, let ${\textstyle \mathbf {\varepsilon } ={\begin{bmatrix}Q_{1}\\\vdots \\Q_{n}\\P_{1}\\\vdots \\P_{n}\\\end{bmatrix}}}$.

From the relation of partial derivatives, converting the ${\displaystyle {\dot {\eta }}=J\nabla _{\eta }H}$ relation in terms of partial derivatives with new variables gives ${\displaystyle {\dot {\eta }}=J(M^{T}\nabla _{\varepsilon }H)}$ where ${\textstyle M:={\frac {\partial (\mathbf {Q} ,\mathbf {P} )}{\partial (\mathbf {q} ,\mathbf {p} )}}}$. Similarly for ${\textstyle {\dot {\varepsilon }}}$,

${\displaystyle {\dot {\varepsilon }}=M{\dot {\eta }}=MJM^{T}\nabla _{\varepsilon }H}$

Due to form of the Hamiltonian equations for ${\textstyle {\dot {\varepsilon }}}$,

${\displaystyle {\dot {\varepsilon }}=J\nabla _{\varepsilon }K=J\nabla _{\varepsilon }H}$

where ${\textstyle \nabla _{\varepsilon }K=\nabla _{\varepsilon }H}$ can be used due to the form of Kamiltonian. Equating the two equations gives the symplectic condition as:[2]

${\displaystyle MJM^{T}=J}$The left hand side of the above is called the Poisson matrix of ${\displaystyle \varepsilon }$, denoted as ${\textstyle {\mathcal {P}}(\varepsilon )=MJM^{T}}$. Similarly, a Lagrange matrix of ${\displaystyle \eta }$ can be constructed as ${\textstyle {\mathcal {L}}(\eta )=M^{T}JM}$.[3] It can be shown that the symplectic condition is also equivalent to ${\textstyle M^{T}JM=J}$ by using the ${\textstyle J^{-1}=-J}$ property. The set of all matrices ${\textstyle M}$ which satisfy symplectic conditions form a symplectic group. The symplectic conditions are equivalent with indirect conditions as they both lead to the equation ${\textstyle {\dot {\varepsilon }}=J\nabla _{\varepsilon }H}$, which is used in both of the derivations.

### Invariance of Poisson Bracket

The Poisson bracket which is defined as:${\displaystyle \{u,v\}_{\eta }:=\sum _{i=1}^{n}\left({\frac {\partial u}{\partial q_{i}}}{\frac {\partial v}{\partial p_{i}}}-{\frac {\partial u}{\partial p_{i}}}{\frac {\partial v}{\partial q_{i}}}\right)}$can be represented in matrix form as:${\displaystyle \{u,v\}_{\eta }:=(\nabla _{\eta }u)^{T}J(\nabla _{\eta }v)}$Hence using partial derivative relations and symplectic condition gives:[4]${\displaystyle \{u,v\}_{\eta }=(\nabla _{\eta }u)^{T}J(\nabla _{\eta }v)=(M^{T}\nabla _{\varepsilon }u)^{T}J(M^{T}\nabla _{\varepsilon }v)=(\nabla _{\varepsilon }u)^{T}MJM^{T}(\nabla _{\varepsilon }v)=(\nabla _{\varepsilon }u)^{T}J(\nabla _{\varepsilon }v)=\{u,v\}_{\varepsilon }}$

The symplectic condition can also be recovered by taking ${\textstyle u=\varepsilon _{i}}$ and ${\textstyle v=\varepsilon _{j}}$ which shows that ${\textstyle (MJM^{T})_{ij}=J_{ij}}$. Thus these conditions are equivalent to symplectic conditions. Furthermore, it can be seen that ${\textstyle {\mathcal {P}}_{ij}(\varepsilon )=\{\varepsilon _{i},\varepsilon _{j}\}_{\eta }=(MJM^{T})_{ij}}$, which is also the result of explicitly calculating the matrix element by expanding it.[3]

### Invariance of Lagrange Bracket

The Lagrange bracket which is defined as:

${\displaystyle [u,v]_{\eta }:=\sum _{i=1}^{n}\left({\frac {\partial q_{i}}{\partial u}}{\frac {\partial p_{i}}{\partial v}}-{\frac {\partial p_{i}}{\partial u}}{\frac {\partial q_{i}}{\partial v}}\right)}$

can be represented in matrix form as:

${\displaystyle [u,v]_{\eta }:=\left({\frac {\partial \eta }{\partial u}}\right)^{T}J\left({\frac {\partial \eta }{\partial v}}\right)}$

Using similar derivation, gives:

${\displaystyle [u,v]_{\varepsilon }=(\partial _{u}\varepsilon )^{T}\,J\,(\partial _{v}\varepsilon )=(M\,\partial _{u}\eta )^{T}\,J\,(M\,\partial _{v}\eta )=(\partial _{u}\eta )^{T}\,M^{T}JM\,(\partial _{v}\eta )=(\partial _{u}\eta )^{T}\,J\,(\partial _{v}\eta )=[u,v]_{\eta }}$The symplectic condition can also be recovered by taking ${\textstyle u=\eta _{i}}$ and ${\textstyle v=\eta _{j}}$ which shows that ${\textstyle (M^{T}JM)_{ij}=J_{ij}}$. Thus these conditions are equivalent to symplectic conditions. Furthermore, it can be seen that ${\textstyle {\mathcal {L}}_{ij}(\eta )=[\eta _{i},\eta _{j}]_{\varepsilon }=(M^{T}JM)_{ij}}$, which is also the result of explicitly calculating the matrix element by expanding it.[3]

### Bilinear invariance conditions

These set of conditions only apply to restricted canonical transformations or canonical transformations that are independent of time variable.

Consider arbitrary variations of two kinds, in a single pair of generalized coordinate and the corresponding momentum:[5]

${\textstyle d\varepsilon =(dq_{1},dp_{1},0,0,\ldots ),\quad \delta \varepsilon =(\delta q_{1},\delta p_{1},0,0,\ldots ).}$

The area of the infinitesimal parallelogram is given by:

${\textstyle \delta a(12)=dq_{1}\delta p_{1}-\delta q_{1}dp_{1}={(\delta \varepsilon )}^{T}\,J\,d\varepsilon .}$

It follows from the ${\textstyle M^{T}JM=J}$ symplectic condition that the infinitesimal area is conserved under canonical transformation:

${\textstyle \delta a(12)={(\delta \varepsilon )}^{T}\,J\,d\varepsilon ={(M\delta \eta )}^{T}\,J\,Md\eta ={(\delta \eta )}^{T}\,M^{T}JM\,d\eta ={(\delta \eta )}^{T}\,J\,d\eta =\delta A(12).}$

Note that the new coordinates need not be completely oriented in one coordinate momentum plane.

Hence, the condition is more generally stated as an invariance of the form ${\textstyle {(d\varepsilon )}^{T}\,J\,\delta \varepsilon }$ under canonical transformation, expanded as:${\displaystyle \sum \delta q\cdot dp-\delta p\cdot dq=\sum \delta Q\cdot dP-\delta P\cdot dQ}$If the above is obeyed for any arbitrary variations, it would be only possible if the indirect conditions are met.[6][7] The form of the equation, ${\textstyle {v}^{T}\,J\,w}$ is also known as a symplectic product of the vectors ${\textstyle {v}}$ and ${\textstyle w}$ and the bilinear invariance condition can be stated as a local conservation of the symplectic product.[8]

## Liouville's theorem

The indirect conditions allow us to prove Liouville's theorem, which states that the volume in phase space is conserved under canonical transformations, i.e., ${\displaystyle \int \mathrm {d} \mathbf {q} \,\mathrm {d} \mathbf {p} =\int \mathrm {d} \mathbf {Q} \,\mathrm {d} \mathbf {P} }$

By calculus, the latter integral must equal the former times the determinant of Jacobian M${\displaystyle \int \mathrm {d} \mathbf {Q} \,\mathrm {d} \mathbf {P} =\int \det(M)\,\mathrm {d} \mathbf {q} \,\mathrm {d} \mathbf {p} }$Where ${\textstyle M:={\frac {\partial (\mathbf {Q} ,\mathbf {P} )}{\partial (\mathbf {q} ,\mathbf {p} )}}}$

Exploiting the "division" property of Jacobians yields${\displaystyle M\equiv {\frac {\partial (\mathbf {Q} ,\mathbf {P} )}{\partial (\mathbf {q} ,\mathbf {P} )}}\left/{\frac {\partial (\mathbf {q} ,\mathbf {p} )}{\partial (\mathbf {q} ,\mathbf {P} )}}\right.}$

Eliminating the repeated variables gives${\displaystyle M\equiv {\frac {\partial (\mathbf {Q} )}{\partial (\mathbf {q} )}}\left/{\frac {\partial (\mathbf {p} )}{\partial (\mathbf {P} )}}\right.}$

Application of the indirect conditions above yields ${\displaystyle \operatorname {det} (M)=1}$.[9]

## Generating function approach

To guarantee a valid transformation between (q, p, H) and (Q, P, K), we may resort to a direct generating function approach. Both sets of variables must obey Hamilton's principle. That is the action integral over the Lagrangians ${\displaystyle {\mathcal {L}}_{qp}=\mathbf {p} \cdot {\dot {\mathbf {q} }}-H(\mathbf {q} ,\mathbf {p} ,t)}$ and ${\displaystyle {\mathcal {L}}_{QP}=\mathbf {P} \cdot {\dot {\mathbf {Q} }}-K(\mathbf {Q} ,\mathbf {P} ,t)}$, obtained from the respective Hamiltonian via an "inverse" Legendre transformation, must be stationary in both cases (so that one can use the Euler–Lagrange equations to arrive at Hamiltonian equations of motion of the designated form; as it is shown for example here): {\displaystyle {\begin{aligned}\delta \int _{t_{1}}^{t_{2}}\left[\mathbf {p} \cdot {\dot {\mathbf {q} }}-H(\mathbf {q} ,\mathbf {p} ,t)\right]dt&=0\\\delta \int _{t_{1}}^{t_{2}}\left[\mathbf {P} \cdot {\dot {\mathbf {Q} }}-K(\mathbf {Q} ,\mathbf {P} ,t)\right]dt&=0\end{aligned}}}

One way for both variational integral equalities to be satisfied is to have ${\displaystyle \lambda \left[\mathbf {p} \cdot {\dot {\mathbf {q} }}-H(\mathbf {q} ,\mathbf {p} ,t)\right]=\mathbf {P} \cdot {\dot {\mathbf {Q} }}-K(\mathbf {Q} ,\mathbf {P} ,t)+{\frac {dG}{dt}}}$

Lagrangians are not unique: one can always multiply by a constant λ and add a total time derivative dG/dt and yield the same equations of motion (as discussed on Wikibooks). In general, the scaling factor λ is set equal to one; canonical transformations for which λ ≠ 1 are called extended canonical transformations. dG/dt is kept, otherwise the problem would be rendered trivial and there would be not much freedom for the new canonical variables to differ from the old ones.

Here G is a generating function of one old canonical coordinate (q or p), one new canonical coordinate (Q or P) and (possibly) the time t. Thus, there are four basic types of generating functions (although mixtures of these four types can exist), depending on the choice of variables. As will be shown below, the generating function will define a transformation from old to new canonical coordinates, and any such transformation (q, p) → (Q, P) is guaranteed to be canonical.

The various generating functions and its properties tabulated below is discussed in detail:

Properties of four basic Canonical Transformations[10]
Generating Function Generating Function Derivatives Transformed Hamiltonian Trivial Cases
${\displaystyle G=G_{1}(q,Q,t)}$ ${\displaystyle p={\frac {\partial G_{1}}{\partial q}}}$ ${\displaystyle P=-{\frac {\partial G_{1}}{\partial Q}}}$ ${\textstyle K=H+{\frac {\partial G}{\partial t}}}$ ${\displaystyle G_{1}=qQ}$ ${\displaystyle Q=p}$ ${\displaystyle P=-q}$
${\displaystyle G=G_{2}(q,P,t)-QP}$ ${\displaystyle p={\frac {\partial G_{2}}{\partial q}}}$ ${\displaystyle Q={\frac {\partial G_{2}}{\partial P}}}$ ${\displaystyle G_{2}=qP}$ ${\displaystyle Q=q}$ ${\displaystyle P=p}$
${\displaystyle G=G_{3}(p,Q,t)+qp}$ ${\displaystyle q=-{\frac {\partial G_{3}}{\partial p}}}$ ${\displaystyle P=-{\frac {\partial G_{3}}{\partial Q}}}$ ${\displaystyle G_{3}=pQ}$ ${\displaystyle Q=-q}$ ${\displaystyle P=-p}$
${\displaystyle G=G_{4}(p,P,t)+qp-QP}$ ${\displaystyle q=-{\frac {\partial G_{4}}{\partial p}}}$ ${\displaystyle Q={\frac {\partial G_{4}}{\partial P}}}$ ${\displaystyle G_{1}=pP}$ ${\displaystyle Q=p}$ ${\displaystyle P=-q}$

### Type 1 generating function

The type 1 generating function G1 depends only on the old and new generalized coordinates ${\displaystyle G\equiv G_{1}(\mathbf {q} ,\mathbf {Q} ,t)}$ To derive the implicit transformation, we expand the defining equation above ${\displaystyle \mathbf {p} \cdot {\dot {\mathbf {q} }}-H(\mathbf {q} ,\mathbf {p} ,t)=\mathbf {P} \cdot {\dot {\mathbf {Q} }}-K(\mathbf {Q} ,\mathbf {P} ,t)+{\frac {\partial G_{1}}{\partial t}}+{\frac {\partial G_{1}}{\partial \mathbf {q} }}\cdot {\dot {\mathbf {q} }}+{\frac {\partial G_{1}}{\partial \mathbf {Q} }}\cdot {\dot {\mathbf {Q} }}}$

Since the new and old coordinates are each independent, the following 2N + 1 equations must hold {\displaystyle {\begin{aligned}\mathbf {p} &={\frac {\partial G_{1}}{\partial \mathbf {q} }}\\\mathbf {P} &=-{\frac {\partial G_{1}}{\partial \mathbf {Q} }}\\K&=H+{\frac {\partial G_{1}}{\partial t}}\end{aligned}}}

These equations define the transformation (q, p) → (Q, P) as follows: The first set of N equations ${\displaystyle \ \mathbf {p} ={\frac {\ \partial G_{1}\ }{\partial \mathbf {q} }}\ }$ define relations between the new generalized coordinates Q and the old canonical coordinates (q, p). Ideally, one can invert these relations to obtain formulae for each Qk as a function of the old canonical coordinates. Substitution of these formulae for the Q coordinates into the second set of N equations ${\displaystyle \mathbf {P} =-{\frac {\partial G_{1}}{\partial \mathbf {Q} }}}$ yields analogous formulae for the new generalized momenta P in terms of the old canonical coordinates (q, p). We then invert both sets of formulae to obtain the old canonical coordinates (q, p) as functions of the new canonical coordinates (Q, P). Substitution of the inverted formulae into the final equation ${\displaystyle K=H+{\frac {\partial G_{1}}{\partial t}}}$ yields a formula for K as a function of the new canonical coordinates (Q, P).

In practice, this procedure is easier than it sounds, because the generating function is usually simple. For example, let ${\displaystyle G_{1}\equiv \mathbf {q} \cdot \mathbf {Q} }$ This results in swapping the generalized coordinates for the momenta and vice versa {\displaystyle {\begin{aligned}\mathbf {p} &={\frac {\partial G_{1}}{\partial \mathbf {q} }}=\mathbf {Q} \\\mathbf {P} &=-{\frac {\partial G_{1}}{\partial \mathbf {Q} }}=-\mathbf {q} \end{aligned}}} and K = H. This example illustrates how independent the coordinates and momenta are in the Hamiltonian formulation; they are equivalent variables.

### Type 2 generating function

The type 2 generating function ${\displaystyle G_{2}(\mathbf {q} ,\mathbf {P} ,t)}$ depends only on the old generalized coordinates and the new generalized momenta ${\displaystyle G\equiv G_{2}(\mathbf {q} ,\mathbf {P} ,t)-\mathbf {Q} \cdot \mathbf {P} }$ where the ${\displaystyle -\mathbf {Q} \cdot \mathbf {P} }$ terms represent a Legendre transformation to change the right-hand side of the equation below. To derive the implicit transformation, we expand the defining equation above ${\displaystyle \mathbf {p} \cdot {\dot {\mathbf {q} }}-H(\mathbf {q} ,\mathbf {p} ,t)=-\mathbf {Q} \cdot {\dot {\mathbf {P} }}-K(\mathbf {Q} ,\mathbf {P} ,t)+{\frac {\partial G_{2}}{\partial t}}+{\frac {\partial G_{2}}{\partial \mathbf {q} }}\cdot {\dot {\mathbf {q} }}+{\frac {\partial G_{2}}{\partial \mathbf {P} }}\cdot {\dot {\mathbf {P} }}}$

Since the old coordinates and new momenta are each independent, the following 2N + 1 equations must hold {\displaystyle {\begin{aligned}\mathbf {p} &={\frac {\partial G_{2}}{\partial \mathbf {q} }}\\\mathbf {Q} &={\frac {\partial G_{2}}{\partial \mathbf {P} }}\\K&=H+{\frac {\partial G_{2}}{\partial t}}\end{aligned}}}

These equations define the transformation (q, p) → (Q, P) as follows: The first set of N equations ${\displaystyle \mathbf {p} ={\frac {\partial G_{2}}{\partial \mathbf {q} }}}$ define relations between the new generalized momenta P and the old canonical coordinates (q, p). Ideally, one can invert these relations to obtain formulae for each Pk as a function of the old canonical coordinates. Substitution of these formulae for the P coordinates into the second set of N equations ${\displaystyle \mathbf {Q} ={\frac {\partial G_{2}}{\partial \mathbf {P} }}}$ yields analogous formulae for the new generalized coordinates Q in terms of the old canonical coordinates (q, p). We then invert both sets of formulae to obtain the old canonical coordinates (q, p) as functions of the new canonical coordinates (Q, P). Substitution of the inverted formulae into the final equation ${\displaystyle K=H+{\frac {\partial G_{2}}{\partial t}}}$ yields a formula for K as a function of the new canonical coordinates (Q, P).

In practice, this procedure is easier than it sounds, because the generating function is usually simple. For example, let ${\displaystyle G_{2}\equiv \mathbf {g} (\mathbf {q} ;t)\cdot \mathbf {P} }$ where g is a set of N functions. This results in a point transformation of the generalized coordinates ${\displaystyle \mathbf {Q} ={\frac {\partial G_{2}}{\partial \mathbf {P} }}=\mathbf {g} (\mathbf {q} ;t)}$

### Type 3 generating function

The type 3 generating function ${\displaystyle G_{3}(\mathbf {p} ,\mathbf {Q} ,t)}$ depends only on the old generalized momenta and the new generalized coordinates ${\displaystyle G\equiv G_{3}(\mathbf {p} ,\mathbf {Q} ,t)+\mathbf {q} \cdot \mathbf {p} }$ where the ${\displaystyle \mathbf {q} \cdot \mathbf {p} }$ terms represent a Legendre transformation to change the left-hand side of the equation below. To derive the implicit transformation, we expand the defining equation above ${\displaystyle -\mathbf {q} \cdot {\dot {\mathbf {p} }}-H(\mathbf {q} ,\mathbf {p} ,t)=\mathbf {P} \cdot {\dot {\mathbf {Q} }}-K(\mathbf {Q} ,\mathbf {P} ,t)+{\frac {\partial G_{3}}{\partial t}}+{\frac {\partial G_{3}}{\partial \mathbf {p} }}\cdot {\dot {\mathbf {p} }}+{\frac {\partial G_{3}}{\partial \mathbf {Q} }}\cdot {\dot {\mathbf {Q} }}}$

Since the new and old coordinates are each independent, the following 2N + 1 equations must hold {\displaystyle {\begin{aligned}\mathbf {q} &=-{\frac {\partial G_{3}}{\partial \mathbf {p} }}\\\mathbf {P} &=-{\frac {\partial G_{3}}{\partial \mathbf {Q} }}\\K&=H+{\frac {\partial G_{3}}{\partial t}}\end{aligned}}}

These equations define the transformation (q, p) → (Q, P) as follows: The first set of N equations ${\displaystyle \mathbf {q} =-{\frac {\partial G_{3}}{\partial \mathbf {p} }}}$ define relations between the new generalized coordinates Q and the old canonical coordinates (q, p). Ideally, one can invert these relations to obtain formulae for each Qk as a function of the old canonical coordinates. Substitution of these formulae for the Q coordinates into the second set of N equations ${\displaystyle \mathbf {P} =-{\frac {\partial G_{3}}{\partial \mathbf {Q} }}}$ yields analogous formulae for the new generalized momenta P in terms of the old canonical coordinates (q, p). We then invert both sets of formulae to obtain the old canonical coordinates (q, p) as functions of the new canonical coordinates (Q, P). Substitution of the inverted formulae into the final equation ${\displaystyle K=H+{\frac {\partial G_{3}}{\partial t}}}$ yields a formula for K as a function of the new canonical coordinates (Q, P).

In practice, this procedure is easier than it sounds, because the generating function is usually simple.

### Type 4 generating function

The type 4 generating function ${\displaystyle G_{4}(\mathbf {p} ,\mathbf {P} ,t)}$ depends only on the old and new generalized momenta ${\displaystyle G\equiv G_{4}(\mathbf {p} ,\mathbf {P} ,t)+\mathbf {q} \cdot \mathbf {p} -\mathbf {Q} \cdot \mathbf {P} }$ where the ${\displaystyle \mathbf {q} \cdot \mathbf {p} -\mathbf {Q} \cdot \mathbf {P} }$ terms represent a Legendre transformation to change both sides of the equation below. To derive the implicit transformation, we expand the defining equation above ${\displaystyle -\mathbf {q} \cdot {\dot {\mathbf {p} }}-H(\mathbf {q} ,\mathbf {p} ,t)=-\mathbf {Q} \cdot {\dot {\mathbf {P} }}-K(\mathbf {Q} ,\mathbf {P} ,t)+{\frac {\partial G_{4}}{\partial t}}+{\frac {\partial G_{4}}{\partial \mathbf {p} }}\cdot {\dot {\mathbf {p} }}+{\frac {\partial G_{4}}{\partial \mathbf {P} }}\cdot {\dot {\mathbf {P} }}}$

Since the new and old coordinates are each independent, the following 2N + 1 equations must hold {\displaystyle {\begin{aligned}\mathbf {q} &=-{\frac {\partial G_{4}}{\partial \mathbf {p} }}\\\mathbf {Q} &={\frac {\partial G_{4}}{\partial \mathbf {P} }}\\K&=H+{\frac {\partial G_{4}}{\partial t}}\end{aligned}}}

These equations define the transformation (q, p) → (Q, P) as follows: The first set of N equations ${\displaystyle \mathbf {q} =-{\frac {\partial G_{4}}{\partial \mathbf {p} }}}$ define relations between the new generalized momenta P and the old canonical coordinates (q, p). Ideally, one can invert these relations to obtain formulae for each Pk as a function of the old canonical coordinates. Substitution of these formulae for the P coordinates into the second set of N equations ${\displaystyle \mathbf {Q} ={\frac {\partial G_{4}}{\partial \mathbf {P} }}}$ yields analogous formulae for the new generalized coordinates Q in terms of the old canonical coordinates (q, p). We then invert both sets of formulae to obtain the old canonical coordinates (q, p) as functions of the new canonical coordinates (Q, P). Substitution of the inverted formulae into the final equation ${\displaystyle K=H+{\frac {\partial G_{4}}{\partial t}}}$ yields a formula for K as a function of the new canonical coordinates (Q, P).

### Restrictions on generating functions

For example, using generating function of second kind: ${\textstyle {p}_{i}={\frac {\partial G_{2}}{\partial {q}_{i}}}}$ and ${\textstyle {Q}_{i}={\frac {\partial G_{2}}{\partial {P}_{i}}}}$, the first set of equations consisting of variables ${\textstyle \mathbf {p} }$, ${\textstyle \mathbf {q} }$ and ${\textstyle \mathbf {P} }$ has to be inverted to get ${\textstyle \mathbf {P} (\mathbf {q} ,\mathbf {p} )}$. This process is possible when the matrix defined by ${\textstyle a_{ij}={\frac {\partial {p}_{i}(\mathbf {q} ,\mathbf {P} )}{\partial P_{j}}}}$ is non-singular.[11]

${\displaystyle \left|{\begin{array}{l l l}{\displaystyle {\frac {\partial ^{2}G_{2}}{\partial P_{1}\partial q_{1}}}}&{\cdots }&{\displaystyle {\frac {\partial ^{2}G_{2}}{\partial P_{1}\partial q_{n}}}}\\{\quad \vdots }&{\ddots }&{\quad \vdots }\\{\displaystyle {\frac {\partial ^{2}G_{2}}{\partial P_{n}\partial q_{1}}}}&{\cdots }&{\displaystyle {\frac {\partial ^{2}G_{2}}{\partial P_{n}\partial q_{n}}}}\end{array}}\right|{\neq 0}}$

Hence, restrictions are placed on generating functions to have the matrices: ${\textstyle \left[{\frac {\partial ^{2}G_{1}}{\partial Q_{j}\partial q_{i}}}\right]}$, ${\textstyle \left[{\frac {\partial ^{2}G_{2}}{\partial P_{j}\partial q_{i}}}\right]}$, ${\textstyle \left[{\frac {\partial ^{2}G_{3}}{\partial p_{j}\partial Q_{i}}}\right]}$ and ${\textstyle \left[{\frac {\partial ^{2}G_{4}}{\partial p_{j}\partial P_{i}}}\right]}$, being non-singular.[12][13]

### Limitations of generating functions

Since ${\textstyle \left[{\frac {\partial ^{2}G_{2}}{\partial P_{j}\partial q_{i}}}\right]}$ is non-singular, it implies that ${\textstyle \left[{\frac {\partial {p}_{i}(\mathbf {q} ,\mathbf {P} )}{\partial P_{j}}}\right]}$ is also non-singular. Since the matrix ${\textstyle \left[{\frac {\partial P_{i}(\mathbf {q} ,\mathbf {p} )}{\partial p_{j}}}\right]}$ is inverse of ${\textstyle \left[{\frac {\partial {p}_{i}(\mathbf {q} ,\mathbf {P} )}{\partial P_{j}}}\right]}$, the transformations of type 2 generating functions always have a non-singular ${\textstyle \left[{\frac {\partial P_{i}(\mathbf {q} ,\mathbf {p} )}{\partial p_{j}}}\right]}$ matrix. Similarly, it can be stated that type 1 and type 4 generating functions always have a non-singular ${\textstyle \left[{\frac {\partial Q_{i}(\mathbf {q} ,\mathbf {p} )}{\partial p_{j}}}\right]}$ matrix whereas type 2 and type 3 generating functions always have a non-singular ${\textstyle \left[{\frac {\partial P_{i}(\mathbf {q} ,\mathbf {p} )}{\partial p_{j}}}\right]}$ matrix. Hence, the canonical transformations resulting from these generating functions are not completely general.[14]

In other words, since (Q, P) and (q, p) are each 2N independent functions, it follows that to have generating function of the form ${\textstyle G_{1}(\mathbf {q} ,\mathbf {Q} ,t)}$ and ${\displaystyle G_{4}(\mathbf {p} ,\mathbf {P} ,t)}$ or ${\displaystyle G_{2}(\mathbf {q} ,\mathbf {P} ,t)}$ and ${\displaystyle G_{3}(\mathbf {p} ,\mathbf {Q} ,t)}$, the corresponding Jacobian matrices ${\textstyle \left[{\frac {\partial Q_{i}}{\partial p_{j}}}\right]}$ and ${\textstyle \left[{\frac {\partial P_{i}}{\partial p_{j}}}\right]}$ are restricted to be non singular, ensuring that the generating function is a function of 2N + 1 independent variables. However, as a feature of canonical transformations, it is always possible to choose 2N such independent functions from sets (q, p) or (Q, P), to form a generating function representation of canonical transformations, including the time variable. Hence, it can be proved that every finite canonical transformation can be given as a closed but implicit form that is a variant of the given four simple forms.[15]

## Canonical transformation conditions

### Canonical transformation relations

From: ${\displaystyle K=H+{\frac {\partial G}{\partial t}}}$, calculate ${\textstyle {\frac {\partial (K-H)}{\partial P}}}$:

{\displaystyle {\begin{aligned}\left({\frac {\partial (K-H)}{\partial P}}\right)_{Q,P,t}={\frac {\partial K}{\partial P}}-{\frac {\partial H}{\partial p}}{\frac {\partial p}{\partial P}}-{\frac {\partial H}{\partial q}}{\frac {\partial q}{\partial P}}-{\frac {\partial H}{\partial t}}\left({\frac {\partial t}{\partial P}}\right)_{Q,P,t}={\dot {Q}}+{\dot {p}}{\frac {\partial q}{\partial P}}-{\dot {q}}{\frac {\partial p}{\partial P}}\\={\frac {\partial Q}{\partial t}}+{\frac {\partial Q}{\partial q}}\cdot {\dot {q}}+{\frac {\partial Q}{\partial p}}\cdot {\dot {p}}+{\dot {p}}{\frac {\partial q}{\partial P}}-{\dot {q}}{\frac {\partial p}{\partial P}}\\={\dot {q}}\left({\frac {\partial Q}{\partial q}}-{\frac {\partial p}{\partial P}}\right)+{\dot {p}}\left({\frac {\partial q}{\partial P}}+{\frac {\partial Q}{\partial p}}\right)+{\frac {\partial Q}{\partial t}}\end{aligned}}}Since the left hand side is ${\textstyle {\frac {\partial (K-H)}{\partial P}}={\frac {\partial }{\partial P}}\left({\frac {\partial G}{\partial t}}\right){\bigg |}_{Q,P,t}}$ which is independent of dynamics of the particles, equating coefficients of ${\textstyle {\dot {q}}}$ and ${\textstyle {\dot {p}}}$ to zero, canonical transformation rules are obtained. This step is equivalent to equating the left hand side as ${\textstyle {\frac {\partial (K-H)}{\partial P}}={\frac {\partial Q}{\partial t}}}$.

Similarly:

{\displaystyle {\begin{aligned}\left({\frac {\partial (K-H)}{\partial Q}}\right)_{Q,P,t}={\frac {\partial K}{\partial Q}}-{\frac {\partial H}{\partial p}}{\frac {\partial p}{\partial Q}}-{\frac {\partial H}{\partial q}}{\frac {\partial q}{\partial Q}}-{\frac {\partial H}{\partial t}}\left({\frac {\partial t}{\partial Q}}\right)_{Q,P,t}=-{\dot {P}}+{\dot {p}}{\frac {\partial q}{\partial Q}}-{\dot {q}}{\frac {\partial p}{\partial Q}}\\=-{\frac {\partial P}{\partial t}}-{\frac {\partial P}{\partial q}}\cdot {\dot {q}}-{\frac {\partial P}{\partial p}}\cdot {\dot {p}}+{\dot {p}}{\frac {\partial q}{\partial Q}}-{\dot {q}}{\frac {\partial p}{\partial Q}}\\=-\left({\dot {q}}\left({\frac {\partial P}{\partial q}}+{\frac {\partial p}{\partial Q}}\right)+{\dot {p}}\left({\frac {\partial P}{\partial p}}-{\frac {\partial q}{\partial Q}}\right)+{\frac {\partial P}{\partial t}}\right)\end{aligned}}}Similarly the canonical transformation rules are obtained by equating the left hand side as ${\textstyle {\frac {\partial (K-H)}{\partial Q}}=-{\frac {\partial P}{\partial t}}}$.

The above two relations can be combined in matrix form as: ${\textstyle J\left(\nabla _{\varepsilon }{\frac {\partial G}{\partial t}}\right)={\frac {\partial \varepsilon }{\partial t}}}$ (which will also retain same form for extended canonical transformation) where the result ${\textstyle {\frac {\partial G}{\partial t}}=K-H}$, has been used. The canonical transformation relations are hence said to be equivalent to ${\textstyle J\left(\nabla _{\varepsilon }{\frac {\partial G}{\partial t}}\right)={\frac {\partial \varepsilon }{\partial t}}}$ in this context.

The canonical transformation relations can now be restated to include time dependance:{\displaystyle {\begin{aligned}\left({\frac {\partial Q_{m}}{\partial p_{n}}}\right)_{\mathbf {q} ,\mathbf {p} ,t}&=-\left({\frac {\partial q_{n}}{\partial P_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\\\left({\frac {\partial Q_{m}}{\partial q_{n}}}\right)_{\mathbf {q} ,\mathbf {p} ,t}&=\left({\frac {\partial p_{n}}{\partial P_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\end{aligned}}}{\displaystyle {\begin{aligned}\left({\frac {\partial P_{m}}{\partial p_{n}}}\right)_{\mathbf {q} ,\mathbf {p} ,t}&=\left({\frac {\partial q_{n}}{\partial Q_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\\\left({\frac {\partial P_{m}}{\partial q_{n}}}\right)_{\mathbf {q} ,\mathbf {p} ,t}&=-\left({\frac {\partial p_{n}}{\partial Q_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\end{aligned}}}Since ${\textstyle {\frac {\partial (K-H)}{\partial P}}={\frac {\partial Q}{\partial t}}}$ and ${\textstyle {\frac {\partial (K-H)}{\partial Q}}=-{\frac {\partial P}{\partial t}}}$, if Q and P do not explicitly depend on time, ${\textstyle K=H+{\frac {\partial G}{\partial t}}(t)}$ can be taken. The analysis of restricted canonical transformations is hence consistent with this generalization.

### Symplectic Condition

Applying transformation of co-ordinates formula for ${\displaystyle \nabla _{\eta }H=M^{T}\nabla _{\varepsilon }H}$, in Hamiltonian's equations gives:${\displaystyle {\dot {\eta }}=J\nabla _{\eta }H=J(M^{T}\nabla _{\varepsilon }H)}$

Similarly for ${\textstyle {\dot {\varepsilon }}}$:${\displaystyle {\dot {\varepsilon }}=M{\dot {\eta }}+{\frac {\partial \varepsilon }{\partial t}}=MJM^{T}\nabla _{\varepsilon }H+{\frac {\partial \varepsilon }{\partial t}}}$or:${\displaystyle {\dot {\varepsilon }}=J\nabla _{\varepsilon }K=J\nabla _{\varepsilon }H+J\nabla _{\varepsilon }\left({\frac {\partial G}{\partial t}}\right)}$Where the last terms of each equation cancel due to ${\textstyle J\left(\nabla _{\varepsilon }{\frac {\partial G}{\partial t}}\right)={\frac {\partial \varepsilon }{\partial t}}}$ condition from canonical transformations. Hence leaving the symplectic relation: ${\textstyle MJM^{T}=J}$ which is also equivalent with the condition ${\textstyle M^{T}JM=J}$. It follows from the above two equations that the symplectic condition implies the equation ${\textstyle J\left(\nabla _{\varepsilon }{\frac {\partial G}{\partial t}}\right)={\frac {\partial \varepsilon }{\partial t}}}$, from which the indirect conditions can be recovered. Thus, symplectic conditions and indirect conditions can be said to be equivalent in the context of using generating functions.

### Invariance of Poisson and Lagrange Bracket

Since ${\textstyle {\mathcal {P}}_{ij}(\varepsilon )=\{\varepsilon _{i},\varepsilon _{j}\}_{\eta }=(MJM^{T})_{ij}=J_{ij}}$ and ${\textstyle {\mathcal {L}}_{ij}(\eta )=[\eta _{i},\eta _{j}]_{\varepsilon }=(M^{T}JM)_{ij}=J_{ij}}$ where the symplectic condition is used in the last equalities. Using ${\textstyle \{\varepsilon _{i},\varepsilon _{j}\}_{\varepsilon }=[\eta _{i},\eta _{j}]_{\eta }=J_{ij}}$, the equalities ${\textstyle \{\varepsilon _{i},\varepsilon _{j}\}_{\eta }=\{\varepsilon _{i},\varepsilon _{j}\}_{\varepsilon }}$ and ${\textstyle [\eta _{i},\eta _{j}]_{\varepsilon }=[\eta _{i},\eta _{j}]_{\eta }}$ are obtained which imply the invariance of Poisson and Lagrange brackets.

## Extended Canonical Transformation

### Canonical transformation relations

By solving for:${\displaystyle \lambda \left[\mathbf {p} \cdot {\dot {\mathbf {q} }}-H(\mathbf {q} ,\mathbf {p} ,t)\right]=\mathbf {P} \cdot {\dot {\mathbf {Q} }}-K(\mathbf {Q} ,\mathbf {P} ,t)+{\frac {dG}{dt}}}$with various forms of generating function, the relation between K and H goes as ${\textstyle {\frac {\partial G}{\partial t}}=K-\lambda H}$ instead, which also applies for ${\textstyle \lambda =1}$ case.

All results presented below can also be obtained by replacing ${\textstyle q\rightarrow {\sqrt {\lambda }}q}$, ${\textstyle p\rightarrow {\sqrt {\lambda }}p}$ and ${\textstyle H\rightarrow {\lambda }H}$ from known solutions, since it retains the form of Hamilton's equations. The extended canonical transformations are hence said to be result of a canonical transformation (${\textstyle \lambda =1}$) and a trivial canonical transformation (${\textstyle \lambda \neq 1}$) which has ${\textstyle MJM^{T}=\lambda J}$ (for the given example, ${\textstyle M={\sqrt {\lambda }}I}$ which satisfies the condition).[16]

Using same steps previously used in previous generalization, with ${\textstyle {\frac {\partial G}{\partial t}}=K-\lambda H}$ in the general case, and retaining the equation ${\textstyle J\left(\nabla _{\varepsilon }{\frac {\partial g}{\partial t}}\right)={\frac {\partial \varepsilon }{\partial t}}}$, extended canonical transformation partial differential relations are obtained as:{\displaystyle {\begin{aligned}\left({\frac {\partial Q_{m}}{\partial p_{n}}}\right)_{\mathbf {q} ,\mathbf {p} ,t}&=-\lambda \left({\frac {\partial q_{n}}{\partial P_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\\\left({\frac {\partial Q_{m}}{\partial q_{n}}}\right)_{\mathbf {q} ,\mathbf {p} ,t}&=\lambda \left({\frac {\partial p_{n}}{\partial P_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\end{aligned}}}{\displaystyle {\begin{aligned}\left({\frac {\partial P_{m}}{\partial p_{n}}}\right)_{\mathbf {q} ,\mathbf {p} ,t}&=\lambda \left({\frac {\partial q_{n}}{\partial Q_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\\\left({\frac {\partial P_{m}}{\partial q_{n}}}\right)_{\mathbf {q} ,\mathbf {p} ,t}&=-\lambda \left({\frac {\partial p_{n}}{\partial Q_{m}}}\right)_{\mathbf {Q} ,\mathbf {P} ,t}\end{aligned}}}

### Symplectic condition

Following the same steps to derive the symplectic conditions, as: ${\displaystyle {\dot {\eta }}=J\nabla _{\eta }H=J(M^{T}\nabla _{\varepsilon }H)}$and ${\displaystyle {\dot {\varepsilon }}=M{\dot {\eta }}+{\frac {\partial \varepsilon }{\partial t}}=MJM^{T}\nabla _{\varepsilon }H+{\frac {\partial \varepsilon }{\partial t}}}$

where using ${\textstyle {\frac {\partial G}{\partial t}}=K-\lambda H}$ instead gives:${\displaystyle {\dot {\varepsilon }}=J\nabla _{\varepsilon }K=\lambda J\nabla _{\varepsilon }H+J\nabla _{\varepsilon }\left({\frac {\partial G}{\partial t}}\right)}$The second part of each equation cancel. Hence the condition for extended canonical transformation instead becomes: ${\textstyle MJM^{T}=\lambda J}$.[17]

### Poisson and Lagrange Brackets

The Poisson brackets are changed as follows:${\displaystyle \{u,v\}_{\eta }=(\nabla _{\eta }u)^{T}J(\nabla _{\eta }v)=(M^{T}\nabla _{\varepsilon }u)^{T}J(M^{T}\nabla _{\varepsilon }v)=(\nabla _{\varepsilon }u)^{T}MJM^{T}(\nabla _{\varepsilon }v)=\lambda (\nabla _{\varepsilon }u)^{T}J(\nabla _{\varepsilon }v)=\lambda \{u,v\}_{\varepsilon }}$whereas, the Lagrange brackets are changed as:

${\displaystyle [u,v]_{\varepsilon }=(\partial _{u}\varepsilon )^{T}\,J\,(\partial _{v}\varepsilon )=(M\,\partial _{u}\eta )^{T}\,J\,(M\,\partial _{v}\eta )=(\partial _{u}\eta )^{T}\,M^{T}JM\,(\partial _{v}\eta )=\lambda (\partial _{u}\eta )^{T}\,J\,(\partial _{v}\eta )=\lambda [u,v]_{\eta }}$ Hence, the Poisson bracket scales by the inverse of ${\textstyle \lambda }$ whereas the Lagrange bracket scales by a factor of ${\textstyle \lambda }$.[18]

## Infinitesimal canonical transformation

Consider the canonical transformation that depends on a continuous parameter ${\displaystyle \alpha }$, as follows:

{\displaystyle {\begin{aligned}&Q(q,p,t;\alpha )\quad \quad \quad &Q(q,p,t;0)=q\\&P(q,p,t;\alpha )\quad \quad {\text{with}}\quad &P(q,p,t;0)=p\\\end{aligned}}}

For infinitesimal values of ${\displaystyle \alpha }$, the corresponding transformations are called as infinitesimal canonical transformations which are also known as differential canonical transformations.

Consider the following generating function:

${\displaystyle G_{2}(q,P,t)=qP+\alpha G(q,P,t)}$

Since for ${\displaystyle \alpha =0}$, ${\displaystyle G_{2}=qP}$ has the resulting canonical transformation, ${\displaystyle Q=q}$ and ${\displaystyle P=p}$, this type of generating function can be used for infinitesimal canonical transformation by restricting ${\displaystyle \alpha }$ to an infinitesimal value. From the conditions of generators of second type:{\displaystyle {\begin{aligned}{p}&={\frac {\partial G_{2}}{\partial {q}}}=P+\alpha {\frac {\partial G}{\partial {q}}}(q,P,t)\\{Q}&={\frac {\partial G_{2}}{\partial {P}}}=q+\alpha {\frac {\partial G}{\partial {P}}}(q,P,t)\\\end{aligned}}}Since ${\displaystyle P=P(q,p,t;\alpha )}$, changing the variables of the function ${\displaystyle G}$ to ${\displaystyle G(q,p,t)}$ and neglecting terms of higher order of ${\displaystyle \alpha }$, gives:[19]{\displaystyle {\begin{aligned}{p}&=P+\alpha {\frac {\partial G}{\partial {q}}}(q,p,t)\\{Q}&=q+\alpha {\frac {\partial G}{\partial p}}(q,p,t)\\\end{aligned}}}Infinitesimal canonical transformations can also be derived using the matrix form of the symplectic condition.[20]

### Active canonical transformations

In the passive view of transformations, the coordinate system is changed without the physical system changing, whereas in the active view of transformation, the coordinate system is retained and the physical system is said to undergo transformations. Thus, using the relations from infinitesimal canonical transformations, the change in the system states under active view of the canonical transformation is said to be:

{\displaystyle {\begin{aligned}&\delta q=\alpha {\frac {\partial G}{\partial p}}(q,p,t)\quad {\text{and}}\quad \delta p=-\alpha {\frac {\partial G}{\partial q}}(q,p,t),\\\end{aligned}}}

or as ${\displaystyle \delta \eta =\alpha J\nabla _{\eta }G}$ in matrix form.

For any function ${\displaystyle u(\eta )}$, it changes under active view of the transformation according to:

${\displaystyle \delta u=u(\eta +\delta \eta )-u(\eta )=(\nabla _{\eta }u)^{T}\delta \eta =\alpha (\nabla _{\eta }u)^{T}J(\nabla _{\eta }G)=\alpha \{u,G\}.}$

Considering the change of Hamiltonians in the active view, ie. for a fixed point,${\displaystyle K(Q=q_{0},P=p_{0},t)-H(q=q_{0},p=p_{0},t)=\left(H(q_{0}',p_{0}',t)+{\frac {\partial G_{2}}{\partial t}}\right)-H(q_{0},p_{0},t)=-\delta H+\alpha {\frac {\partial G}{\partial t}}=\alpha \left(\{G,H\}+{\frac {\partial G}{\partial t}}\right)=\alpha {\frac {dG}{dt}}}$where ${\textstyle (q=q_{0}',p=p_{0}')}$ are mapped to the point, ${\textstyle (Q=q_{0},P=p_{0})}$ by the infinitesimal canonical transformation, and similar change of variables for ${\displaystyle G(q,P,t)}$ to ${\displaystyle G(q,p,t)}$ is considered up-to first order of ${\displaystyle \alpha }$. Hence, if the Hamiltonian is invariant for infinitesimal canonical transformations, its generator is a constant of motion.

### Examples of ICT

#### Time evolution

Taking ${\displaystyle G(q,p,t)=H(q,p,t)}$ and ${\displaystyle \alpha =dt}$, then ${\displaystyle \delta \eta =(J\nabla _{\eta }H)dt={\dot {\eta }}dt=d\eta }$. Thus the continuous application of such a transformation maps the coordinates ${\displaystyle \eta (\tau )}$ to ${\displaystyle \eta (\tau +t)}$. Hence if the Hamiltonian is time translation invariant, i.e. does not have explicit time dependance, its value is conserved for the motion.

#### Translation

Taking ${\displaystyle G(q,p,t)=p_{k}}$, ${\displaystyle \delta p_{i}=0}$ and ${\displaystyle \delta q_{i}=\alpha \delta _{ik}}$. Hence, the canonical momentum generates a shift in the corresponding generalized coordinate and if the Hamiltonian is invariant of translation, the momentum is a constant of motion.

#### Rotation

Consider an orthogonal system for an N-particle system:

${\displaystyle {\begin{array}{l}{\mathbf {q} =\left(x_{1},y_{1},z_{1},\ldots ,x_{n},y_{n},z_{n}\right),}\\{\mathbf {p} =\left(p_{1x},p_{1y},p_{1z},\ldots ,p_{nx},p_{ny},p_{nz}\right).}\end{array}}}$

Choosing the generator to be: ${\displaystyle G=L_{z}=\sum _{i=1}^{n}\left(x_{i}p_{iy}-y_{i}p_{ix}\right)}$ and the infinitesimal value of ${\displaystyle \alpha =\delta \phi }$, then the change in the coordinates is given for x by:

${\displaystyle {\begin{array}{c}{\delta x_{i}=\{x_{i},G\}\delta \phi =\displaystyle \sum _{j}\{x_{i},x_{j}p_{jy}-y_{j}p_{jx}\}\delta \phi =\displaystyle \sum _{j}(\underbrace {\{x_{i},x_{j}p_{jy}\}} _{=0}-{\{x_{i},y_{j}p_{jx}\}}})\delta \phi \\{=\displaystyle -\sum _{j}y_{j}\underbrace {\{x_{i},p_{jx}\}} _{=\delta _{ij}}\delta \phi =-y_{i}\delta \phi }\end{array}}}$

and similarly for y:

${\displaystyle {\begin{array}{c}\delta y_{i}=\{y_{i},G\}\delta \phi =\displaystyle \sum _{j}\{y_{i},x_{j}p_{jy}-y_{j}p_{jx}\}\delta \phi =\displaystyle \sum _{j}(\{y_{i},x_{j}p_{jy}\}-\underbrace {\{y_{i},y_{j}p_{jx}\}} _{=0})\delta \phi \\{=\displaystyle \sum _{j}x_{j}\underbrace {\{y_{i},p_{jy}\}} _{=\delta _{ij}}\delta \phi =x_{i}\delta \phi \,,}\end{array}}}$

whereas the z component of all particles is unchanged: ${\displaystyle \delta z_{i}=\left\{z_{i},G\right\}\delta \phi =\sum _{j}\left\{z_{i},x_{j}p_{jy}-y_{j}p_{jx}\right\}\delta \phi =0}$.

These transformations correspond to rotation about the z axis by angle ${\displaystyle \delta \phi }$ in its first order approximation. Hence, repeated application of the infinitesimal canonical transformation generates a rotation of system of particles about the z axis. If the Hamiltonian is invariant under rotation about the z axis, the generator, the component of angular momentum along the axis of rotation, is an invariant of motion.[20]

## Motion as canonical transformation

Motion itself (or, equivalently, a shift in the time origin) is a canonical transformation. If ${\displaystyle \mathbf {Q} (t)\equiv \mathbf {q} (t+\tau )}$ and ${\displaystyle \mathbf {P} (t)\equiv \mathbf {p} (t+\tau )}$, then Hamilton's principle is automatically satisfied${\displaystyle \delta \int _{t_{1}}^{t_{2}}\left[\mathbf {P} \cdot {\dot {\mathbf {Q} }}-K(\mathbf {Q} ,\mathbf {P} ,t)\right]dt=\delta \int _{t_{1}+\tau }^{t_{2}+\tau }\left[\mathbf {p} \cdot {\dot {\mathbf {q} }}-H(\mathbf {q} ,\mathbf {p} ,t+\tau )\right]dt=0}$since a valid trajectory ${\displaystyle (\mathbf {q} (t),\mathbf {p} (t))}$ should always satisfy Hamilton's principle, regardless of the endpoints.

## Examples

• The translation ${\displaystyle \mathbf {Q} (\mathbf {q} ,\mathbf {p} )=\mathbf {q} +\mathbf {a} ,\mathbf {P} (\mathbf {q} ,\mathbf {p} )=\mathbf {p} +\mathbf {b} }$ where ${\displaystyle \mathbf {a} ,\mathbf {b} }$ are two constant vectors is a canonical transformation. Indeed, the Jacobian matrix is the identity, which is symplectic: ${\displaystyle I^{\text{T}}JI=J}$.
• Set ${\displaystyle \mathbf {x} =(q,p)}$ and ${\displaystyle \mathbf {X} =(Q,P)}$, the transformation ${\displaystyle \mathbf {X} (\mathbf {x} )=R\mathbf {x} }$ where ${\displaystyle R\in SO(2)}$ is a rotation matrix of order 2 is canonical. Keeping in mind that special orthogonal matrices obey ${\displaystyle R^{\text{T}}R=I}$ it's easy to see that the Jacobian is symplectic. However, this example only works in dimension 2: ${\displaystyle SO(2)}$ is the only special orthogonal group in which every matrix is symplectic. Note that the rotation here acts on ${\displaystyle (q,p)}$ and not on ${\displaystyle q}$ and ${\displaystyle p}$ independently, so these are not the same as a physical rotation of an orthogonal spatial coordinate system.
• The transformation ${\displaystyle (Q(q,p),P(q,p))=(q+f(p),p)}$, where ${\displaystyle f(p)}$ is an arbitrary function of ${\displaystyle p}$, is canonical. Jacobian matrix is indeed given by ${\displaystyle {\frac {\partial X}{\partial x}}={\begin{bmatrix}1&f'(p)\\0&1\end{bmatrix}}}$ which is symplectic.

## Modern mathematical description

In mathematical terms, canonical coordinates are any coordinates on the phase space (cotangent bundle) of the system that allow the canonical one-form to be written as ${\displaystyle \sum _{i}p_{i}\,dq^{i}}$ up to a total differential (exact form). The change of variable between one set of canonical coordinates and another is a canonical transformation. The index of the generalized coordinates q is written here as a superscript (${\displaystyle q^{i}}$), not as a subscript as done above (${\displaystyle q_{i}}$). The superscript conveys the contravariant transformation properties of the generalized coordinates, and does not mean that the coordinate is being raised to a power. Further details may be found at the symplectomorphism article.

## History

The first major application of the canonical transformation was in 1846, by Charles Delaunay, in the study of the Earth-Moon-Sun system. This work resulted in the publication of a pair of large volumes as Mémoires by the French Academy of Sciences, in 1860 and 1867.

## Notes

1. ^ Goldstein, Poole & Safko 2007, p. 370
2. ^ Goldstein, Poole & Safko 2007, p. 381-384
3. ^ a b c Giacaglia 1972, p. 8-9
4. ^ Lemos 2018, p. 255
5. ^ Hand & Finch 1999, p. 250-251
6. ^ Lanczos 2012, p. 121
7. ^ Gupta & Gupta 2008, p. 304
8. ^ Lurie 2002, p. 337
9. ^ Lurie 2002, p. 548-550
10. ^ Goldstein, Poole & Safko 2007, p. 373
11. ^ Johns 2005, p. 438
12. ^ Lurie 2002, p. 547
13. ^ Sudarshan & Mukunda 2010, p. 58
14. ^ Johns 2005, p. 437-439
15. ^ Sudarshan & Mukunda 2010, pp. 58–60
16. ^ Giacaglia 1972, p. 18-19
17. ^ Goldstein, Poole & Safko 2007, p. 383
18. ^ Giacaglia 1972, p. 16-17
19. ^ Johns 2005, p. 452-454
20. ^ a b Hergert, Heiko (December 10, 2021). "PHY422/820: Classical Mechanics" (PDF). Archived (PDF) from the original on December 22, 2023. Retrieved December 22, 2023.