An

**operational amplifier**(often**op-amp**or**opamp**) is a DC-coupled high-gain electronic voltage amplifier with a differential input and, usually, a single-ended output.^{[1]}In this configuration, an op-amp produces an output potential (relative to circuit ground) that is typically hundreds of thousands of times larger than the potential difference between its input terminals. Operational amplifiers had their origins in analog computers, where they were used to perform mathematical operations in many linear, non-linear and frequency-dependent circuits. The popularity of the op-amp as a building block in analog circuits is due to its versatility. Due to negative feedback, the characteristics of an op-amp circuit, its gain, input and output impedance, bandwidth etc. are determined by external components and have little dependence on temperature coefficients or manufacturing variations in the op-amp itself.## Operation[edit]

The amplifier's differential inputs consist of a non-inverting input (+) with voltage

*V*_{+}and an inverting input (–) with voltage*V*_{−}; ideally the op-amp amplifies only the difference in voltage between the two, which is called the*differential input voltage*. The output voltage of the op-amp*V*_{out}is given by the equation
where

*A*_{OL}is the open-loop gain of the amplifier (the term "open-loop" refers to the absence of a feedback loop from the output to the input).### Open-loop amplifier[edit]

The magnitude of

*A*_{OL}is typically very large (100,000 or more for integrated circuit op-amps), and therefore even a quite small difference between*V*_{+}and*V*_{−}drives the amplifier output nearly to the supply voltage. Situations in which the output voltage is equal to or greater than the supply voltage are referred to as*saturation*of the amplifier. The magnitude of*A*_{OL}is not well controlled by the manufacturing process, and so it is impractical to use an open-loop amplifier as a stand-alone differential amplifier.
Without negative feedback, and perhaps with positive feedback for regeneration, an op-amp acts as a comparator. If the inverting input is held at ground (0 V) directly or by a resistor

*R*_{g}, and the input voltage*V*_{in}applied to the non-inverting input is positive, the output will be maximum positive; if*V*_{in}is negative, the output will be maximum negative. Since there is no feedback from the output to either input, this is an*open-loop*circuit acting as a comparator.### Closed-loop amplifier[edit]

If predictable operation is desired, negative feedback is used, by applying a portion of the output voltage to the inverting input. The

*closed-loop*feedback greatly reduces the gain of the circuit. When negative feedback is used, the circuit's overall gain and response becomes determined mostly by the feedback network, rather than by the op-amp characteristics. If the feedback network is made of components with values small relative to the op amp's input impedance, the value of the op-amp's open-loop response*A*_{OL}does not seriously affect the circuit's performance. The response of the op-amp circuit with its input, output, and feedback circuits to an input is characterized mathematically by a transfer function; designing an op-amp circuit to have a desired transfer function is in the realm of electrical engineering. The transfer functions are important in most applications of op-amps, such as in analog computers. High input impedance at the input terminals and low output impedance at the output terminal(s) are particularly useful features of an op-amp.
In the non-inverting amplifier on the right, the presence of negative feedback via the voltage divider

*R*_{f},*R*_{g}determines the*closed-loop gain**A*_{CL}=*V*_{out}/*V*_{in}. Equilibrium will be established when*V*_{out}is just sufficient to "reach around and pull" the inverting input to the same voltage as*V*_{in}. The voltage gain of the entire circuit is thus 1 +*R*_{f}/*R*_{g}. As a simple example, if*V*_{in}= 1 V and R_{f}=*R*_{g},*V*_{out}will be 2 V, exactly the amount required to keep*V*_{−}at 1 V. Because of the feedback provided by the*R*_{f},*R*_{g}network, this is a*closed-loop*circuit.
Another way to analyze this circuit proceeds by making the following (usually valid) assumptions:

^{[3]}- When an op-amp operates in linear (i.e., not saturated) mode, the difference in voltage between the non-inverting (+) pin and the inverting (−) pin is negligibly small.
- The input impedance between (+) and (−) pins is much larger than other resistances in the circuit.

The input signal

*V*_{in}appears at both (+) and (−) pins, resulting in a current*i*through*R*_{g}equal to*V*_{in}/*R*_{g}:
Since Kirchhoff's current law states that the same current must leave a node as enter it, and since the impedance into the (−) pin is near infinity, we can assume practically all of the same current

*i*flows through*R*_{f}, creating an output voltage
By combining terms, we determine the closed-loop gain

*A*_{CL}:## Op-amp characteristics[edit]

### Ideal op-amps[edit]

An ideal op-amp is usually considered to have the following characteristics:

^{[4]}^{[5]}- Infinite open-loop gain G =
*v*_{out}/*v*_{in} - Infinite input impedance R
_{in}, and so zero input current - Zero input offset voltage
- Infinite output voltage range
- Infinite bandwidth with zero phase shift and infinite slew rate
- Zero output impedance R
_{out} - Zero noise
- Infinite common-mode rejection ratio (CMRR)
- Infinite power supply rejection ratio.

These ideals can be summarized by the two "golden rules":

**In a closed loop**the output attempts to do whatever is necessary to make the voltage difference between the inputs zero.- The inputs draw no current.
^{[6]}^{:177}

The first rule only applies in the usual case where the op-amp is used in a closed-loop design (negative feedback, where there is a signal path of some sort feeding back from the output to the inverting input). These rules are commonly used as a good first approximation for analyzing or designing op-amp circuits.

^{[6]}^{:177}
None of these ideals can be perfectly realized. A real op-amp may be modeled with non-infinite or non-zero parameters using equivalent resistors and capacitors in the op-amp model. The designer can then include these effects into the overall performance of the final circuit. Some parameters may turn out to have negligible effect on the final design while others represent actual limitations of the final performance that must be evaluated.