The equations of motion of an elastico-viscous medium in which the material constants vary with position are deduced. These can be put into the form of a wave equation only when the gradients of the constants are small. By the method of Sommerfeld and Runge these equations are compared with the equation of the characteristic function, whence the condition for the validity of the ray method is obtained. It is similar to De Broglie's criterion in wave mechanics. Expressed in terms of measurable quantities in seismology, the condition is applied to the data recently obtained by Gutenberg for the upper layers of the earth's crust. The equation of the characteristic function is used in deriving the forms of the ray paths for several particular velocity functions, following a method previously used by Epstein.