If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Inverting op-amp

We analyze the inverting op-amp configuration, doing all the algebra from first principles. Created by Willy McAllister.

Want to join the conversation?

  • blobby green style avatar for user angelachang27
    Why is Vout crossed out if Vout = A(v+ - v-)? Doesn't the definition of Vout make it along the same order of magnitude as A?
    (6 votes)
    Default Khan Academy avatar avatar for user
  • leaf blue style avatar for user Abdul waris kn
    what is the difference between positive and negative feedback?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      In positive feedback circuits, part of the output signal is added to the input signal. In negative feedback circuits, part of the output is subtracted from the input signal. Most feedback circuits use negative feedback, because the circuit gain stays under control. Positive feedback is less common. When someone with a microphone stands too close to the loudspeaker, you might hear a loud squeal caused by positive feedback. The amplified sound from the loudspeaker goes back into the microphone and gets amplified again, even louder.
      (8 votes)
  • blobby green style avatar for user timothyaduol
    Why is VR1 = Vin - V- and why is VR2 = V- - Vout ?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      Looking at around in the video:
      Let's review the definitions of the voltages at each node. The circuit has 4 nodes: Upper left, upper middle, upper right output node, and ground node. Now identify/name the voltages at each node The upper left node is at a voltage of v_in with respect to ground. The upper middle node is at some (for now) unknown voltage we will give the name v- (suggested by its connection to the v- input of the opamp). The upper right node we will call v_out because it's connected to the output of the opamp. We don't know v_out yet either, but we will by the end of the video. The voltage of the ground node is 0 V by definion, and we label it with the triangle symbol. All these voltage names are called node voltages.

      If we look at the two resistors we can give names to the voltages across each resistor: v_R1 and v_R2. These are called element voltages, and they will be useful later on in the analysis. An element voltage is the difference in the voltages of the two terminals of a resistor. We've already given node voltage names to all the points in the circuit, so let's use those names to figure out the element voltages on R1 and R2 in terms of node voltages:

      For R1: v_R1 = v_in - v-
      For R2: v_R2 = v- - v_out

      I picked a particular orientation of the + and - signs when I defined the element voltages on the schematic. That gives rise to the particular order of the subtraction. If you flip the signs on the element voltage definition, it would flip the subtractions around the other way.
      (7 votes)
  • blobby green style avatar for user Atharva
    could you please explain the formula for current at 3.20?
    why does it involve v_in - v- ?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam blue style avatar for user javier
      By Ohm's law the current flowing through R1 is equal to the voltage drop across R1 divided by the resistance of R1. The voltage drop is computed as the difference of electric potential between the terminals of the component. The left terminal (at a higher potential) is at Vin volts, while the right terminal (lower potential) is at V_ volts. Thus, the voltage drop equals Vin - V_.
      (5 votes)
  • male robot hal style avatar for user Thomas Pietrzak
    When simplifying AVin = -R1/R2vo(1 + A) - vo, why didn't we simplify (1+A) by A directly?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      At the simplification steps are to first drop the trailing vo term, and next divide through by A. We notice that (1+A)/A is very close to unity, so it can be left out of the equation. I think you are asking if it would be ok to do the divide through by A as the first step. Yes it is. Then you simplify by noticing that vo/A is a very tiny number and can be left out. I thought my order was a little bit simpler, but your suggestion is fine, too.
      (3 votes)
  • leaf green style avatar for user sacisamir320
    Thank you
    Why not apply the law of the contract
    And Rings Law
    (2 votes)
    Default Khan Academy avatar avatar for user
  • leaf orange style avatar for user Garrett Wolfe
    If I'm seeing this correct a non-inverting op-amp only effects current on the Vout terminal but an inverting op-amp effects current on both Vin and Vout.
    I suppose with a robust Vin available current this wouldn't matter but with a robust Vin why bother with an op-amp at all? Without robust Vin current this Vin parasitic current could be suppressed to an insignificant level with very high value resistors but then you increase sensitivity to both external interference and the stray micro-current of a real op-amp.
    (1 vote)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      I like your term "robust". You are correct about the difference between the inverting and non-inverting opamp configurations. The non-inverting version has very high input impedance, equal to that of the opamp chip itself.

      The inverting version has the input connected to R1 and then to the inverting input of the opamp. We know that when this circuit is working properly the difference in voltage between the two opamp input pins (+/-) is very small. So in the circuit shown here the right side of R1 is "virtually" connected to ground.

      That means v_in is required to drive R1 connected to ground, making the input impedance = R1. (Interestingly, R2 has no impact on the input impedance.)

      The question of "robustness" is a matter of scale. Suppose R1 = 10kOhm and suppose the load on the output of the opamp is 100 Ohm. The opamp presents much less load on v_in than if you asked v_in to drive the ultimate 100 Ohm load. It is a matter of degree.

      If you have a really feeble v_in you probably don't choose an inverting opamp as the first stage. You would prefer to place a non-inverting opamp in that position for the reason you stated.
      (2 votes)
  • eggleston blue style avatar for user damon_irwin
    at how did he take Vo out of the fraction by multiplying in R1?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user pranjalpersonal5
    What is a multistage amplifier? Please explain.
    Thank you
    (1 vote)
    Default Khan Academy avatar avatar for user
  • purple pi purple style avatar for user M Syahman Samhan
    is A is a symbol for gain? So can I say that A = -R2/R1?
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

- [Voiceover] Now I come to another configuration for an op-amp. And it's partially drawn here. And I'm gonna talk about this as I draw the rest of this circuit in. So this is gonna be made from a resistor configuration that looks like this. We'll have a resistor on the top. And this will be v-out, as we did before. And now we have a connection like this and the connection here to ground. This terminal is the minus terminal; and this terminal is the positive terminal. This is upside down from what we've done so far. But now pay particular attention here, this one has the minus on top. So now we have R1 and R2. And this is v-in. In particular, what we wanna do is find an expression for v-out as a function of v-in. All right. And in this video, I'm gonna do it the hard way. And what the hard way means is we're gonna do all the algebra to do this. And then in the next video I'm gonna show you the easy way. The easy way is really fun to learn, and it really helps to see it the hard way one time just so you appreciate the easy way. The other thing we get to do in this video is we'll do the algebra and we'll see how this gain, we take advantage of this gain to make some assumptions. OK, so let's go after this. Let's develop an expression for v-out in terms of v-in. First, let's write some things we know about v-out, OK? We know that v-out equals A times... Now, it's usually v-plus minus v-minus. This is v-plus. This is v-minus. Usually the expression here is v-plus minus v-minus. And since v-plus is zero, we're just gonna put in minus v-minus. This is equivalent to saying that v-minus equals minus v-out over A. So what else can we write for this circuit? OK, let's look at these resistors. Let's call this plus and minus vR1; and we'll call this one plus minus vR2. So there's a current flowing here, and that we'll call I. So I'm just gonna use Ohm's Law on R1 here and write an expression for I. I equals vR1 over R1. Right? Another way I can write that. What's this voltage here? This is v-minus. So I can write this in terms of v-minus, and that equals v-in minus v-minus over R1. That's the current going through this guy here. Now I'm gonna use something special. I'm gonna use something special that I know about this amplifier. What I know about an op-amp is that this current here is equal to zero. There's no current that flows into an ideal op-amp. So I could take advantage of that. What that means is that I flows in R2. So let me write and expression for I based on what I find over here, based on R2. I can write I equals, let's do it, it's vR2 over R2. And I can write vR2 as: v-minus minus v-out over R2. All right, so I took advantage of the zero current flowing in here to write an expression for current going all the way through. All right. So now we're gonna set these two equal to each other. Now we're gonna make these two equal to each other. Let me go over here and do that. V-in minus v-minus over R1. That equals this term here, which is v-minus minus v-not, v-out rather, over R2. How many variables do we have here? We have v-out, we have v-in, and we have v-minus. And what I want is just v-out and v-in, so I'm gonna try to eliminate v-minus; and the way I'm gonna do that is this expression over here. We're gonna take advantage of this statement right here to replace minus v-out over A. So I'll do that right here. So let me rewrite this. It's gonna be v-in minus minus v-out over A, so I get to make this a plus, and this becomes v-out over A all divided by R1. And that equals... V-minus is minus v-out over A minus v-out over R2. All right, let's roll down a little bit, get some room, and we'll keep going. What am I gonna do next? Next, I'm gonna multiply both sides by A, just to get A out of the bottom there. So now I get A times v-in plus v-out over R1 equals minus v-out minus Av-out over R2. There's a lot of algebra here, but trust me, it's gonna simplify down here in just a minute. All right, so now I'm gonna break this up into separate terms so I can handle them separately. Av-in over R1 plus v-out over R1 equals minus v-out over R2 minus Av-out over R2. Let's change colors so we don't get bored. Next, what I'm gonna do is start to gather the v-out terms on one side and the v-in terms on the other side. So that means that this v-out term here is gonna go to the other side. Av-in over R1 equals, let's do minus v-out over R2 minus Av-out over R2. And this term comes over as minus v-out over R1. Haven't made any sign errors yet. Now let me clear the R1. We'll multiply both sides by R1. Av-in equals R1 over R2 minus v-not minus R1 over R2 Av-not minus v-not. Yeah, the R1s cancel on that last term. All right. Av-in equals. Out of here I can factor this term here. Minus R1 over R2 times v-not, I can factor that out of here and here. So I can do minus R1 over R2 v-not times one plus A minus v-not. So let's take a look at this expression and use our judgement to decide what to do next. Now, because A is so huge, that means that this first term is gonna be gigantic compared to this v-not term here. V-not is some value like five volts or minus five volts or something like that. And A times this is something like 100,000 or 200,000, something like that. It dwarfs this v-not, so I'm gonna ignore this for now. I'm just gonna cross that out, and we'll move forward without that little v-not on the end of the expression. This is after we've left that out. Now we have v-in on this side. And I'm gonna take A over to the other side. One plus A over A. And this is a point where we get to use our judgement again. Again, A is a huge number, like a million; and so A plus one is a million and one. That fraction is really really close to one, so I'm gonna ignore it; I'm gonna just say it's one. So we'll send this one to one. And let me roll up a little bit more, just to have a little bit more room. Now what we have is what? V-in equals minus R1 over R2 times v-out. And I want the expression just in terms of v-out, so I'm gonna spin this around, and we'll get v-out equals minus R2 over R1 times v-in. So this is what our op-amp is doing for us. It basically says v-out is the ratio of two resistors times v-in. The gain of the overall circuit is determined by the ratio of those two resistors. And very importantly, there's a minus sign in front of it. The minus sign came all the way through. Again, let me sketch the circuit real quick. We had the minus sign on top. There's v-out. And there was R1 and R2. And the positive input, the non-inverting input, was connected to ground. OK? So this pattern with the resistor going over the top to the minus, this is called a inverting op-amp. And this is a really familiar pattern in op-amp circuits. You can see these on schematics, and you'll be designing these on your own. So this was quite a bit of algebra it took to get down to this point, and in the next video I'm gonna show you a really easy way to shortcircuit all this and be able to do this analysis really quickly; and that's called the virtual ground.