Audio Phase: Shift versus Inversion

It is said that a 180* phase shift is the same as a polarity inversion. That is, it flips a wave to its mirror-image across the time axis. If we imagine a simple sin or cos wave, we see that this is true. 180* is half a wavelength, slide it that distance either forward or back, and you get the same wave with polarity inverted. Another consequence of this lies in audio room tuning. If the distance between 2 walls is half a wavelength of a particular frequency, the wave reflecting from the wall, being inverted polarity, cancels the wave arriving which causes a dip or null at that frequency. Those same walls will also boost waves at twice that frequency because that same distance between the walls is their full wavelength, so the reflected wave is in phase with the arriving one.

But this doesn’t work with a general musical waveform. No amount of sliding it left (back) or right (forward) in time will invert its polarity. Intuitively, we see that a musical wave is not symmetric or repeating like a sin or cos wave. The musical waveform is much more complex, containing hundreds of frequencies all superimposed. Any distance we slide it left or right represents a phase shift at only 1 particular frequency. Alternately, sliding it left or right can be seen as a phase shift at all frequencies, but a different phase angle for each, since the distance it shifted is a different number of wavelengths for each frequency it contains. As in the above example, it boosts some frequencies and cuts others. This is what happens in a comb filter.

Since every frequency has a different wavelength, it’s hard to imagine how a phase shift of the same angle at all frequencies could even be possible. It is possible, but to do it we need to expand into another dimension and use complex numbers. That computation creates a new waveform that is the polarity inverted version of the original. You can find explanations of this all over the internet, for example here: https://www.audiosciencereview.com/forum/index.php?threads/analytical-analysis-polarity-vs-phase.29331/

Because of this, when speaking of music and audio I prefer the term “polarity inversion” to “180* phase shift”. Even though they can be equivalent, the former is concise while the latter is somewhat ambiguous since one must also specify at what frequencies the phase shift is applied.