- The scattering of an electromagnetic plane wave incident upon an inhomogeneous multilayer structure is considered in symbolic form. In this framework a scattering-matrix propagation algorithm that decouples recurrences for backward- and forward-scattered wave amplitudes is developed. By construction the scattering-matrix solution procedure is stable against increase of truncation order and depths and number of layers, irrespective of numerical implementation. For grating structures a numerical study using Fourier-transform discretization is performed. In this implementation the convergence issue for TM polarization is recapitulated.