Ideal Op Amp Circuit
So first I assume the ideal op amp has infinite input impedance so no current flows into either input of the op amp.


That's fine.


  Next as the non-inverting input is connected directly to Vi, I can assume that the inverting input will also be held at Vi.


If the op-amp is able to adjust the output enough to bring Vi to that point then yes.


  Now because both sides of R2 are held at Vi, no current will flow through R2.


OK.


  Finally to find the current flowing through R1, I use nodal analysis to say the current through R1 will be (Vi-Vo)/R1. Now the answer I have been given is Vo=Vi, or the nodal analysis equation equals 0.


That's OK too.


  But how does this equation equal 0? Is it because both inputs are at the same potential of Vi, so Vo will also be at the same potential of Vi, so no current can flow?
  ... I thought that if there was no voltage difference in the inputs, then Vo would equal to 0V?


No, that's not what the equations are telling you. They're telling you that the difference between Vi and Vo is zero.

Let's look at a couple of examples and see if it helps.







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. (a) A voltage divider on the output. (b) An NPN as a voltage follower.

In Figure 1a we've added a 2:1 voltage divider on the feedback path. Now what voltage will the op-amp output to get 1 V on the junction of R3 / R4? The answer is 2 V. (I'm ignoring theloading of R2 on R4 for simplicity.)

In Figure 1b we've added Q1 to act as an emitter follower feeding R8. In this case the op-amp output will always have to be Vbe, typically 0.7 V, higher than Vi. So with 1 V on the input Vo would be 1.7 V.

Remember that with negative feedback the op-amp will drive the output to that condition where the difference between the inputs is zero.



One other important thing to remember is that the op-amp has no idea where or what 0 V is. There is no 0 V or ground connection to it so it - at least not as far as it knows. It might be V-, it could be V+ or anywhere in between. Either of the inputs could be grounded. It is just working to amplify any difference it sees between the inputs.