For a different explanatory approach, the below is a copy of:
https://www.physicsforums.com/threads/opamps-some-basic-questions.924272/#post-5833477
Here is the image
@jim hardy posted:
Let's try an approach that some people may be more comfortable with. We will be using the
Inverting Amplifier circuit on the left.
The basic starting assumptions are that the op-amp has very high gain, perhaps 100 000, an input impedance high enough to be ignored, and an output impedance low enough that it too can be ignored.
It is supplied with equal positive and negative supply voltages whos common point is circuit common ("ground").
Just as an example set both R1 and R2 to 10kΩ and turn on the power. Vin is not connected to anything. Since the op-amp has gain, any voltage difference between the input pins will show up at the output.
Now assume that the op-amp is NOT ideal and has a small input offset voltage, perhaps making the Inverting input 1mV above the Non-Inverting input. With the op-amp gain being 100 000, this would try to drive the output to -100V. But keep in mind that the output is connected to Inverting input through R2. When the output gets to -1mV it has canceled the +1mV of offset at the input. That's also why the inputs are often referred to as being "at Virtual Ground", because the Inverting input is driven to match (very closely) the Non-Inverting input.
That's the long explanation of your quote in the OP: "
Rule: The output always acts to make the input voltages the same." And it holds when there is a net negative feedback in the circuit, i.e when the output is fed back the Inverting input.
Now it's time to complicate matters by considering what happens when there is a voltage applied at Vin. Here it is easier to explain if we consider the currents through R1 and R2. As we saw above, due to the negative feedback via R2, the Inverting input is driven to match the Non-Inverting Input.
Lets start with the power off. Apply a voltage, let's say +1V, to Vin, which applies a voltage to Inverting input.
Now turn on the power. As described above, the feedback from the output through R2 to the Inverting input, will tend to match the voltage at the Inverting input to the voltage at the Non-Inverting input. To do this, there must be the same amount of current flowing thru R2 as there is flowing thru R1, but of the opposite polarity. You now have an Op-Amp circuit with a gain of minus one (-1). The output is at -1V.
If you want a higher gain, you increase the ratio of R2/R1. For instance for a gain of three, R2/R1 would be 3; you could change R2 to 30kΩ or change R1 to 3 333Ω. This means the output voltage must be 3 times Vin to drive a matching, compensating current thru R2.
So there is a version of OP-AMPS 101. Hope it helped.
Cheers,
Tom