Rays are closely related to wavefronts. A wavefront is an imaginary surface where the electric field of an optical beam has a uniform phase with respect to some reference point. For example, imagine a coherent point source radiating into a sphere. At any distance away from the source, there is a spherical wavefront with a uniform phase.

It is numerically difficult to propagate wavefronts directly. Fortunately, direct propagation of the wavefront is often only required near the focus of a beam. Far from focus, it is much easier to convert the wavefront to rays and then propagate the rays.

At any point on a wavefront, some small area may be selected. The small area can be thought of as a piece of a plane wave. The ray position and coordinates are defined by the position of the small area and the orientation of the normal vector to this small plane wave, respectively. The integrated energy or flux of the beam over this small area may be assumed to be entirely represented by the ray. For computations near focus, such as the Huygens Point Spread Function, the rays can be converted back into wavefronts.