Op-amp circuits from the ground up: watching inverting, non-inverting, and VCVS (Sallen-Key) in motion

Op-amp circuits look like a zoo, but two rules read them all: with negative feedback the two inputs sit at the same voltage, and no current flows into the inputs. With them you can trace an inverting circuit, a non-inverting circuit, or a 2nd-order filter.

Last updated: 2026-10-28 Op-ampNon-inverting amplifierInverting amplifierSallen-Key

Two rules

An op-amp amplifies the difference between its + and − inputs by 100,000x or more. For the output to stay within the supply range (say ±10V), the input difference must be under 0.1mV. Feed part of the output back to the − input (negative feedback) and the op-amp moves its output to shrink that difference. Two rules follow.

Rule 1: with negative feedback, the + and − inputs sit at the same voltage (virtual short).

Rule 2: no current flows into either input (input impedance is extremely high; pA-class for a CMOS input).

Ask what voltage the − input sits at and where the current flowing into it goes, and you get the output voltage.

Signal polarity in inverting and non-inverting amplifiers
Signal polarity in inverting and non-inverting amplifiers. AI-generated conceptual illustration; see the article’s diagrams and text for circuit details and conditions.

Non-inverting amplifier: divide the output and feed it back to the − input

Feed Vin into the + input and the output back to the − input through the Rf/Rg divider. By Rule 1 the − input sits at Vin, so Vin = Vout × Rg ÷ (Rf + Rg), that is, Vout = Vin × (1 + Rf ÷ Rg).

With Rf = 0 and Rg = ∞ you get a unity-gain voltage follower. By Rule 2 it draws no current from the input, and its low-impedance output can drive a load. As a buffer between a high-impedance source and a load that demands current, it is the most commonly used op-amp circuit.

Inverting amplifier: pin the − input at 0V and feed current into it

Tie the + input to GND, and feed the input through Rin and the output through Rf into the − input. By Rule 1 the − input sits at 0V (virtual ground), so Vin ÷ Rin flows in Rin. By Rule 2 all of it exits through Rf toward the output. The voltage across Rf is I × Rf and the − input side is 0V, so Vout = −Vin × Rf ÷ Rin. The sign flips because the current leaves the − input toward the output.

How the current passes from Rin to Rf in an inverting amplifier, and the voltage at each pointTop: an inverting amplifier circuit. Current I = Vin ÷ Rin flows from Vin through Rin, the − input node, and Rf to Vout, and none enters the − input. Bottom: the voltages at Vin, 0V, and Vout fall on a straight line. Inverting: the current in Rin passes straight into Rf Top: circuit. Bottom: voltage at each point (example with Rf larger than Rin). Same current, so the voltages fall on a line Rin Rf Vin Vout − input = 0V I = Vin ÷ Rin None enters the − input (Rule 2) 0V Vin 0V (virtual ground) Vout = −Vin × Rf ÷ Rin The slope is the current I. Rin and Rf carry the same I, so the slope is the same. The − input side is 0V, so the output has the opposite sign of Vin.
Figure 1: current and voltage in the inverting amplifier. The same current flows in Rin and Rf, so Vin, 0V, and Vout fall on a straight line.

Comparing the three circuits

The non-inverting input impedance is the op-amp's own + input (109–1012Ω), so choose it for signals from a sensor or a high-resistance source. The inverting input impedance is just Rin, and if the source's output resistance is not negligible against Rin, the gain drops (see Input impedance and gain error in the inverting amplifier).

In exchange, pinning the − input at 0V is an advantage: bring several inputs to it, each through its own resistor, and the currents add, giving a summing amplifier. The inputs do not interfere.

Three basic circuits
GainInput impedanceGood for
Voltage follower+1Op-amp input (10⁹Ω+)Buffer. Receiving a high-impedance source
Non-inverting amplifier1 + Rf ÷ Rg (1 or more)Op-amp inputSensor signal amplification
Inverting amplifier−Rf ÷ Rin (can be under 1)RinLow-impedance sources, summing, current-to-voltage conversion
How the voltage moves in non-inverting and inverting amplifiersLeft: non-inverting amplifier (Rf = Rg, gain 2). The same voltage as Vin appears at the − input, and the output is 2x, in phase. Right: inverting amplifier (Rf = 2Rin, gain −2). The − input is pinned at 0V, and the output is 2x, inverted. Bar height is voltage, moving sinusoidally. The − input is held at the same voltage as the + input. The output takes whatever value makes that true Bar height is the voltage at each point. Left: non-inverting (Rf = Rg). Right: inverting (Rf = 2Rin) Non-inverting: gain 1 + Rf ÷ Rg = 2 − + Vin Vout Rf Rg Vin V− = Vin Vout = 2 × Vin Inverting: gain −Rf ÷ Rin = −2 − + Vin Rin Vout Rf Virtual ground (0V) Vin V− = 0V Vout = −2 × Vin Non-inverting: the − input tracks Vin. Inverting: it sits at 0V, and the Rin current flows on through Rf.
Figure 2: how the voltage moves in non-inverting and inverting circuits. In both, the − input is held at the + input's voltage.

VCVS-type 2nd-order filter (Sallen-Key): two capacitors added to a non-inverting amplifier

A VCVS (voltage-controlled voltage source) is a box that multiplies the input voltage by K, which is exactly a non-inverting amplifier (K = 1 + Rf ÷ Rg, or 1 for a follower). A 2nd-order filter built from it is called Sallen-Key, after the 1955 paper by Sallen and Key.

The circuit stacks two RC stages (R1–C1, R2–C2) feeding the + input, with the bottom of C1 tied to the output instead of GND. That one connection turns a two-stage RC into a 2nd-order filter.

The difference shows up near cutoff. While the output moves in phase with the input, the voltage across C1 stays small, almost no current flows, and the first RC stage stops working, so the signal resists falling. This positive-feedback boost turns the gentle rolloff of a two-stage RC into the flat-then-steep shape of a 2nd-order filter.

The strength of the boost is Q. With R1 = R2 = R and C1 = C2 = C, Q = 1 ÷ (3 − K). K = 1 gives Q = 0.5 (same as a two-stage RC); K = 1.586 gives Q = 0.707 (Butterworth, flattest passband); K = 2 gives Q = 1 (a 0dB peak at cutoff); K = 3 gives Q = ∞ (oscillation).

To raise Q at K = 1, keep R1 = R2 = R and change the capacitor ratio: with C1 = m × C and C2 = C ÷ m, Q = m ÷ 2. For Butterworth, m = √2, so C1 = 1.41C and C2 = 0.707C, and fc = 1 ÷ (2πRC) is unchanged. This is common ahead of an ADC.

K vs. Q (matched components, normalized)No voltage difference across C1, so the first RC stage does nothing and the signal passes through unchanged Low frequency (1/10 of fc): output tracks the inputNo voltage difference across C1, so the first RC stage does nothing and the signal passes through unchanged High frequency (10x fc): almost no outputC2 pulls the + input to GND and C1 is effectively shorted too. Falls at −40dB/decade Vin R1 R2 C2 − + Vout C1 C1 returns to the output, not GND K = 1 (follower) configuration. Raising K raises Q Vout ≈ Vin Vout ≈ 0.01 × Vin (−40dB) Vin Vout 0.1fc fc 10fc 10dB 0dB -20dB -40dB K vs. Q (matched components, normalized) K = 1: Q = 0.5 K = 1.586: Q = 0.707 (Butterworth) K = 2: Q = 1 (peak) Q = 1 ÷ (3 − K). K = 3 oscillates. To raise Q at K = 1: C1 ÷ C2 = 4Q².
Figure 3: Sallen-Key 2nd-order low-pass. At low frequency the first stage does nothing; at high frequency the output falls at −40dB/decade. Right: K versus Q.

GBW and bandwidth

The bandwidth of a gain-G circuit is GBW ÷ noise gain, where the noise gain is G for non-inverting and 1 + |G| for inverting. For a Sallen-Key, aim for GBW ≥ fc × Q × 100; fall short and Q rises above the calculated value, with a peak.

Gain-bandwidth product and closed-loop bandwidthA sketch of a falling open-loop gain curve. Horizontal lines at the non-inverting noise gain G and the inverting noise gain 1 + |G| meet it at GBW ÷ G and GBW ÷ (1 + |G|). Closed-loop bandwidth = GBW ÷ noise gain Log-log sketch. The higher the noise gain, the sooner the line meets the open-loop curve Gain Frequency Open loop (−20dB/decade) GBW G 1 + |G| GBW ÷ (1 + |G|) GBW ÷ G Bandwidth of a gain-G stage = GBW ÷ noise gain Non-inverting: noise gain = G Inverting: noise gain = 1 + |G| Sallen-Key: aim for GBW ≥ fc × Q × 100 Fall short and Q rises above the calculated value, with a peak.
Figure 4: the frequency where the noise-gain line meets the open-loop curve is the closed-loop bandwidth.

Things that catch you out on real hardware

  • Single-supply mid-rail bias. Reference the + input to Vcc/2 and AC-couple the input. In an inverting circuit, tie the + input to the mid-rail and put a capacitor ahead of Rin.
  • Output swing. Even a rail-to-rail part cannot swing within a few tens of mV of the rails; older parts stop 1–2V short.
  • Capacitive loads. 1nF or more directly on the output can cause oscillation. Add a series resistor of a few tens of Ω, or use a rated part. The Sallen-Key's C1 goes through R1, so it is usually fine.
  • Bias current. With a bipolar input (tens to hundreds of nA) and resistors above 100kΩ, the offset reaches mV-class levels. CMOS or JFET inputs are fine.
  • Supply decoupling. Put 0.1µF at the supply pins to avoid oscillation and noise.
  • High-frequency leakage of the Sallen-Key. Attenuation stalls above roughly 100x fc (see the article on passive vs. active filters). Where stopband attenuation matters, add a trailing RC stage or use an MFB topology.

Frequently asked questions

Is the "virtual short" an actual short circuit?
No. The two inputs sit at the same voltage and no current flows between them (Rule 2). That differs from a real short (same voltage, current flows) and from an open circuit (zero current, different voltages), hence "virtual." It stops holding once negative feedback is lost.
Should I default to inverting or non-inverting?
Non-inverting when the source is high-impedance (a sensor, a divider). Inverting when the source is low-impedance (an op-amp or DAC ahead) and you need summing or a current input such as a photodiode. When in doubt, take non-inverting, where input impedance is never a worry.
Does setting K to 3 in a Sallen-Key really cause oscillation?
With matched components, K = 3 sends Q to infinity and the circuit oscillates at fc. The Wien-bridge oscillator uses this deliberately, with amplitude control holding the gain at 3x. For a filter, keep K at 2.5 or below, and 2 or below in practice.
How do I build an order higher than 2?
Cascade 2nd-order Sallen-Key stages. For 4th order, use two stages with different Q and fc (Q = 0.54 and 1.31 for Butterworth). TI FilterPro gives the per-stage values. An odd order adds a first-order RC stage.

Standards and references

  • R. P. Sallen, E. L. Key (1955), "A Practical Method of Designing RC Active Filters" — The original paper on the VCVS-type filter
  • TI SLOA088, Active Filter Design Techniques — Sallen-Key design equations and the K-to-Q relationship
  • Horowitz & Hill, The Art of Electronics — The op-amp golden rules (the two rules) and basic circuits

← All design guides