In order to design a path which will maintain the brilliance of the source as well as possible, an understanding of optical aberrations is required. This chapter introduces the relationship which determines the individual optical paths, P. de Fermat's principle. It describes the most important tool at the disposal of the designer for following optical paths through entire beamline: a ray trace program. These programs do nothing more than to take a vector in the source space and project it in a straight line path to each optical element of the beamline. An explanation of the phenomena of refraction and reflection was provided by the French physicist, Fermat, based on his principle of least time: the optical path from point A to point B must be an extremum. The basic idea of a ray trace program is simple: optical paths, or rays, are traced through a system of optical elements, the laws of geometrical optics being observed at all times.