A transfer-matrix approach is developed for studies of the collective electromagnetic modes in a semi-infinite layered conductor subjected to a quantizing external magnetic field perpendicular to the layers. The dispersion relations for the surface and bulk modes are derived. It is shown that the surface mode has a gap in the long-wavelength limit and exists only if the absolute value of the in-plane wave vector q exceeds the threshold value q*=-1/(a ln\Delta\). Depending on the sign of the parameter Delta=(epsilon-epsilon(0))/(epsilon(0)+epsilon), the frequency of the surface mode omega(s)(q,Delta) goes either above (for Delta > 0) or below (for Delta < 0) the bulk-mode frequency omega(q,k)=omega(q,k+2 pi/a) for any value of k. At nonzero magnetic field H the bulk mode has a singular point q(0)(H) at which the bulk band twists in such a way that its top and bottom bounds swap. Small variations of q near this point change dramatically the shape of the dispersion function omega(q,k) in the variable k. The surface mode has no dispersion across the layers, since its amplitude decays exponentially into the bulk of the sample. Both bulk and surface modes have in the region qa>>1 a similar asymptotic behavior omega proportional to q(1/2), but omega(s)(q,Delta) lies above or below omega(q,k), respectively, for Delta > 0 and Delta < 0 (a is the interlayer separation; epsilon(0) and epsilon stand for the dielectric constants of the media outside the sample and between the layers; q and k are the components of the wave vector in the plane and perpendicular to the layers, respectively). (C) 2000 American Institute of Physics. [S1063-777X(00)00508-9].