A longitudinal wave is a wave in which the particles of the medium are displaced in a direction parallel to the direction of energy transport. A longitudinal wave can be created in a slinky if the slinky is stretched out horizontally and the end coil is vibrated back-and-forth in a horizontal direction. If a snapshot of such a longitudinal wave could be taken so as to freeze the shape of the slinky in time, then it would look like the following diagram.
Because the coils of the slinky are vibrating longitudinally, there are regions where they become pressed together and other regions where they are spread apart. A region where the coils are pressed together in a small amount of space is known as a compression. A compression is a point on a medium through which a longitudinal wave is traveling which has the maximum density. A region where the coils are spread apart, thus maximizing the distance between coils, is known as a rarefaction. A rarefaction is a point on a medium through which a longitudinal wave is traveling which has the minimum density. Points A, C and E on the diagram above represent compressions and points B, D, and F represent rarefactions. While a transverse wave has an alternating pattern of crests and troughs, a longitudinal wave has an alternating pattern of compressions and rarefactions.
As discussed above, the wavelength of a wave is the length of one complete cycle of a wave. For a transverse wave, the wavelength is determined by measuring from crest to crest. A longitudinal wave does not have crest; so how can its wavelength be determined? The wavelength can always be determined by measuring the distance between any two corresponding points on adjacent waves. In the case of a longitudinal wave, a wavelength measurement is made by measuring the distance from a compression to the next compression or from a rarefaction to the next rarefaction. On the diagram above, the distance from point A to point C or from point B to point D would be representative of the wavelength.