For any wave, the speed or velocity (v) at which the wave travels is the product of the wavelength (λ) and frequency (f) of the wave. This is true for light waves, sound waves, seismic waves, or even waves made by shaking a clothesline back and forth. Velocity is measured in units of distance divided by time, usually meters / second (m/s). Wavelength, the distance from a point on a wave to the matching point on a subsequent wave, is measured in units of distance, typically meters (m). Frequency is the number of waves that pass a point over a period of time, usually using one second as the reference period. The frequency is usually given in hertz (Hz) which are equal to units of 1/s.
The speed at which a wave travels depends on the material it is moving through. Any change in a wave’s speed indicates that either wavelength or frequency (or both) have changed. There are two general categories of waves, which must be discussed separately. The first – electromagnetic (EM) waves – applies to waves such as light (including x-rays, microwaves, etc.). Mechanical waves include any wave that requires a movement of matter. Sound waves, seismic waves and rippling flags are all examples of mechanical waves.
Light waves can travel through a vacuum just as easily as through glass or other transparent media. Their frequency is a function of the wave’s energy alone, and stays constant. The speed of light in a vacuum (c) is relatively well known, and is approximately 300,000,000 m/s. The speed of light changes when it passes through physical materials. Air, glass, diamonds – they all decrease the speed of light measurably. Since the frequency of light is unchanged, it is the wavelength of light that changes depending on the medium. Each material has an index of refraction (n) which is the ratio of the speed of light in a vacuum to the speed of light in the material. For a vacuum, n is equal to 1. The indices of refraction for many other materials are tabulated at http://physics.info/refraction. For all naturally occurring materials, n is greater than one. To find either the velocity or the wavelength of light, simply divide the velocity or wavelength in vacuum by n.
Mechanical waves also change speed based on the material they travel through, but the relationship is more complex. The speed of a mechanical wave depends on the medium’s density and elasticity. The calculation and values for a few materials can be found at http://www.engineeringtoolbox.com/speed-sound-d_82.html. Materials with high elasticity and low density result in the highest velocities. As with light, wavelength will increase or decrease to match the increase or decrease in velocity. Frequency will remain nearly constant. (Unlike light waves, mechanical waves die off over distance, so frequency slowly decreases.)