A difference amplifier (subtractor) is a single-op-amp circuit whose output is proportional to the difference of two input signals, . It uses both op-amp inputs at once: drives the inverting side through with feedback resistor , and drives the non-inverting side through an divider to ground.
when .
Derivation by superposition
Because the circuit is linear, find the output due to each input alone (the other set to zero) and add. This is the Superposition principle.
Contribution of (set ). With grounded, the non-inverting input connects to ground through the divider, so , and the virtual short gives . The circuit is now exactly a plain Inverting amplifier (op-amp) from through with feedback :
Contribution of (set ). Grounding ties the bottom of to ground. Looking from the inverting node: goes to ground, goes to the output — that is precisely a Non-inverting amplifier (op-amp)‘s gain-setting network, so whatever voltage appears at is amplified by . The non-inverting input sees through the – Voltage divider:
Therefore
Add them. . Now impose the symmetry condition . With that choice the coefficient simplifies to exactly (substitute into and it collapses), so
Derivation by superposition: inverting and non-inverting contributions added.
Why the symmetry condition kills common mode
Feed both inputs the same voltage, (a pure common-mode signal). The formula gives — the common-mode signal is rejected exactly. But that cancellation only happens when holds precisely. Any resistor mismatch makes the two coefficients differ slightly, so common-mode leaks through as a differential error, and the Common-mode rejection ratio is limited by resistor matching, not by the op-amp.
The symmetry condition sets common-mode gain to zero.
Two weaknesses
First, the input resistance is not infinite: the inverting source sees , and the non-inverting source sees (with to ground). A high-impedance sensor is loaded and attenuated. Second, the CMRR depends critically on matching four external resistors to a fraction of a percent — hard and expensive to guarantee. Both flaws are intolerable for precision work (thermocouple, strain gauge, ECG), and both are fixed by adding two non-inverting input buffers in front: the Instrumentation amplifier.