# For an inverting op-amp, is inverting the same thing as a 180 degree phase shift?

Many texts talk about a 180 degree phase shift as a function of the inverting op-amp.

Is that correct? It seems to me inverting is happening almost immediately but phase is related to time and period and time delay between the input and output.

• Phase is making sense for periodical sinusoidal signals, where phase shift of 180 degrees is equivalent to multiplication by -1. For other signals it is not the same. Commented Jan 22, 2019 at 18:12
• But thats an illusion for the sine case, it just “looks like” phase shifted. Correct?
– GNZ
Commented Jan 22, 2019 at 18:17
• Yes it is an "illusion" but if it is a pure sinewave, you will be unable to tell the difference so it does not matter, the resulting signal is the same whether you invert of phase-delay. Commented Jan 22, 2019 at 18:19

An inverting op-amp inverts the signal; it does not phase change the signal at the output by 180 degrees although, if the input waveform were a sinewave, then it would look like 180 degrees of phase shift.

• So it “looks like” as if it is phase shifted but actually it is not. There is a nuance here.
– GNZ
Commented Jan 22, 2019 at 18:16
• @Genzo indeed and a lot of EEs will use the terms interchangeably (including me but I always try and correct these bad habits of mine). Commented Jan 22, 2019 at 18:17
• More specifically inverting is equivalent to phase shifting every constituent sine wave in the Fourier representation of the signal by 180 degrees. So in that sense it is equivalent, but potentially miselading in cases where there are other "phases" of interest, such as modulated signals where "invert" is not necessarily the same as phase shifting the modulation by 180 degrees. This is where people get tripped up, phase actually means slightly different things in different contexts.
– Evan
Commented Jan 22, 2019 at 18:36
• Filters have phase shift and group delay. Inverters have 180 deg inversion Commented Jan 22, 2019 at 18:50
• Another situation where it matters is if the voltage and current are out of phase. Commented Jan 22, 2019 at 20:31

How an opamp behaves depends on how you configure it in a circuit.

But the opamp is actually irrelevant to your actual question.

I think that your actual question is:

Is inverting a signal the same as phase shifting it by 180 degrees

What we mean by inverting a signal is multiplying the signal by -1, so +33mV becomes -33 mV and -0.5 V becomes +0.5 V.

A 180 degree phase shift is indeed related to time but since phase is also coupled to frequency we only tend to use phase when talking about a single frequency. The only signal that contains a single frequency is a sinewave. Now for a sinewave inverting it (multiply it by -1) or phase shifting it 180 degrees will result in the same signal.

So yes, for sinusoidal signals, inverting and phase shifting with 180 degrees is the same thing.

Also for periodic signals like square waves (with 50% duty-cycle) and sawtooth signals, which consist of a base frequency and harmonics, inverting and phase shifting with 180 degrees is the same thing. Then the phase is only related to the base (lowest) frequency.

For non-periodic signals (these do not have a base-frequency) this isn't the case.

• "Also for periodic signals like square waves and sawtooth signals, which consist of a base frequency and harmonics, inverting and phase shifting with 180 degrees is the same thing." That makes it sound like it's true of all periodic waves. It's only true of odd waves (i.e. nothing but odd harmonics). Commented Jan 22, 2019 at 20:37
• To expand on @Accumulation's comment (which for me is the definitive answer to this question), I'd also highlight that inverting and phase shifting by 180° a square wave is only the same thing if its duty-cycle is 50% Commented Dec 21, 2023 at 13:48
• I also noticed just now that for a sawtooth wave, inverting and phase shifting by 180º is not the same thing. Imagine the plot of a sawtooth wave over time. Now notice that inverting a sawtooth wave changes the sign of the slope of the ramps (from positive to negative or vice versa), while phase shifting by any value (including 180º) does not, as it simply shifts the graph of the sawtooth wave to the left or right. Commented Dec 25, 2023 at 23:38
• To complement my previous comment about the sawtooth wave: the reason why inverting it and phase-shifting it by 180º is not equivalent is precisely because it has both odd and even harmonics. Just like @Accumulation mentioned in his comment above, inverting a signal is only equivalent to phase-shift by 180º for signals with only odd harmonics. I wrote an answer showing the math behind why this is the case in case you want to have a look. Commented Dec 26, 2023 at 8:41

For an inverting opamp, is inverting the same thing as an 180 degree phase shift?

No. We can demonstrate with a simple example.

simulate this circuit – Schematic created using CircuitLab

Figure 1. Original, inverted and "phase-shifted" signal.

Here we can see that the inversion fails to match a phase-shift in several ways:

• The original signal was "high" for 1/4 of the cycle. The inverted signal is "high" for 3/4 of the cycle.
• The peak positive voltage is now half what it was and peak negative voltage is double what it was.
• Phase shifting can only be true for one frequency. You can see in Figure 1c that we appear to have phase-shifted the high-frequency pulse train by 180° but the lower frequency part (the gap between the second and third pulse) has only shifted 90°.

Inversion is not the same as a phase-shift except for very specific waveforms.

Inverting a signal is the same as a phase shift of 180 degrees at all frequencies.

If you take the Fourier transform of a signal, and compare it to the Fourier transform of the inverted version of the signal, you will see that the latter has the phase shifted by 180 degrees at every frequency.

This means if you invert a sine wave you get a shifted sine wave, but also if you invert the sum of two sine waves, for example, you get the sum of two sine waves that are each shifted by 180 degrees.

You can describe this in either the time domain or the frequency domain. Obviously it is more intuitive in the time domain ("it multiplies the signal by -1").

You are correct that the frequency at a single point in time doesn't make sense to talk about - but we are not talking about inverting a single point in time, because the circuit will invert the signal at all points in time. Or at least, all the points between turning it on and turning it off.

# TL;DR

• Inverting a general periodic signal is not equivalent to phase-shifting it by $$\180º\$$.

• Inverting a periodic signal that has only odd harmonics is equivalent to phase-shifting it by $$\180º\$$. Examples of such signals are the sinusoidal wave — which has a single harmonic (i.e., the first one) —, the square wave (with a duty-cycle of 50%) and the triangle wave.

• It does not make sense to talk about phase-shifting a non-periodic (or aperiodic) signal by $$\180º\$$, as there is no fundamental frequency to translate that $$\180º\$$ phase shift into a time shift value. As such, phase-shifting an aperiodic signal is an expression devoid of any meaning in this context (or at least it is not clear to me what that would mean). Therefore, aperiodic signals are not taken into account in this answer.

On this answer, I will be answering a slightly different question (which seems to be at the core of your question):

Is inverting a signal equivalent to phase-shifting it by $$\180º\$$?

## Fourier Theorem, Fourier series and terminology

The Fourier Theorem tells us that any periodic signal $$\x(t)\$$ with frequency $$\f\$$ that satisfies the Dirichlet conditions1 can be expressed as the following linear combination of an infinite number of sinusoidal signals — called the Fourier series of $$\x(t)\$$:

$$x(t) = \sum_{k=0}^{\infty} A_k \cos(2\pi kft - \phi_k)$$

The sinusoidal terms of the Fourier series of $$\x(t)\$$ are also called the harmonics of $$\x(t)\$$, and they can be individually referenced by their index $$\k\$$ in the Fourier series. An important example is the first harmonic, which corresponds to $$\k=1\$$ in the Fourier series formula above and is the lowest-frequency harmonic, whose frequency equals the frequency of $$\x(t)\$$.

The frequency of $$\x(t)\$$ (and of its first harmonic) is also called the fundamental frequency or base frequency of $$\x(t)\$$ and corresponds to the inverse of its period, which is thus given by $$\T=\frac{1}{f}\$$.

Harmonics corresponding to even $$\k\$$ index values are called even harmonics, while harmonics corresponding to odd $$\k\$$ index values are called odd harmonics.

## Inverting a signal $$\x(t)\$$

Inverting a signal $$\x(t)\$$ is equivalent to multiplying it by $$\-1\$$. In other words, the inverted signal of $$\x(t)\$$ is the signal $$\-x(t)\$$.

The Fourier series of the inverted version of a periodic signal $$\x(t)\$$ is as follows:

$$-x(t) = -\sum_{k=0}^{\infty} A_k \cos(2\pi kft - \phi_k)$$ $$= \sum_{k=0}^{\infty} -A_k \cos(2\pi kft - \phi_k)$$ $$= \sum_{k=0}^{\infty} A_k \cos(2\pi kft \pm \pi - \phi_k)$$ $$= \sum_{k=0}^{\infty} A_k \cos\bigg(2\pi kf\Big(t \pm \frac{1}{2kf}\Big) - \phi_k\bigg)$$

The last two equations show that inverting a signal $$\x(t)\$$ is equivalent to phase-shifting each harmonic of $$\x(t)\$$ by $$\\pm\pi\$$ radians or $$\\pm180º\$$, which in turn is equivalent to time-shifting each harmonic of $$\x(t)\$$ by $$\\pm\frac{1}{2kf}\$$. Notice that each harmonic gets phase-shifted by the same amount ($$\\pm 180º\$$), but gets time-shifted by a different amount ($$\\pm\frac{1}{2kf}\$$) which is dependent on the index $$\k\$$ of the harmonic (and more precisely, on the frequency $$\kf\$$ of the harmonic).

## Phase-shifting a signal $$\x(t)\$$ by $$\180º\$$

It only makes sense to talk about phase-shifting a signal $$\x(t)\$$ by a given phase value $$\\phi\$$ when $$\x(t)\$$ is periodic. Phase-shifting a periodic signal $$\x(t)\$$ of frequency $$\f\$$ by $$\\phi\$$ radians is equivalent to time-shifting it by $$\\frac{\phi}{2\pi}T = \frac{\phi}{2\pi f}\$$ and yields the shifted signal $$\x(t-\frac{\phi}{2\pi f})\$$:

• If $$\\phi\$$ is positive, then $$\x(t)\$$ is right-shifted, yielding a later/delayed version of $$\x(t)\$$;
• If $$\\phi\$$ is negative, then $$\x(t)\$$ is left-shifted, yielding an earlier/antecipated version of $$\x(t)\$$.

Therefore, setting $$\\phi = 180º = \pi\$$ radians2, we conclude that phase-shifting a periodic signal $$\x(t)\$$ of frequency $$\f\$$ by $$\180º\$$ (or $$\\pi\$$ radians) is equivalent to time-shifting it by $$\\frac{T}{2} = \frac{1}{2f}\$$ — i.e., half a period of $$\x(t)\$$ —, yielding the shifted signal $$\x(t-\frac{1}{2f})\$$, which is a delayed version of $$\x(t)\$$.

The Fourier series of the phase-shifted-by-$$\180º\$$ version of a periodic signal $$\x(t)\$$ is as follows:

$$x\Big(t-\frac{1}{2f}\Big) = \sum_{k=0}^{\infty} A_k \cos\bigg(2\pi kf\Big(t -\frac{1}{2f}\Big) - \phi_k\bigg)$$ $$= \sum_{k=0}^{\infty} A_k \cos(2\pi kft - k\pi - \phi_k)$$

These two equations show that, unlike what happens when inverting a signal $$\x(t)\$$, phase-shifting a signal $$\x(t)\$$ by $$\180º\$$ is equivalent to time-shifting each harmonic of $$\x(t)\$$ by $$\\frac{1}{2f}\$$, which in turn is equivalent to phase-shifting each harmonic of $$\x(t)\$$ by $$\k\pi\$$. Notice that each harmonic gets time-shifted by the same amount ($$\\frac{1}{2f}\$$), but gets phase-shifted by a different amount ($$\k\pi\$$) which is dependent on the index $$\k\$$ of the harmonic.

## Conclusion

• As we saw, the Fourier series expansions for both of the signals that result from inverting $$\x(t)\$$ and phase-shifting it by $$\180º\$$ do not match.

• Furthermore, we saw that inverting $$\x(t)\$$ time-shifts each of its harmonics by a different amount, whereas phase-shifting $$\x(t)\$$ by $$\180º\$$ time-shifts each of its harmonics by the same amount.

• Similarly, we also saw that inverting $$\x(t)\$$ phase-shifts each of its harmonics by the same amount, whereas phase-shifting $$\x(t)\$$ by $$\180º\$$ phase-shifts each of its harmonics by a different amount.

The behaviour of the time shift and phase shift mentioned in these last two points are, as we also saw before, two sides of the same coin, as one directly translates into the other.

This is conclusive proof that the nature of what really happens in these two processes is different:

• On one side, inverting a signal $$\x(t)\$$ applies a uniform phase shift across all of its harmonics.
• On the other side, phase-shifting a signal by $$\180º\$$ applies a uniform time shift across all of its harmonics3.

Therefore, inverting a signal $$\x(t)\$$ is not equivalent to phase-shifting it by $$\180º\$$.

## Further considerations

"Also for periodic signals like square waves and sawtooth signals, which consist of a base frequency and harmonics, inverting and phase shifting with 180 degrees is the same thing." That makes it sound like it's true of all periodic waves. It's only true of odd waves (i.e. nothing but odd harmonics).

Let us look into why this is the case in detail. We start by recovering the Fourier series expansion of the phase-shifted-by-$$\180º\$$ version of a periodic signal $$\x(t)\$$ from before (above in this answer), which is as follows:

$$x\Big(t-\frac{1}{2f}\Big) = \sum_{k=0}^{\infty} A_k \cos(2\pi kft - k\pi - \phi_k)$$

This equation shows that when phase-shifting a signal $$\x(t)\$$ by $$\180º\$$, each harmonic gets phase-shifted by $$\k\pi\$$ radians. But this means that only the odd harmonics are being changed compared to the original signal $$\x(t)\$$:

• When $$\k\$$ is even, $$\k\pi\$$ is a multiple of $$\2\pi\$$, which is equivalent to a phase shift by $$\2\pi\$$ radians. Because the period of the cossine function $$\\cos()\$$ is also $$\2\pi\$$ radians, the $$\k\pi\$$ term inside the argument of the cossine function can be canceled and the result is the original harmonic:

$$A_k \cos(2\pi kft - k\pi - \phi_k) = A_k \cos(2\pi kft - \phi_k)$$

• When $$\k\$$ is odd, $$\k\pi\$$ is a multiple of $$\2\pi\$$ plus or minus $$\\pi\$$, which is equivalent to a phase-shift by $$\\pm\pi\$$ radians. It is a known property of the cossine function that $$\\cos(t\pm\pi) = -\cos(t)\$$, and so the result is an inverted harmonic:

$$A_k \cos(2\pi kft - k\pi - \phi_k) = -A_k \cos(2\pi kft - \phi_k)$$

From these two points, we can conclude that if a signal $$\x(t)\$$ has only odd harmonics — and such signals do exist4,5 —, then:

$$x\Big(t-\frac{1}{2f}\Big) = \sum_{k=0}^{\infty} -A_k \cos(2\pi kft - \phi_k)$$ $$= -\sum_{k=0}^{\infty} A_k \cos(2\pi kft - \phi_k) = -x(t)$$

This equation shows that phase-shifting a signal $$\x(t)\$$ with only odd harmonics by $$\180º\$$ is equivalent to inverting it.

Footnotes

1 From my understanding, the Dirichlet conditions basically mean that the signal $$\x(t) \$$ can be a real physical signal that could manifest in our real physical world, such as the ones we would see, for example, in an electric circuit: no infinite absolute integral (i.e., no infinite energy), no infinite maxima/minima, no infinite number of discontinuities and no infinite discontinuities. We engineers usually tend not to highlight or even think of these conditions very often because many of us consider them details for mathematicians to worry about. But actually there's a good reason not to, which is: from an engineering point of view, all signals we work with are under these conditions anyway. For example, signals with infinite local maxima/minima or with infinite energy do not occur in practise, as they would burn the circuits after a certain threshold voltage and/or current.

2 Notice that phase-shifting a signal $$\x(t)\$$ by $$\180º\$$ (i.e., a right shift) yields exactly the same resulting signal as phase-shifting it by $$\-180º\$$ (i.e., a left shift): $$\ x\Big(t-\frac{1}{2f}\Big) = x\Big(t+\frac{1}{2f}\Big) \$$. This makes sense, since both of these two resulting signals have a relative phase shift of $$\360º\$$ or $$\2\pi\$$ radians or, equivalently, a time shift of one period $$\T=\frac{1}{f}\$$ of $$\x(t)\$$. To simplify, this answer will proceed only taking into account the phase shift by $$\+180º\$$ and discard the $$\-180º\$$ case (also because there is nothing valuable to add further to this answer by also including the $$\-180º\$$ case).

3 This last conclusion about phase-shifting a signal $$\x(t)\$$ by $$\180º\$$ is also true for any other phase value $$\\phi\$$, not just for $$\\phi=180º\$$. To understand this, just notice that in the equations, if any other phase value $$\\phi\$$ was used, the same time shift of $$\\frac{\phi}{2\pi f}\$$ would still be applied to all harmonics of $$\x(t)\$$, and thus a different phase shift of $$\k\phi\$$ for each harmonic.

4 Examples of signals that feature only odd harmonics are the sinusoidal wave — which has a single harmonic (i.e., the first one) —, the square wave (with a duty-cycle of 50%) and the triangle wave. An example of a signal with both odd and even harmonics is the sawtooth wave. Signals with only even harmonics do not exist. See footnote 5 to understand why.

5 To understand why signals with only even harmonics don't exist, suppose there was such a signal $$\x(t)\$$ that only has even harmonics. We could make a similar argument and state that signals that have only even harmonics remain the same when phase-shifted by $$\180º\$$ because all harmonics get phase-shifted by a multiple of $$\2\pi\$$ radians, and so the signal does not change. And, as we can see from the equation, this would indeed be true. However, this would also be confusing because then the period of the signal would be $$\\frac{T}{2} = \frac{1}{2f}\$$ and not $$\T = \frac{1}{f}\$$. What happens is that because only even harmonics are present, that means that the first (and lowest) harmonic (of fundamental frequency $$\f\$$) — which is odd by definition — is not present. As such, the new first harmonic is now the second one, which has frequency $$\2f\$$, which fills in the role of fundamental frequency. As such, the period gets halved because the fundamental frequency doubled. Also, all the "even harmonics" are actually both even and odd harmonics of the signal with fundamental frequency $$\2f\$$. This is to show that signals with only even harmonics do not exist, because they would simply be signals with twice the fundamental frequency with both even and odd harmonics.