This is the crown jewel of analog electronics. With two simple rules and a piece of paper, we can analyze 90% of op-amp circuits without ever thinking about the transistors inside.
3.1 The two golden rules of an op-amp with negative feedback
-
The output does whatever it must to make . Whatever current it has to source or sink, whatever voltage it has to produce, the output drives so as to equalize the inputs. This works because of high open-loop gain: any imbalance gets multiplied by and shoves the output until the imbalance is gone.
-
No current flows into the inputs. Or: a vanishingly small current. Real op-amps have nanoamps to femtoamps of bias current, but for design we treat it as zero.
These rules are exact in the limit of infinite gain plus negative feedback. Real op-amps approximate them to within a fraction of a percent in well-designed circuits.
A subtlety. The first rule is conditional: it only holds if the feedback is negative. If you wire the feedback to the input instead of , the loop has positive feedback, and the output races to one rail and stays there. That is not ""; that is a comparator (Section 4) or a Schmitt trigger or an oscillator. Always check that your feedback path goes back to the inverting input before invoking the rule.
"Servo" intuition. A car's cruise control compares your set speed (the ) to the actual speed (the via a tachometer). If it presses the gas; if it lets up. The car asymptotically achieves . The "output" of the controller is the throttle position, doing whatever it must to make set-speed equal actual-speed. This is exactly the op-amp servo.
3.2 Inverting amplifier
R_f
┌──[==]──┐
│ │
V_in ─[R_in]── V- ──●
│\│ │
│ \ │
│ ●─●─── V_out
│ /
GND─│+/
│/is grounded. By Rule 1, ("virtual ground"). The node sits at zero volts even though no wire connects it to ground; the op-amp servos to keep it there.
KCL at the node, using Rule 2 (no current into the input pin):
Solve:
The closed-loop gain is set entirely by the ratio of two resistors. Stable, predictable, independent of the op-amp's actual gain (as long as it is high). The negative sign reminds you the output is inverted: positive in, negative out.
This single derivation, three lines long, is the most-used result in all of analog electronics. Internalize it.
"Virtual ground" anticipates confusion. Beginners sometimes ask: "if is at ground, why isn't current flowing through into ground? Why doesn't the input load me?" The answer: the current from does flow through into the node, but it does not stop there. It continues through to the output, sourced or sunk by the op-amp. The node is at zero volts, but it is not tied to ground; it is held at zero by the servo. The input impedance seen by is exactly , because 's drop is across to a virtual ground. This is why an inverting amp loads the source: a 1 kΩ presents a 1 kΩ input impedance, period.
3.3 Non-inverting amplifier
V_in ─────│+\
│ \
│ ●─────────●── V_out
│ / │
┌────│-/ [R_f]
│ │/ │
●─────────────────●
│
[R_g]
│
GNDgoes to . Feedback divider from to . By Rule 1, . The voltage at the junction is , so the divider tells us:
Solve:
Output is in phase with input. The gain is always . The input impedance is the op-amp's own input impedance, typically megohms or more, because goes straight into the high-impedance pin. High input impedance, gain set by resistor ratio.
3.4 Voltage follower (unity-gain buffer)
Take the non-inverting amp with (short) and (open):
A buffer. Gain of 1, very high input impedance, very low output impedance. Used as the first stage after any high-impedance source: pH electrodes, photodiodes (followed by transimpedance), high-impedance voltage references. Nothing in the world loads the source; the output drives whatever load comes next.
In RF lingo this is sometimes called a "presence amplifier" because it makes the source's voltage present at the output without consuming any current from the source.
3.5 Summing amplifier
R_f
┌───[==]───┐
│ │
V_1 ─[R_1]─┐ │ │
│ │ │
V_2 ─[R_2]─●── V- ─● │
│ │\│ │
V_3 ─[R_3]─┘ │ \●───────●─── V_out
│ /
GND─│+/
│/Multiple inputs through resistors converge at the virtual ground. Apply KCL at , again using both golden rules:
Solve:
If all input resistors are equal (), this simplifies to a sign-flipped sum:
If , that is the negative of the average. Different input resistors produce a weighted sum. Audio mixers use this (each channel through its own gain pot to a virtual ground); analog computers in the 1960s did matrix arithmetic with banks of summing amps; the input stage of a weighted-resistor DAC (Section 8) is exactly this.
3.6 Subtracting / difference amplifier
A single op-amp circuit that computes . Two resistors feed the inputs, two resistors on each side: from to , in feedback; on the other side, from to , and from to ground. With matched resistors:
Trade-offs: the input impedance on each side is just (low), and the CMRR depends critically on resistor matching. A 1% mismatch sets CMRR to about 40 dB. For real precision you use the instrumentation amplifier, next.
3.7 Instrumentation amplifier with full derivation
The "in-amp" is the gold standard for amplifying small differential signals from sensors with high CMRR and high input impedance on both sides. It is built from three op-amps and seven resistors:
R_f
┌──[==]──┐
│ │
V_1 ───┤+\ │ │
│ A1 ──────────────●── V_x ─┴──┐
┌──┤-/ │
│ │ │
│ ●─── R_g ───● │ ┌── R ──┐
│ │ │ │ │
│ ● │ V_x ●─[R]─●── V- ─●── V_out (A3)
│ │ │ │\│
└──┤+\ │ │ \
│ A2 ──┬────●── V_y ──────────────●─[R]──● ●─────●─── V_out
V_2 ──┤-/ │ │/
│ │ V_y ───●── V+ ──[R]── GND
│ │ R_f
│ └──[==]──┐ (A3 = unity-gain
│ │ difference amp)
└────────────────┘Conceptually: A1 and A2 are two non-inverting buffers tied together through one gain-setting resistor , with in feedback on each. A3 is a unity-gain difference amp that converts the differential signal into a single-ended output.
Derivation of the gain. Consider the input stage. The op-amps A1 and A2 each obey Rule 1, so the voltages at the bottoms of on each side are exactly and . The current through is therefore:
That same current flows through both resistors (Rule 2: no current into the op-amp inputs). So:
The difference between the input-stage outputs:
The output stage A3 is a unity-gain difference amp, so:
The gain is set by a single external resistor . Make smaller and gain rises. The two input buffers handle the signal differentially without ever converting it to a single-ended representation, so common-mode signals see unity gain through them and are then rejected by the difference amp. The input impedance is the impedance of A1 and A2: typically gigohms.
The classic chip is the AD620 (single-supply, external, gain 1 to 10000, CMRR 110 dB, offset drift). The INA128/INA126 are similar. The LT1167 is a precision in-amp with sub-microvolt offset and ultra-high CMRR. The AD8253 is digitally programmable-gain. The AD8429 is the ultra-low-noise champion.
In-amps are standard at the front of every ECG, every strain-gauge bridge, every thermocouple amplifier, every load cell. If you have ever seen a Wheatstone bridge connect to an ADC, an in-amp is in between.
3.8 V-to-I and I-to-V converters
Voltage-to-current (V-to-I). Forces an output current proportional to input voltage, into a load. Used to drive laser diodes (which are current-mode devices), 4 to 20 mA industrial sensor loops, magnetic flux through a coil. A common topology puts the load in the feedback path of an op-amp.
Current-to-voltage (I-to-V), the transimpedance amplifier (TIA). This is the op-amp circuit you reach for when you want to read a photodiode, a photomultiplier tube, an ionization chamber, or any other current-output sensor.
R_f
┌──[==]──┐
│ │
I_in ─────●── V- ──●── V_out
│\│
│ \
│ /
GND─│+/
│/is held at virtual ground. The input current has nowhere to go but through , producing a voltage drop. So:
The "gain" is in ohms, hence "transimpedance." A photodiode delivering 1 µA of photocurrent into a TIA with MΩ produces 1 V out: a million volts per amp.
Trade-offs: the photodiode has a junction capacitance that, together with , creates a peak in the loop response. To stabilize it, designers add a small feedback capacitor in parallel with (a few pF), which both rolls off the high-frequency peaking and limits the noise bandwidth. The OPA657, OPA837, ADA4817, and OPA855 are popular high-speed transimpedance amplifiers. They show up in fiber-optic receivers, LiDAR front-ends, particle detectors, and laser power monitors.
For hardware security: the TIA is in the photodiode receivers used to read out laser fault injection probes, optical fault detectors, and the photon detectors on a quantum random number generator.
3.9 Integrator
Replace the feedback resistor with a capacitor.
C_f
┌──┤├──┐
│ │
V_in ─[R]──●── V-─●── V_out
│\│
│ \
│ /
GND─│+/
│/KCL at (virtual ground):
Solve for :
A real-time analog integrator. Apply a constant DC voltage and the output ramps linearly. Apply a sine and you get a cosine (90° phase shift, with attenuation rising as ).
Where they live:
- Analog computers (1960s, mostly historical, but actively revived for some hardware ML).
- Dual-slope and sigma-delta ADCs (Section 8). Both architectures rely on integrators.
- Active filters (each integrator stage is one pole; we will see Sallen-Key in Section 5).
- PID controllers (the I term).
- CRT sweep generators, where a constant input current charges a capacitor to produce a linear time base.
- Power converters, where an integrator makes the loop respond to error history rather than instantaneous error.
A practical wrinkle: with no DC blocking, op-amp offset and bias current cause the integrator to ramp toward the rails over time even with zero input. Real implementations add a large parallel resistor across to provide a slow DC reset path, turning the perfect integrator into a low-pass filter at very low frequency.
3.10 Differentiator
Swap the integrator's resistor and cap:
R_f
┌─[==]──┐
│ │
V_in ──┤├──●── V-─●── V_out
C_in
│\│
│ \
│ /
GND─│+/
│/KCL gives:
A real-time analog differentiator. It outputs the rate of change of the input. Useful for edge detection, but plagued by noise sensitivity: differentiation amplifies high frequencies (gain proportional to frequency), so any high-frequency noise on the input becomes huge at the output. Practical differentiators add a series resistor with to limit the high-frequency gain, sacrificing some of the ideal differentiator behavior in exchange for a usable circuit.
3.11 AC-coupled (AC) amplifiers
Take an inverting amp and add a series capacitor at the input:
The cap blocks any DC offset on the source so that the op-amp does not amplify the source's DC bias. Useful for audio, where the source might have a random DC offset that you do not want amplified into clipping. The cap and form a high-pass filter at ; choose large enough that is below your signal's lowest frequency.
3.12 Logarithmic and antilog amplifiers
Use a transistor's exponential V-I curve in feedback to compute the log of the input.
(collector grounded)
┌── Q ──┐
│ │ (V_BE drop)
V_in ─[R]──●── V- ──● ●── V_out
│ │\│
│ │ \
│ │ /
GND ──│+/
│/A transistor in feedback whose collector is grounded, base in the feedback path, emitter to . The diode equation gives . The op-amp servos to whatever value makes the emitter current equal to the input current :
So is proportional to . A log amp.
Reverse the role of resistor and transistor (transistor at the input, resistor in feedback) and you get an antilog amp: .
Why bother? Three classic uses.
- Analog multipliers. , then antilog: log + sum + antilog = multiply. The Gilbert cell (1968) is a more efficient four-quadrant analog multiplier, but the log/antilog approach was the first.
- Audio compressors and VCAs. The exponential mapping matches our perception of loudness.
- Photodiode amplifiers spanning many decades. Light intensity in nature spans 10 orders of magnitude; a log amp compresses that into a single-decade voltage swing readable by a normal ADC.
In hardware security, log amps appear in side-channel power-trace AGC stages, where the dynamic range of a chip's current draw can span four orders of magnitude across an algorithm.