vacuum) in the same time that it takes to traverse the given path at the local ray velocity. Then, if denotes the propagation speed in the reference medium (e.g., the speed of light in a vacuum), the optical length of a path traversed in time is , and the optical length of a path traversed in time is . So, multiplying equation (1) through by , we obtain where is the ray index — that is, the refractive index calculated on the ray velocity instead of the usual phase velocity (wave-normal velocity). For an infinitesimal path, we have indicating that the optical length is the physical length multiplied by the ray index: the OPL is a notional geometric quantity, from which time has been factored out. In terms of OPL, the condition for to be a ray path (Fermat's principle) becomes This has the form of Maupertuis's principle in classical mechanics (for a single particle), with the ray index in optics taking the role of momentum or velocity in mechanics. In an isotropic medium, for which the ray velocity is also the phase velocity, we may substitute the usual refractive index for . Relation to Hamilton's principle If are Cartesian coordinates and an overdot denotes differentiation with respect to , Fermat's principle (2) may be written In the case of an isotropic medium, we may replace with the normal refractive index , which is simply a scalar field. If we then define the optical Lagrangian as Fermat's principle becomes If the direction of propagation is always such that we can use instead of as the parameter of the path (and the overdot to denote differentiation w.r.t. instead of ), the optical Lagrangian can instead be written so that Fermat's principle becomes This has the form of Hamilton's principle in classical mechanics, except that the time dimension is missing: the third spatial coordinate in optics takes the role of time in mechanics. The optical Lagrangian is the function which, when integrated w.r.t. the parameter of the path, yields the OPL; it is the foundation of Lagrangian and Hamiltonian optics. History If a ray follows a straight line, it obviously takes the path of least length. Hero of Alexandria, in his Catoptrics (1st century CE), showed that the ordinary law of reflection off a plane surface follows from the premise that the total length of the ray path is a minimum. Ibn