Complementary distribution
Complementary distribution refers to two (or more) elements with seeming opposite/different features that come from the same underlying unit, possibly because they are fairly direct realizations of the same thing, but under different constraints.
Elements that occur in complementary distribution may often be cognitively/intuitively indistinguishable by a particular listener.
Examples
In morphology
The articles "a" and "an" are allomorphs: Their meaning and conceptual use are identical, but they are not interchangable as their use depends on the onset sound of the next word of the sentence they are used in.
In phonology
For example, [p] and [p?] are allophones of the phoneme /p/ because they occur in complementary distribution: [p?] occurs at syllable onset when followed by a stressed vowel, [p] occurs in all other situations.