Sub topic 3
The Virtual Short and Virtual Ground
What this chapter assumes
You should know Ohm's law, Kirchhoff's current law (KCL), voltage dividers, and what gain means. The previous two chapters gave the ideal op amp model and the idea of negative feedback. This chapter turns those into the one analysis shortcut used for every circuit in the rest of the tutorial: the virtual short.
Where the virtual short comes from
An op amp output is modeled as:
Vout = A × (V+ − V−)
Here A is the open-loop gain, V+ is the non-inverting input voltage, and V− is the inverting input voltage. A general-purpose op amp has A of about 100,000 (100 dB) at DC.
Rearrange the equation to solve for the input difference:
V+ − V− = Vout / A
The output cannot exceed the supply rails. With ±12 V supplies, |Vout| is at most about 12 V. So the input difference is at most 12 V / 100,000 = 120 µV. For a normal output of a few volts, it is only tens of microvolts. For the ideal op amp, A is infinite, so the difference is exactly zero.
That result is the virtual short rule:
> While the op amp is operating linearly, with its output between the rails, the two inputs sit at the same voltage.
The word "virtual" matters. No wire connects the inputs, and no current flows between them. They only have the same voltage.
The two rules together
Every ideal op amp analysis uses two rules:
- Equal voltages:
V+ = V−, provided the output is not saturated and negative feedback is present. - Zero input current: Neither input draws current. The ideal input resistance is infinite, and real bipolar and FET inputs draw nanoamps to picoamps.
The second rule is what makes the virtual short unusual. A real short circuit would carry current. The virtual short sets the voltage equal but carries no current. The output supplies whatever current the feedback network needs, and none of it comes through the input pins.
| Property | Real short (wire) | Virtual short |
|---|---|---|
| Voltage across it | 0 V | About 0 V (`Vout/A`) |
| Current through it | Any amount | Zero |
| Needs feedback to hold | No | Yes |
Why negative feedback is required
The rule V+ = V− is not a property of the op amp alone. It holds only when the circuit forces it. Negative feedback does this by routing the output back to the inverting input so that any difference at the inputs shrinks.
Suppose V− falls below V+. The difference V+ − V− becomes positive and the output rises. The feedback network passes some of that rise back to V−, which pulls V− up toward V+. The loop settles when the difference is nearly zero.
If the feedback path went to the non-inverting input instead (positive feedback), the loop would push the difference larger, not smaller. The output would slam into a rail and the virtual short would not exist. Always check which input the feedback resistor connects to.
Virtual short versus virtual ground
Virtual ground is a special case of the virtual short. If the non-inverting input is tied directly to 0 V, the rule V− = V+ gives V− = 0 V. The inverting input is then a virtual ground: it sits at 0 V without being connected to ground.
Two consequences follow:
- The current through any resistor connected to the virtual ground is found from its other end alone:
I = V / R. The virtual ground end contributes 0 V. - Because no current flows into the input pin, that node acts like a perfect current summing junction. All currents arriving at it must leave through the feedback path.
This is why the inverting amplifier, the summing amplifier, and the integrator are easy to analyze. All three have the non-inverting input at ground.
If the non-inverting input is at some other voltage, say 2.5 V, then V− sits at 2.5 V. That is a virtual short, but not a virtual ground. Use the term virtual ground only when the voltage is 0 V.
A repeatable method
Use the same four steps on every circuit:
- Confirm negative feedback exists: a path from the output to the inverting input.
- Set
V− = V+. Write down that voltage. - Apply KCL at the inverting node, with zero current into the op amp pin.
- Solve for
Vout.
Worked example: the inverting amplifier
The source Vin connects through R1 to the inverting node. Rf connects from the output to that node. The non-inverting input is grounded.
Step 2 gives V− = 0 V.
The current through R1 is I1 = (Vin − 0) / R1 = Vin / R1.
The input pin takes no current, so all of I1 flows through Rf, from the inverting node toward the output.
The voltage drop across Rf is Rf × I1. The inverting node is at 0 V, so:
Vout = 0 − Rf × (Vin / R1) = −(Rf / R1) × Vin
The gain is −Rf / R1. With R1 = 10 kΩ and Rf = 20 kΩ, the gain is −2. A 1 V input gives −2 V out.
Notice that the gain depends only on a resistor ratio. The op amp's own gain A dropped out of the result. That is the main benefit of negative feedback.
The input resistance seen by the source is R1, since the other end of R1 is at 0 V. This is a design constraint: a large gain with a small R1 loads the source heavily.
Checking the approximation numerically
How good is V− = V+ when A is finite? Write KCL at the inverting node with Vout = −A × V−. Solving gives:
Vout = −A × Vin × Rf / (R1 + Rf + A × R1)
The following script evaluates this and the ideal formula, and prints the voltage left across the input pins.
def inverting_ideal(vin, r1, rf):
"""Ideal inverting amplifier: Vout = -(Rf/R1) * Vin."""
return -(rf / r1) * vin
def inverting_finite(vin, r1, rf, a):
"""Inverting amplifier with finite open-loop gain A (non-inverting input grounded)."""
return -a * vin * rf / (r1 + rf + a * r1)
vin, r1, rf = 1.0, 10e3, 10e3
for a in (100, 1e3, 1e5, 1e7):
vout = inverting_finite(vin, r1, rf, a)
v_minus = -vout / a # since Vout = A * (0 - V-)
print(f"A={a:>10.0f} Vout={vout:8.5f} V V-={v_minus * 1e6:10.3f} uV")
print("ideal:", inverting_ideal(vin, r1, rf))For A = 100,000 the output is about −0.99998 V and V− is about 10 µV. Even with A = 100 the output is about −0.98 V. The virtual short is accurate whenever the loop gain is much larger than the closed-loop gain.
Common errors
- Applying the short when feedback is absent or positive. In a comparator, the output simply saturates according to the sign of
V+ − V−. The inputs can differ by volts. - Applying the short when the output is saturated. If the ideal formula predicts an output beyond the rails, the output stops at the rail and
V− ≠ V+. Check the answer against the supply limits. - Treating the virtual short as a wire. Do not write a KCL term for current "through" the short. The input pin current is zero.
- Calling every inverting input a virtual ground. It is a virtual ground only when
V+is 0 V. - Forgetting the load on the source. The inverting node is at 0 V, so the source sees
R1as its load. A low-impedance source can be pulled down ifR1is too small. - Sign errors in the feedback current. Current flows from the higher voltage to the lower. If the node is at 0 V and the input is positive, the output must go negative to pull the current through
Rf.
Exercises
Exercise
An inverting amplifier has R1 = 2 kΩ, Rf = 18 kΩ, the non-inverting input grounded, and Vin = 0.5 V. Find Vout, the current through Rf, and the resistance the source sees.
Show answer
The inverting node is a virtual ground at 0 V. The current through R1 is 0.5 V / 2 kΩ = 0.25 mA. No current enters the op amp, so Rf carries the same 0.25 mA. Vout = 0 − (18 kΩ × 0.25 mA) = −4.5 V, which matches the gain −Rf/R1 = −9. The source sees R1, so 2 kΩ.
Exercise
The same circuit has ±5 V supplies and Vin = 0.8 V. Is the virtual short still valid? What is the actual output?
Show answer
The ideal formula gives −9 × 0.8 V = −7.2 V, which is beyond the −5 V rail. The output saturates near −5 V (a little less for a real op amp), so the loop can no longer hold V− at V+. The virtual short fails and V− is no longer 0 V. The output is about −5 V, not −7.2 V.