The scattering matrix analysis is a powerful tool that is used extensi
vely for the analysis of microwave circuits and occasionally for that
of optical devices. Here we apply the scattering matrix analysis to a
class of optical resonators with sources external to the cavity. Such
an analysis is general in the sense that it allows the inclusion of al
l higher order cavity modes and the possible situations where the refl
ection from and transmission through the cavity mirrors, for the waves
incident from different directions, are different. The assumption of
negligible diffraction losses or large extension of the cavity dimensi
ons relative to the width of the cavity modes has to be made. In this
paper single cavities and possible imperfections, such as relative sou
rce or mirror misalignments, are considered. The case of multiple coup
led cavities is an extension of this analysis and will be dealt with i
n a separate publication.