Welcome back to Electronics, this is Dr. Robinson. In this lesson, I want to look at the relationship between the inverting and non-inverting op-amp amplifier configurations. Let me start out by drawing this schematic for an inverting op-amp amplifier. You have the ampere resistor, R1. A feedback resistor, RF. Here is our output voltage. And here is the input voltage. And remember, when we have this type of configuration, we have a ratio of output voltage to input voltage, or the gain. Is equal to negative R F over R 1. Now a common mistake that I see students make is informing the schematic for a non-inverting op amp amplifier from the schematic for the inverting amplifier like this. If we have an input resistor, again, R1. Here's Vn. Our op-amp feedback resistor, Rf. Here is V out. And here is our ground. So the belief seems to be that if this is an inverting amplifier with the input voltage connected to the inverting terminal, then we can form a noninverting amplifier by simply interchanging the noninverting and inverting terminals like this. But this is not the correct way of forming a noninverting amplifier. We actually have positive feedback in the circuit where the output voltage is applied back to the non-inverting terminal through the resistor RF. Remember, a real op amp is powered with DC power supplies. Say, V plus and V minus. If you built this circuit, what would you, what you would find is that the output voltage is in one of two states. It's either equal to. The DC V plus voltage or the DC V minus voltage are voltages near these voltages because of internal voltage drops inside the op-amp. So, the circuit is not a noninverting amplifier. It's not an amplifier. Let's look at how the inverting and non-inverting configurations are related. Let me draw another schematic. Here's our op-amp with the inverting terminal, the non-inverting terminal. Here's the output voltage. v out. R f. R 1. In this case, let me leave these two terminals as just open terminals that I'm going to label A and B. Now, we can see that if I made terminal A the input voltage, and I made terminal B ground. Then we would have the inverting configuration here and we would have a gain of negative Rf over R1. And I can tabulate. The me. Draw this table. If terminal A were the input voltage VN. And terminal B were ground. Then we would have amp type. An inverting amplifier. However, if I interchange the location of input voltage and ground. In other words if I make A ground, and B the input voltage. We would have the non-inverting configuration. So the correct way to form a non-inverting amplifier from the inverted amplifier is not to exchange the non-inverting and inverting terminals. But to exchange the positions of the input voltage and ground. So, this, this topology here can actually be used to create both. The inverting amplifier. Input voltage here, here's R1, here's our feedback resistor, RF. The output voltage, the inverting configuration, and if we interchange. This VN and this ground, we get this circuit. Feedback resistor RF. Output voltage V out. This is still the inverting terminal. This is the non-inverting terminal, where we apply the input VN. So we have a non-inverting amplifier. Now, you can see that, in both of these configurations, we have negative feedback. The output voltage is applied to the inverting terminal through the feedback resistor, Rf. But what differs is the location of the input voltage and the ground positions. So let's go ahead and derive the gain expressions. For each of these two configurations. Now remember if we consider this to be an ideal op-amp the inverting the voltage at the inverting terminal and the voltage at the non-inverting terminal must be equal to each other. Now we also know that there's no current into the input terminals of the op-amp. So if we write a note equation at this node. We have zero volts here which means that the voltage here must be zero. This current plus this current must be equal to zero because we know there's no current in this branch. So, I can write that VN over R1 which would be the current here. Must be equal to negative V out over RF or the V out over V in is equal to negative Rf over R1. An inverting configuration because of this minus sign. Now, for this circuit, again it's true that the voltage at the inverting terminal must equal the voltage at the non-inverting terminal. But in this case, the non-inverting voltage is V in. So the voltage at this node is V in. So we can obtain the voltage V out by starting with this known node voltage here, V in. And adding to that one IR drop across RF. Now we know that the current through R1 would be equal to the voltage here at the inverting terminal. VN divided by R1 and we know that the current through R1 must be the same current that flows through RF because no current can flow into the op-amp input terminal. So we can write that the output voltage, Vout, is equal, equal to our known node voltage V-in, plus the IR drop across RF. The current through RF would be equal to V-in divided by R1. And then we multiply by R F to get the voltage across R f. We can then factor out V N and bring it to the side to get V out over V in is equal to 1 plus Rf over R1. A non-inverting amplifier configuration. Compared with the inverting gain here because of this negative sign. Now in summary, remember, to form a non-inverting amplifier from a inverting amplifier. You do not exchange the, the non inverting and inverting terminals in the op-amp, but you change the location of the input voltage and ground to the circuit.