An operational amplifier or opamp is an electronic circuit module (normally built as an integrated circuit, but occasionally with discrete transistors or vacuum tubes) which has a noninverting input (+), an inverting input () and one output. The output voltage is the difference between the + and  inputs multiplied by the openloop gain: V_{out} = (V_{+} − V_{−}) * G_{openloop}. Since opamps have uniform parameters and often standardized packaging as well as standard power supply needs, they help in designing an application fast.
Originally, opamps were so named because they were used to model the basic mathematical operations (add, subtract, integrate, differentiate etc) in electronic analog computers. In this sense a true operational amplifier is an ideal circuit element. The real ones we use, made of transistors, tubes etc, are approximations to this ideal. The ideal opamp has an infinite openloop gain, infinite bandwidth, infinite input impedances, zero output impedance and zero noise, as well as zero input offset (0.0V out when both inputs are exactly equal) and no thermal drift. Modern integrated circuit MOSFET opamps approximate closer and closer to these ideals in limitedbandwidth, largesignal applications at room temperature. When the approximation is reasonably close, we go ahead and call the practical device an 'opamp', forget its limitations and use the thinking and formulae given in this article.
Notation
A typical circuit symbol for an opamp looks like this:
Its terminals are:
 V_{+}: noninverting input
 V_{−}: inverting input
 V_{out}: output
 V_{S+}: positive power supply
 V_{S−}: negative power supply
The power supply pins (V_{S+} and V_{S−}) can be labeled many different ways. For FET based opamps, the positive, common drain supply is labeled V_{DD} and the negative, common source supply is labeled V_{SS}. For BJT based opamps, the V_{S+} pin becomes V_{CC} and V_{S−} becomes V_{EE}. They are also sometimes labeled V_{CC+} and V_{CC−}, or even V_{+} and V_{−}, in which case the inputs would be labeled differently. The function remains the same. Often these pins are left out of the diagram for clarity, and the power configuration is described or assumed from the circuit.
The input pin polarity is often reversed in diagrams for clarity. In this case, the power supply pins remain in the same position; the more positive power pin is always on the top, and the more negative on the bottom. The entire symbol is not flipped; just the inputs.
DC Behaviour
Openloop gain is defined as the amplification from input to output without any feedback applied. For most practical calculations, the openloop gain is assumed to be infinite; in reality, however, it is limited by the amount of voltage applied to power the operational amplifier, i.e. Vs+ and Vs in the above diagram. Typical devices exhibit open loop DC gain ranging from 100,000 to over 1 million. This allows the gain in the application to be set simply and exactly by using negative feedback. Of course theory and practice differ, since opamps have limits that the designer must keep in mind and sometimes work around.
AC Behaviour
The opamp gain calculated at DC does not apply at higher frequencies. This effect is due to limitations within the opamp itself, such as its finite bandwidth, and to the AC characteristics of the circuit in which it is placed. The best known stumblingblock in designing with opamps is the tendency for the device to resonate at high frequencies, where negative feedback changes to positive feedback due to parasitic lowpasses.
Typical low cost, general purpose opamps exhibit a gain bandwidth product of a few MHz. Specialty and high speed opamps can achieve gain bandwidth products of 100s of MHz.
Applications
The operational amplifier is so called because it performs mathematical operations by using voltage as an analogue of another quantity. This is the basis for the analogue computer.
The generic opamp has two inputs and one output. (Some are made with floating, differential outputs.) The output voltage is a multiple of the difference between the two inputs:
 V_{out} = G(V_{+} − V_{−})
G is the openloop gain of the opamp. The inputs are assumed to have very high impedance; negligible current will flow into or out of the inputs. Opamp outputs have very low source impedance.
If the output is connected to the inverting input, after being scaled by a voltage divider K = R_{1} / (R_{1} + R_{2}), then:
 V_{+} = V_{in}
 V_{−} = K V_{out}
 V_{out} = G(V_{in} − K V_{out})
Solving for V_{out} / V_{in}, we see that the result is a linear amplifier with gain:
 V_{out} / V_{in} = G / (1 + G K)
If G is very large, V_{out} / V_{in} comes close to 1 / K, which equals 1 + (R2 / R1).
This negative feedback connection is the most typical use of an opamp, but many different configurations are possible, making it one of the most versatile of all electronic building blocks.
When connected in a negative feedback configuration, the opamp will tend to output whatever voltage is necessary to make the input voltages equal. This, and the high input impedance, are sometimes called the two "golden rules" of opamp design (for circuits that use feedback):
 No current will flow into the inputs
 The input voltages will be equal to each other
The exception is if the voltage required is greater than the opamp's supply, in which case the output signal stops near the power supply rails , V_{S+} or V_{S−}.
Most single, dual and quad opamps available have a standardised pinout which permits one type to be substituted for another without wiring changes. A specific opamp may be chosen for its open loop gain, bandwidth, noise performance, input impedance, power consumption, or a compromise between any of these factors. Historically, the first integrated opamp to become widely available was the Fairchild UA709, in the late 1960s, but this was rapidly superseded by the much better performing 741, which is easier to use, and probably ubiquitous in electronics  all of the main manufacturers produce a version of this classic chip. The 741 is a bipolar design, and by modern standards has fairly average performance. Better designs based on the FET arrived in the late 1970s, and MOSFET versions in the early 1980s. Many of these more modern devices can be substituted into an older 741based circuit and work with no other changes, to give better performance.
Opamp limitations
Although the design of most opamp circuits relies on the "golden rules" above, designers should also be aware that no real opamp can match these characteristics exactly. Listed below are some of the limitations of real opamps, as well as how this affects circuit design.
DC imperfections:
 Finite gain  the effect is most pronounced when the overall design attempts to achieve gain close to the inherent gain of the opamp.
 Finite input resistance  this puts an upper bound on the resistances in the feedback circuit.
 Nonzero output resistance  important for low resistance loads. Except for very small voltage output, power considerations usually come into play first.
 Input bias current  a small amount of current (typically ~10nA) into the input pins is required for proper operation. This effect is aggravated by the fact that this current is mismatched slightly between the input pins (i.e., input offset current). This effect is usually important only for very low power circuits.
 Input offset voltage  the op amp will produce an output even when the input pins are at exactly the same voltage. For circuits which require precise DC operation, this effect must be compensated for. Most commercial opamps provide an offset pin for this purpose.
AC imperfections:
 Finite bandwidth  all amplifiers have a finite bandwidth. However, this is more pronounced in op amps, which use frequency compensation to avoid unintentionally producing positive feedback.
 Input capacitance  most important for high frequency operation.
Nonlinear imperfections:

Saturation  output voltage is limited to a peak value slightly less than the power supply voltage.

Slew rate  the rate of change of the output voltage is limited.
Power considerations:
 Limited output power  if high power output is desired, an opamp specifically designed for that purpose must be used. Most opamps are designed for lower power operation.

Short circuit protection  this is more a feature than a limitation, although it does put limits on design. Most commercial opamps shut off when the load resistance is below a specified level.
Internal circuitry
Although it is useful and easy to treat the opamp as a black box with a perfect input/output characteristic, it is important to understand the inner workings, so that one can deal with problems that will arise due to internal parasitic capacitances, etc.
Though designs vary between products and manufacturers, all opamps have basically the same internal structure, which consists of three stages:

Differential amplifier
 Input stage  provides low noise amplification, high input impedance, usually a differential output
 Voltage amplifier
 Provides high voltage gain, a singlepole frequency rolloff, usually singleended output
 Output amplifier
 Output stage  provides high current driving capability, low output impedance, current limiting and short circuit protection circuitry
741 example
From the diagram, the blue section is a differential amplifier. The base current of the inputs is not really zero, giving the 741 an input impedance of about 2 MΩ.
The sections in red are current mirrors. The input amplifier drives a current mirror load. The top left current mirror allows large commonmode voltages on the inputs without exceeding the active range of any transistor in the circuit. The top right current mirror provides a constant current load for the output circuitry, regardless of the output voltage. The lower current mirror has a very low collector current, because of the 5 kΩ resistor. It is used as a highimpedance connection to the negative power supply, to provide a reference without loading the input circuitry.
The offset null pins are used to remove any offset voltage that would exist at the output of the opamp when zero signal is applied to the inputs.
The high voltage gain stage is NPN.
The green section is a voltage level shifter. It provides a constant voltage drop between the top and the bottom regardless of supply voltage. If the base current to the transistor is zero, and the voltage between base and emitter (and across the 7.5 kΩ resistor) is 0.625 V (a typical value for a BJT), then the current flowing through the 4.5 kΩ resistor will be the same, and will produce a voltage of 0.375 V. This keeps the voltage across the transistor, and the two resistors at 0.625 + 0.375 = 1 V. This serves as a bias for the two output transistors, to prevent crossover distortion. In some amps this function is achieved with diodes.
The capacitor is used as part of a low pass filter (on the base of an emitter follower) to reduce the frequency response of the amp to prevent oscillations. This technique is called Miller Compensation and functions as an internal capacitive feedback.
The output in cyan is a pushpull emitter follower amplifier. It is driven by a PNP emitterfollower. The output range of the amplifier is about 1 volt less than the supply voltage, since the collectoremitter voltage of the output transistors can never go completely to zero. The resistors in the output mean that the current provided by the output is limited (about 25 mA for the 741), and the output resistance is not zero without feedback. With negative feedback it approaches zero. The output stage has current limiting circuitry.
Common Configurations
The resistors used in these configurations are typically in the kΩ range. <1 kΩ range resistors cause excessive current flow and possible damage to the device. >1 MΩ range resistors cause excessive thermal noise and bias currents.
Z_{out} for all of the amplifiers is ideally 0 Ω. Realistically, it is 1 Ω to 1 kΩ, depending on the device.
Inverting amplifier
 Inverts and amplifies a voltage (multiplies by a negative constant)
 V_{out} = −V_{in} (R_{f} / R_{in})
 Z_{in} = R_{in} (because V_{−} is a virtual ground)
Noninverting amplifier
 Amplifies a voltage (multiplies by a constant greater than 1)
 V_{out} = V_{in} (1 + R_{2} / R_{1})
 Z_{in} = ∞ (realistically, the input impedance of the opamp itself, 1 MΩ to 10^{12} Ω)
Voltage follower
 Used as a buffer, to eliminate loading effects or to interface impedances (connecting a device with a high source impedance to a device with a low input impedance)
 V_{out} = V_{in}
 Z_{in} = ∞ (realistically, the input impedance of the opamp itself, 1 MΩ to 10^{12} Ω)
Difference amplifier
 For independent R_{1},R_{2},R_{3},R_{4} (differential amplifier):
 For R_{1} = R_{2} and R_{3} = R_{4} (amplified difference),
 For R_{1} = R_{3} and R_{2} = R_{4} (also for R_{1} = R_{2} = R_{3} = R_{4}) (difference amplifier):
 Differential Z_{in} (between the two input pins) = R_{1} + R_{2}
 An instrumentation amplifier is made by adding a voltage follower to each input to increase the input impedance.
Summing amplifier
 Sums several (weighted) voltages
 Output is inverted
 For independent R_{1}, R_{2}, ... R_{n}
 V = − R_{f} (V_{1} / R_{1} + V_{2} / R_{2} + ... + V_{n} / R_{n})
 For R_{1} = R_{2} = ... = R_{n}, and R_{F} independent
 V = − (R_{f} / R_{1}) (V_{1} + V_{2} + ... + V_{n})
 For R_{1} = R_{2} = ... = R_{n} = R_{f}
 V = − (V_{1} + V_{2} + ... + V_{n})
 Input impedance Z_{n} = R_{n}, for each input (V_{−} is a virtual ground)
Integrator
 Integrates the (inverted) signal over time (where V_{in} and V_{out} are functions of time)
(V_{initial} is the output voltage of the integrator at time t = 0.)
 Note that this can also be viewed as a type of electronic filter.
Differentiator
 Differentiates the (inverted) signal over time (where V_{in} and V_{out} are functions of time)
 Note that this can also be viewed as a type of electronic filter.
 Compares two voltages and outputs one of two states depending on which is greater
 See article for details
 Combines very high input impedance, high commonmode rejection, low DC offset , and other properties used in making very accurate, lownoise measurements
 See article for details
 A comparator with hysteresis
 See article for details
 Simulates an inductor
 See article for details
See also
External links