The S matrix is considered for a system made up of an elementary particle being scattered on a fixed centre which has internal excited states. At threshold energy values for inelastic scattering, the S matrix undergoes abrupt changes of behaviour. A method of representing these as non-analytic changes in the matrix elements as functions of the total energy is suggested, and some of the implications investigated. It is shown that it may still be possible for the eigenvalues of S to be analytic functions of energy at the threshold values. The usual perturbation theory of quantum mechanics is used to consider a resonance scattering system of this type, and it is shown that the non-analytic changes in the matrix elements correspond to a non-analytic change in the unitary condition of S. When the incident particle is a photon, the excited states of the scatterer are necessarily unstable, and the S-matrix elements have singularities in the complex energy plane which correspond to these unstable levels. These singular points show clearly the connexion between the line widths for resonance scattering and Einstein's coefficients for spontaneous emission. It is shown that relative intensities of spectral lines may be obtained from the S matrix for scattering of light on an atom.