A convenient formulation of the boundary conditions applicable to elastic wave propagation in a layered, solid half space was obtained by Haskell in terms of matrix algebraic operations. Developing this method further, the analogous problem for liquid layers is solved, and the treatment of liquid-solid interfaces is defined in matrix notation. This leads to a simple expression for the period equation for surface waves of the Rayleigh type on a half space of solid and liquid layers arbitrarily interspersed. This formulation of the period equation appears to yield the most rapid method for numerical computations on surface wave dispersion. It is the basis for computations used in several recent studies of earthquake surface-wave dispersion.