N A Gippius, S G Tikhodeev consider the application of the scattering matrix formalism for calculating the eigenfrequencies, radiation widths, and field distributions of quasiwaveguide modes in photonic crystal layers (PCLs) of finite thickness. A convenient method of constructing a scattering matrix for 1D or 2D PCLs with an arbitrarily complex structure in the direction perpendicular to the layer was developed. The scattering matrix method allows efficiently removing the numerical instabilities that appear in the method of transfer matrices because of the presence of exponentially decreasing and exponentially increasing linearly independent solutions. The distribution of the amplitudes of the outgoing waves can be found by solving the homogeneous linear set of equations. This is a very efficient method of calculating eigenfrequencies, radiation widths, and the distribution of fields of quasiwaveguide modes in photonic-crystal layers of a finite thickness, which is based on the scattering matrix formalism.