The chip
An operational amplifier, or op-amp, is a chip drawn as a triangle. It has two inputs, marked + and -, and one output at the tip. Two more pins connect it to its power supply.
An op-amp multiplies the difference between its inputs by a huge number, the open-loop gain: about 200,000 for the 741. Here + is 0.02 mV above -, so the output is 4 V.
No feedback
Now make the difference 1 mV. The gain asks for 200 V, but the output cannot go past its supply. With ±15 V it stops at about 13 V. This is called saturation.
Used like this, with no feedback, the op-amp is a comparator. The - input is held at 0 V. Turn the input below 0 V and the output jumps to -13 V; above 0 V, to +13 V.
Negative feedback
Now wire a resistor, Rf, from the output back to the - input. If the output rises too far, it pulls the - input up and the op-amp backs off. It settles where - almost equals +.
This is an inverting amplifier: the input goes through Rin to the - input, and + is grounded. Gain = -Rf/Rin = -100 kΩ / 10 kΩ = -10. So 0.5 V in gives -5.0 V out.
Feedback holds the - input at almost 0 V. So the 0.5 V input pushes 0.5 V / 10 kΩ = 50 µA through Rin. The op-amp's input takes almost none, so all 50 µA flows on through Rf, dropping 5 V.
Swap the wiring: the input goes to +, and the 10 kΩ resistor, now called Rg, runs from - to ground. Gain = 1 + Rf/Rg = 1 + 10 = 11. So 0.5 V in gives 5.5 V out, same sign.
Wire the output straight back to the - input. Now the gain is exactly 1: the output follows the input. Why? The input draws almost no current, so a weak sensor can drive a heavy load through it.
In the real world
Op-amps are everywhere in analog circuits. They boost tiny sensor signals, drive audio, compare voltages, and with capacitors in the feedback loop they become filters that pass some frequencies and block others.
In detail
;; step 1/10 · meet Op-amp pins + non-inverting input - inverting input out the output (the tip of the triangle) +V, -V the power supply (here +15 V and -15 V) A classic general-purpose part: the 741.
The board circuit is a teaching model: the 10 kΩ and 100 kΩ resistors and the 0.5 V input make the arithmetic easy; they are not one application note's circuit. Numbers for the 741 are typical values from the Texas Instruments LM741 datasheet at a ±15 V supply: open-loop gain 200 V/mV (200,000), output swing ±13 V into 2 kΩ or more, input resistance 2 MΩ. Real parts vary from these. The formulas -Rf/Rin and 1 + Rf/Rg assume an ideal op-amp (infinite gain, no input current). With the 741's real gain the inverting gain is -9.9995 instead of -10: the difference is far smaller than the 1 % or 5 % tolerance of ordinary resistors. Real comparators are usually dedicated chips that switch faster than a general-purpose op-amp; the 741 is used here to show the idea.