In linguistics, complementary distribution, as distinct from contrastive distribution and free variation, is the relationship between two different elements of the same kind, where one element is found in one set of environments and the other element is found in a non-intersecting (i.e. complementary) set of environments. It often indicates that two superficially different elements are the same linguistic unit at a deeper level. It is possible for more than two elements to be in complementary distribution with one another.
Complementary distribution is the distribution of phones in their respective phonetic environments such that one never appears in the same phonetic context as the other. When two variants are in complementary distribution, one can predict where each will occur because one can simply look at the environment in which the allophone is occurring.
Complementary distribution is commonly applied to phonology, where similar phones in complementary distribution are usually allophones of the same phoneme. For instance, in English, [p] and [pʰ] are allophones of the phoneme /p/ because they occur in complementary distribution. [pʰ] always occurs when it is the syllable onset and followed by a stressed vowel (as in the word pin). [p] occurs in all other situations (as in the word spin).
There are cases where elements are in complementary distribution, but are not considered allophones. For example in English [h] and [ŋ] are in complementary distribution, since [h] only occurs at the beginning of a syllable and [ŋ] only at the end. But because they have so little in common in phonetic terms they are still considered separate phonemes.