KNOWPIA
WELCOME TO KNOWPIA

**Hamiltonian optics**^{[1]} and **Lagrangian optics**^{[2]} are two formulations of geometrical optics which share much of the mathematical formalism with Hamiltonian mechanics and Lagrangian mechanics.

In physics, Hamilton's principle states that the evolution of a system described by generalized coordinates between two specified states at two specified parameters *σ*_{A} and *σ*_{B} is a stationary point (a point where the variation is zero) of the action functional, or

where . Condition is valid if and only if the Euler-Lagrange equations are satisfied

with .

The momentum is defined as

and the Euler-Lagrange equations can then be rewritten as

where .

A different approach to solving this problem consists in defining a Hamiltonian (taking a Legendre transform of the Lagrangian) as

for which a new set of differential equations can be derived by looking at how the total differential of the Lagrangian depends on parameter *σ*, positions and their derivatives relative to *σ*. This derivation is the same as in Hamiltonian mechanics, only with time *t* now replaced by a general parameter *σ*. Those differential equations are the Hamilton's equations

with . Hamilton's equations are first-order differential equations, while Euler-Lagrange's equations are second-order.

The general results presented above for Hamilton's principle can be applied to optics.^{[3]}^{[4]} In 3D euclidean space the generalized coordinates are now the coordinates of euclidean space.

Fermat's principle states that the optical length of the path followed by light between two fixed points, **A** and **B**, is a stationary point. It may be a maximum, a minimum, constant or an inflection point. In general, as light travels, it moves in a medium of variable refractive index which is a scalar field of position in space, that is, in 3D euclidean space. Assuming now that light travels along the *x*_{3} axis, the path of a light ray may be parametrized as starting at a point and ending at a point . In this case, when compared to Hamilton's principle above, coordinates and take the role of the generalized coordinates while takes the role of parameter , that is, parameter *σ* =*x*_{3} and *N*=2.

In the context of calculus of variations this can be written as^{[2]}

where *ds* is an infinitesimal displacement along the ray given by and

is the optical Lagrangian and .

The optical path length (OPL) is defined as

where *n* is the local refractive index as a function of position along the path between points **A** and **B**.

The general results presented above for Hamilton's principle can be applied to optics using the Lagrangian defined in Fermat's principle. The Euler-Lagrange equations with parameter *σ* =*x*_{3} and *N*=2 applied to Fermat's principle result in

with *k*=1,2 and where *L* is the optical Lagrangian and .

The optical momentum is defined as

and from the definition of the optical Lagrangian this expression can be rewritten as

or in vector form

where is a unit vector and angles *α*_{1}, *α*_{2} and *α*_{3} are the angles **p** makes to axis *x*_{1}, *x*_{2} and *x*_{3} respectively, as shown in figure "optical momentum". Therefore, the optical momentum is a vector of norm

where *n* is the refractive index at which **p** is calculated. Vector **p** points in the direction of propagation of light. If light is propagating in a gradient index optic the path of the light ray is curved and vector **p** is tangent to the light ray.

The expression for the optical path length can also be written as a function of the optical momentum. Having in consideration that the expression for the optical Lagrangian can be rewritten as

and the expression for the optical path length is

Similarly to what happens in Hamiltonian mechanics, also in optics the Hamiltonian is defined by the expression given above for *N*=2 corresponding to functions and to be determined

Comparing this expression with for the Lagrangian results in

And the corresponding Hamilton's equations with parameter *σ* =*x*_{3} and *k*=1,2 applied to optics are^{[5]}^{[6]}

with and .

It is assumed that light travels along the *x*_{3} axis, in Hamilton's principle above, coordinates and take the role of the generalized coordinates while takes the role of parameter , that is, parameter *σ* =*x*_{3} and *N*=2.

If plane *x*_{1}*x*_{2} separates two media of refractive index *n*_{A} below and *n*_{B} above it, the refractive index is given by a step function

and from Hamilton's equations

and therefore or for *k*=1,2.

An incoming light ray has momentum **p**_{A} before refraction (below plane *x*_{1}*x*_{2}) and momentum **p**_{B} after refraction (above plane *x*_{1}*x*_{2}). The light ray makes an angle *θ*_{A} with axis *x*_{3} (the normal to the refractive surface) before refraction and an angle *θ*_{B} with axis *x*_{3} after refraction. Since the *p*_{1} and *p*_{2} components of the momentum are constant, only *p*_{3} changes from *p*_{3A} to *p*_{3B}.

Figure "refraction" shows the geometry of this refraction from which . Since and , this last expression can be written as

which is Snell's law of refraction.

In figure "refraction", the normal to the refractive surface points in the direction of axis *x*_{3}, and also of vector . A unit normal to the refractive surface can then be obtained from the momenta of the incoming and outgoing rays by

where **i** and **r** are a unit vectors in the directions of the incident and refracted rays. Also, the outgoing ray (in the direction of ) is contained in the plane defined by the incoming ray (in the direction of ) and the normal to the surface.

A similar argument can be used for reflection in deriving the law of specular reflection, only now with *n*_{A}=*n*_{B}, resulting in *θ*_{A}=*θ*_{B}. Also, if **i** and **r** are unit vectors in the directions of the incident and refracted ray respectively, the corresponding normal to the surface is given by the same expression as for refraction, only with *n*_{A}=*n*_{B}

In vector form, if **i** is a unit vector pointing in the direction of the incident ray and **n** is the unit normal to the surface, the direction **r** of the refracted ray is given by:^{[3]}

with

If **i**·**n**<0 then -**n** should be used in the calculations. When , light suffers total internal reflection and the expression for the reflected ray is that of reflection:

From the definition of optical path length

with *k*=1,2 where the Euler-Lagrange equations with *k*=1,2 were used. Also, from the last of Hamilton's equations and from above

combining the equations for the components of momentum **p** results in

Since **p** is a vector tangent to the light rays, surfaces *S*=Constant must be perpendicular to those light rays. These surfaces are called wavefronts. Figure "rays and wavefronts" illustrates this relationship. Also shown is optical momentum **p**, tangent to a light ray and perpendicular to the wavefront.

Vector field is conservative vector field. The gradient theorem can then be applied to the optical path length (as given above) resulting in

and the optical path length *S* calculated along a curve *C* between points **A** and **B** is a function of only its end points **A** and **B** and not the shape of the curve between them. In particular, if the curve is closed, it starts and ends at the same point, or **A**=**B** so that

This result may be applied to a closed path **ABCDA** as in figure "optical path length"

for curve segment **AB** the optical momentum **p** is perpendicular to a displacement *d***s** along curve **AB**, or . The same is true for segment **CD**. For segment **BC** the optical momentum **p** has the same direction as displacement *d***s** and . For segment **DA** the optical momentum **p** has the opposite direction to displacement *d***s** and . However inverting the direction of the integration so that the integral is taken from **A** to **D**, *d***s** inverts direction and . From these considerations

or

and the optical path length *S*_{BC} between points **B** and **C** along the ray connecting them is the same as the optical path length *S*_{AD} between points **A** and **D** along the ray connecting them. The optical path length is constant between wavefronts.

Figure "2D phase space" shows at the top some light rays in a two-dimensional space. Here *x*_{2}=0 and *p*_{2}=0 so light travels on the plane *x*_{1}*x*_{3} in directions of increasing *x*_{3} values. In this case and the direction of a light ray is completely specified by the *p*_{1} component of momentum since *p*_{2}=0. If *p*_{1} is given, *p*_{3} may be calculated (given the value of the refractive index *n*) and therefore *p*_{1} suffices to determine the direction of the light ray. The refractive index of the medium the ray is traveling in is determined by .

For example, ray *r*_{C} crosses axis *x*_{1} at coordinate *x*_{B} with an optical momentum **p**_{C}, which has its tip on a circle of radius *n* centered at position *x*_{B}. Coordinate *x*_{B} and the horizontal coordinate *p*_{1C} of momentum **p**_{C} completely define ray *r*_{C} as it crosses axis *x*_{1}. This ray may then be defined by a point *r*_{C}=(*x*_{B},*p*_{1C}) in space *x*_{1}*p*_{1} as shown at the bottom of the figure. Space *x*_{1}*p*_{1} is called phase space and different light rays may be represented by different points in this space.

As such, ray *r*_{D} shown at the top is represented by a point *r*_{D} in phase space at the bottom. All rays crossing axis *x*_{1} at coordinate *x*_{B} contained between rays *r*_{C} and *r*_{D} are represented by a vertical line connecting points *r*_{C} and *r*_{D} in phase space. Accordingly, all rays crossing axis *x*_{1} at coordinate *x*_{A} contained between rays *r*_{A} and *r*_{B} are represented by a vertical line connecting points *r*_{A} and *r*_{B} in phase space. In general, all rays crossing axis *x*_{1} between *x*_{L} and *x*_{R} are represented by a volume *R* in phase space. The rays at the boundary ∂*R* of volume *R* are called edge rays. For example, at position *x*_{A} of axis *x*_{1}, rays *r*_{A} and *r*_{B} are the edge rays since all other rays are contained between these two. **(A ray parallel to x1 would not be between the two rays, since the momentum is not in-between the two rays)**

In three-dimensional geometry the optical momentum is given by with . If *p*_{1} and *p*_{2} are given, *p*_{3} may be calculated (given the value of the refractive index *n*) and therefore *p*_{1} and *p*_{2} suffice to determine the direction of the light ray. A ray traveling along axis *x*_{3} is then defined by a point (*x*_{1},*x*_{2}) in plane *x*_{1}*x*_{2} and a direction (*p*_{1},*p*_{2}). It may then be defined by a point in four-dimensional phase space *x*_{1}*x*_{2}*p*_{1}*p*_{2}.

Figure "volume variation" shows a volume *V* bound by an area *A*. Over time, if the boundary *A* moves, the volume of *V* may vary. In particular, an infinitesimal area *dA* with outward pointing unit normal **n** moves with a velocity **v**.

This leads to a volume variation . Making use of Gauss's theorem, the variation in time of the total volume *V* volume moving in space is

The rightmost term is a volume integral over the volume *V* and the middle term is the surface integral over the boundary *A* of the volume *V*. Also, **v** is the velocity with which the points in *V* are moving.

In optics coordinate takes the role of time. In phase space a light ray is identified by a point which moves with a "velocity" where the dot represents a derivative relative to . A set of light rays spreading over in coordinate , in coordinate , in coordinate and in coordinate occupies a volume in phase space. In general, a large set of rays occupies a large volume in phase space to which Gauss's theorem may be applied

and using Hamilton's equations

or and which means that the phase space volume is conserved as light travels along an optical system.

The volume occupied by a set of rays in phase space is called etendue, which is conserved as light rays progress in the optical system along direction *x*_{3}. This corresponds to Liouville's theorem, which also applies to Hamiltonian mechanics.

However, the meaning of Liouville’s theorem in mechanics is rather different from the theorem of conservation of étendue. Liouville’s theorem is essentially statistical in nature, and it refers to the evolution in time of an ensemble of mechanical systems of identical properties but with different initial conditions. Each system is represented by a single point in phase space, and the theorem states that the average density of points in phase space is constant in time. An example would be the molecules of a perfect classical gas in equilibrium in a container. Each point in phase space, which in this example has 2N dimensions, where N is the number of molecules, represents one of an ensemble of identical containers, an ensemble large enough to permit taking a statistical average of the density of representative points. Liouville’s theorem states that if all the containers remain in equilibrium, the average density of points remains constant.

^{[3]}

Figure "conservation of etendue" shows on the left a diagrammatic two-dimensional optical system in which *x*_{2}=0 and *p*_{2}=0 so light travels on the plane *x*_{1}*x*_{3} in directions of increasing *x*_{3} values.

Light rays crossing the input aperture of the optic at point *x*_{1}=*x*_{I} are contained between edge rays *r*_{A} and *r*_{B} represented by a vertical line between points *r*_{A} and *r*_{B} at the phase space of the input aperture (right, bottom corner of the figure). All rays crossing the input aperture are represented in phase space by a region *R*_{I}.

Also, light rays crossing the output aperture of the optic at point *x*_{1}=*x*_{O} are contained between edge rays *r*_{A} and *r*_{B} represented by a vertical line between points *r*_{A} and *r*_{B} at the phase space of the output aperture (right, top corner of the figure). All rays crossing the output aperture are represented in phase space by a region *R*_{O}.

Conservation of etendue in the optical system means that the volume (or area in this two-dimensional case) in phase space occupied by *R*_{I} at the input aperture must be the same as the volume in phase space occupied by *R*_{O} at the output aperture.

In imaging optics, all light rays crossing the input aperture at *x*_{1}=*x*_{I} are redirected by it towards the output aperture at *x*_{1}=*x*_{O} where *x*_{I}=*m x*_{O}. This ensures that an image of the input is formed at the output with a magnification *m*. In phase space, this means that vertical lines in the phase space at the input are transformed into vertical lines at the output. That would be the case of vertical line *r*_{A} *r*_{B} in *R*_{I} transformed to vertical line *r*_{A} *r*_{B} in *R*_{O}.

In nonimaging optics, the goal is not to form an image but simply to transfer all light from the input aperture to the output aperture. This is accomplished by transforming the edge rays ∂*R*_{I} of *R*_{I} to edge rays ∂*R*_{O} of *R*_{O}. This is known as the edge ray principle.

Above it was assumed that light travels along the *x*_{3} axis, in Hamilton's principle above, coordinates and take the role of the generalized coordinates while takes the role of parameter , that is, parameter *σ* =*x*_{3} and *N*=2. However, different parametrizations of the light rays are possible, as well as the use of generalized coordinates.

A more general situation can be considered in which the path of a light ray is parametrized as in which *σ* is a general parameter. In this case, when compared to Hamilton's principle above, coordinates , and take the role of the generalized coordinates with *N*=3. Applying Hamilton's principle to optics in this case leads to

where now and and for which the Euler-Lagrange equations applied to this form of Fermat's principle result in

with *k*=1,2,3 and where *L* is the optical Lagrangian. Also in this case the optical momentum is defined as

and the Hamiltonian *P* is defined by the expression given above for *N*=3 corresponding to functions , and to be determined

And the corresponding Hamilton's equations with *k*=1,2,3 applied optics are

with and .

The optical Lagrangian is given by

and does not explicitly depend on parameter *σ*. For that reason not all solutions of the Euler-Lagrange equations will be possible light rays, since their derivation assumed an explicit dependence of *L* on *σ* which does not happen in optics.

The optical momentum components can be obtained from

where . The expression for the Lagrangian can be rewritten as

Comparing this expression for *L* with that for the Hamiltonian *P* it can be concluded that

From the expressions for the components of the optical momentum results

The optical Hamiltonian is chosen as

although other choices could be made.^{[3]}^{[4]} The Hamilton's equations with *k*=1,2,3 defined above together with define the possible light rays.

As in Hamiltonian mechanics, it is also possible to write the equations of Hamiltonian optics in terms of generalized coordinates , generalized momenta and Hamiltonian *P* as^{[3]}^{[4]}

where the optical momentum is given by

and , and are unit vectors. A particular case is obtained when these vectors form an orthonormal basis, that is, they are all perpendicular to each other. In that case, is the cosine of the angle the optical momentum makes to unit vector .

- Learning materials related to a simple one-dimensional derivation of Hamiltonian optics at Wikiversity
- Hamiltonian mechanics
- Calculus of variations

**^**H. A. Buchdahl,*An Introduction to Hamiltonian Optics*, Dover Publications, 1993, ISBN 978-0486675978.- ^
^{a}^{b}Vasudevan Lakshminarayanan et al.,*Lagrangian Optics*, Springer Netherlands, 2011, ISBN 978-0792375821. - ^
^{a}^{b}^{c}^{d}^{e}Chaves, Julio (2015).*Introduction to Nonimaging Optics, Second Edition*. CRC Press. ISBN 978-1482206739. - ^
^{a}^{b}^{c}Roland Winston et al.,*Nonimaging Optics*, Academic Press, 2004, ISBN 978-0127597515. **^**Dietrich Marcuse,*Light Transmission Optics*, Van Nostrand Reinhold Company, New York, 1972, ISBN 978-0894643057.**^**Rudolf Karl Luneburg,*Mathematical Theory of Optics*, University of California Press, Berkeley, CA, 1964, p. 90.