We reformulate the transport equation which determines the size, shape and orientation of infinitesimal light beams in arbitrary spacetimes. The behaviour of such light beams near vertices and conjugate points is investigated, with special attention to the singular behaviour of the optical scalars. We then specialize the general transport equation to the case of an approximate metric of an inhomogeneous universe, which is a Friedmann metric `on average' with superposed isolated weak matter inhomogeneities. In a series of well-defined approximations, the equations of gravitational lens theory are derived. Finally, we derive a relative optical focusing equation which describes the focusing of light beams relative to the case that the beam is unaffected by matter inhomogeneities in the universe, from which it follows immediately that no beam can be focused less than one which is unaffected by matter clumps, before it propagates through its first conjugate point.