What Is an Op-Amp? How Op-Amps and Negative Feedback Work
An op-amp is an IC that takes the voltage difference between its two inputs and makes it much, much larger. On its own, this gain is too large to be useful. So we wire it with "negative feedback," which sends part of the output back to an input. The overall gain is then set by the ratio of two resistors outside the chip, and small signals can be amplified precisely.
What you'll learn
- What an op-amp does
- Why it can amplify precisely, even though its own gain is huge and inexact (negative feedback)
- How inverting amplifiers, non-inverting amplifiers and voltage followers work
- The real-world limits: supply voltage, speed and small errors
Prerequisites: a rough idea of voltage, current and resistance. It helps to know what an analog signal is ("What Is an Analog Chip?").
In everyday life
The voltage that a phone's microphone makes from your voice is very small. The sensors in thermometers and bathroom scales are the same. Their signals are too small to turn into numbers directly. First, they must be made bigger without changing their shape.
The part most widely used for this job is the op-amp. It is sold as a small part on its own. Circuits that do the same job are also built into sensor chips and microcontrollers. Op-amps are used in audio equipment, test instruments, factory machines and many other devices that handle analog signals.
How it works 1: amplifying the difference between two inputs
An op-amp packs many transistors and other parts onto one small chip. In other words, it is a kind of IC ("What Is an Integrated Circuit?"). It has two inputs and one output. It also has power supply pins that bring in electricity.
The two inputs are marked "+" and "−". The op-amp takes the voltage at the + input, subtracts the voltage at the − input, and multiplies the difference many times over. If the two inputs are at the same voltage, the difference is zero. Then the output is also close to zero.
"Op-amp" is short for "operational amplifier." Ragazzini and colleagues in the US used this name in a 1947 paper. At the time, op-amps were parts of "analog computers," which did math such as addition and integration with voltages. That is where the word "operational" comes from.
How it works 2: the gain is too large, and inexact too
How many times an amplifier multiplies a signal is called its gain (for how gain is written in dB, see "Decibels Explained"). An op-amp used on its own has a very large gain. For a widely used product called the LM741, the typical value is about 200,000.
However, you cannot rely much on this number. A part's technical manual is called its datasheet. Let's look at the datasheet from Texas Instruments (TI), the US company that makes the LM741. The guaranteed minimum at 25 °C is 50,000, and it drops further as the temperature changes. A gain that can vary by a factor of 4 within one part number is no good if you want "exactly 10 times."
Being too large is also a problem. On a ±15 V supply, the LM741's output can only reach about ±14 V. Suppose the input difference is just 0.1 mV (one ten-thousandth of a volt). Multiplied by 200,000, that is 20 V, so the output gets stuck at the edge of the supply. This state is called saturation.
How it works 3: negative feedback lets resistors set the gain
The fix is to connect part of the output back to the − input. If the output rises too far, the returned voltage shrinks the input difference, so the output falls. If it falls too far, it rises again. Feeding the result back to the input so that it cancels any error is called negative feedback.
The output settles where the input difference is almost zero. The overall gain is then set by how much of the output is fed back, not by the op-amp's own gain. For example, if one tenth of the output is fed back, the overall gain is almost exactly 10. The fraction fed back is set by the ratio of two resistors. Resistors with precise values are easy to make, so the gain is precise too.
Let's work out how precise (our calculation). With one tenth fed back, an op-amp gain of 200,000 gives an overall gain of about 9.9995. A gain of 50,000 gives about 9.998. The op-amp's own gain differs by a factor of 4, yet the overall gain differs by only about 0.015%.
It is a trade: you give up a large, inexact gain to get a small, exact one. Harold Black of Bell Labs in the US devised the negative-feedback amplifier in 1927. His goal was to reduce distortion in the amplifiers that boosted voices along long telephone lines.
How it works 4: the two "golden rules" are simplified rules
Op-amp circuits with negative feedback are easy to think about with two rules. The US electronics textbook The Art of Electronics calls them the "golden rules."
- The two inputs are at nearly the same voltage. This is because negative feedback makes the input difference almost zero. The inputs are not joined by a wire, but you can treat them as if they were. This is called a virtual short.
- Almost no current flows into the input pins. The current into an LM741 input is typically only about 0.08 µA (microamperes).
To keep things simple, both rules treat these values as zero. In reality, with a 10 V output and a gain of 200,000, an input difference of about 50 µV (0.00005 V) remains. Also, the first rule only works with negative feedback, and only while the output stays within the supply range. The second rule comes from the input pins themselves, so it holds roughly even without feedback.
How it works 5: non-inverting and inverting amplifiers
Let's use the two rules on the most common amplifier circuits. In the first circuit, the input signal goes into the + input. Two resistors divide the output, and part of it is fed back to the − input. The output points the same way as the input, so this is called a non-inverting amplifier.
Here is how to find the gain. The two resistors, R1 and R2, divide the output voltage by their ratio. They pass that divided voltage to the − input. The + input carries the signal itself. The virtual short makes these two voltages equal.
If R1 is 1 kΩ and R2 is 9 kΩ, the divided voltage is one tenth of the output. It equals the input, so the output is 10 times the input. As a formula, the gain is "1 + R2 ÷ R1."
The input of this circuit draws almost no current. So it barely disturbs the voltage of a sensor that can only supply a weak current. That is its strength.
The second circuit connects the + input to 0 V and sends the signal through resistor R1 into the − input. R2 feeds the output back to the − input. The output is flipped upside down compared with the input, so this is called an inverting amplifier.
Here is how to find this gain. The virtual short puts the − input at almost 0 V as well. Current flows from the input through R1. It cannot enter the op-amp, so all of it goes through R2.
For example, say the input is 0.1 V, R1 is 10 kΩ and R2 is 100 kΩ. The current through R1 is 0.1 V ÷ 10 kΩ, or 10 µA. The same current through the 100 kΩ R2 makes a 1 V difference across R2. The current flows from the 0 V point toward the output, so the output is 1 V below 0 V: −1 V. In general, the gain is "−R2 ÷ R1."
In an inverting amplifier, current flows in from the input through R1. You can try how resistor values relate to gain with the op-amp gain calculator.
How it works 6: the voltage follower, with a gain of 1
Take a non-inverting amplifier and connect the output straight to the − input. The gain becomes 1. This circuit is called a voltage follower, because the output "follows" the input.
A gain of 1 may look pointless, but it is useful. The input draws almost no current, and the output can supply current from the power supply. The circuit that receives and uses the power is called the load. For example, splitting 10 V with two 10 kΩ resistors gives 5 V. If you connect a 10 kΩ load to it, the voltage drops to about 3.3 V (our calculation).
Put a voltage follower in between, and the load gets the full 5 V. The circuit before it does not lose any current, and the load still gets the current it needs. Separating the circuit before from the circuit after like this is called buffering.
You can check how a voltage divider behaves under load with the voltage divider calculator.
How it works 7: without feedback, it becomes a "comparing" circuit
Without negative feedback, even a tiny input difference sends the output to the top or bottom edge of the supply. Which edge it sticks to tells you which input is higher. A circuit that compares two voltages and shows the result as one of two outputs is called a comparator.
An op-amp can compare voltages too. But it takes time to recover from being stuck at the edge, and its output can only change so fast. So for comparing, people usually use a dedicated comparator built to switch quickly. The differences are laid out in a table in "Op-Amp vs Comparator."
Where op-amps are used
- Amplifying sensor signals: they boost the small voltages from temperature, light and pressure sensors to a size that is easy to measure.
- Audio: circuits that amplify microphone signals or drive headphones.
- Filters: combined with resistors and capacitors, they weaken unwanted frequencies (the number of times per second a signal swings). This uses the fact that how easily a capacitor passes current depends on frequency ("AC vs DC Explained").
- In front of an ADC: an ADC turns a voltage into numbers. Many ADCs draw a burst of charge from their input at the moment they measure. An op-amp placed in front supplies this charge so the signal is not disturbed.
How it works 8: the limits of real op-amps
The golden rules describe an ideal. Real op-amps have limits like the ones below. The numbers are for the LM741, which comes from a line of old designs that began in 1968. Today, there are faster parts and parts with smaller errors, made for different uses.
- The output cannot go beyond the supply: on a ±15 V supply, the output reaches only about ±14 V. Parts designed to swing close to the edges of the supply are called rail-to-rail.
- Higher gain means it cannot amplify fast signals: in many op-amps, the gain times the highest frequency at which that gain holds is roughly constant. This product is called the gain-bandwidth product. For the 741, it is about 1 MHz (one million swings per second). At a gain of 100, the upper limit drops to about 10 kHz (10,000 swings per second, a rough guide).
- The input has a small error: tiny differences between the transistors inside mean the output is not zero even when the input difference is zero. This error, expressed as "the same as having this much difference at the input," is called the input offset voltage. For the LM741, it is typically 1 mV, at most 5 mV. With a 1 mV error, the output of a gain-of-100 circuit is off by about 0.1 V.
- The output can only change so fast: the most the output voltage can change in 1 µs (one millionth of a second) is called the slew rate. For the LM741, it is 0.5 V/µs, so moving the output by 10 V takes 20 µs.
A short history of the op-amp
Op-amps were first built with vacuum tubes. In the 1960s, they became ICs. Fairchild in the US released the μA702 in 1964 and the μA709 in 1965. With the μA709, analog ICs came into mass use. In 1968 came the μA741, designed by David Fullagar. The Computer History Museum in the US calls it the most popular op-amp ever.
The μA741 put a capacitor inside the chip to stop the circuit from oscillating, that is, swinging back and forth on its own. It was stable without any extra outside parts, which made it easy to use. Its descendant, the 741, is still common in university labs and textbook examples.
Common myths
Myth: An op-amp creates energy to make the signal bigger
In fact, the output energy comes from the power supply. The op-amp only adjusts how much power it draws from the supply to match the small input signal. That is why the output cannot exceed the supply voltage. The word "amplify" sounds as if the signal itself swells up, which is why the myth is common.
Myth: The two inputs are always at the same voltage
In fact, they are "the same" only under three conditions. There must be negative feedback, the output must stay inside the supply range, and the signal must not be too fast. Without feedback, as in a comparator, or when the output saturates, the two inputs can be at very different voltages. The golden rules are simplified rules that make calculation easy, not laws of nature.
Myth: The precision of amplification depends on the op-amp's own gain
In fact, the gain of a circuit with negative feedback is set mainly by the ratio of two resistors. The op-amp's large gain works as "spare capacity" that keeps the circuit following that ratio. So in precise circuits, the precision of the resistors matters just as much.
By the numbers
| Item | Number | Note |
|---|---|---|
| Gain without feedback | About 200,000 | LM741 typical. Minimum 50,000 |
| Gain difference in a 10× circuit | About 0.015% | Op-amp gain of 50,000 vs 200,000 (our calculation) |
| Input current | About 0.08 µA | 741 example |
| Gain-bandwidth product | About 1 MHz | 741 example. About 10 kHz at 100× |
| Slew rate | 0.5 V/µs | LM741. 20 µs to move 10 V |
| Input offset voltage | 1 mV | LM741 typical. Maximum 5 mV |
Learn more
- See the differences in a table: op-amp vs comparator, Class A vs AB vs D amplifiers
- Terms for the next step: differential amplifier, CMRR, phase margin, instrumentation amplifier, transimpedance amplifier
- Try the numbers: op-amp gain calculator, Bode plot calculator (how gain relates to frequency)
- Related articles: "What Is an Analog Chip?" (how signals are turned into numbers after amplification), "What Is a Transistor?" (the parts inside an op-amp)