An operational amplifier is a high-gain differential voltage amplifier with two inputs (inverting − and non-inverting +) and one output. The ideal op-amp model assumes infinite open-loop gain, infinite input impedance, and zero output impedance. With negative feedback, these idealizations yield two analysis rules: (1) the differential input voltage is virtually zero — the inputs are at equal voltage (virtual short), and (2) no current enters either input terminal (virtual open). Applying these rules reduces any linear op-amp circuit to a straightforward KCL problem. The inverting amplifier has gain −R_f/R_in; the non-inverting amplifier has gain 1 + R_f/R_in.
Apply the virtual short and virtual open rules systematically to the inverting and non-inverting configurations before memorizing the gain formulas — the formulas follow directly from KCL. Practice identifying which op-amp terminal connects to signal ground for each topology.
The op-amp's power comes from an abstraction: instead of analyzing the transistors inside it, you use two idealized rules that follow from one physical fact — the open-loop gain is enormous (often 100,000 or more). When negative feedback connects the output back to the inverting input, the circuit is in a constant race to reduce the differential input to zero. If V+ is even slightly above V-, the output swings strongly positive, and the feedback network raises V- until the difference is nearly eliminated. The result is that V+ and V- stay at virtually the same voltage — the virtual short.
The second rule — no current into either input — follows from the infinite input impedance of the ideal model. Real op-amps draw microamps or less; the ideal model rounds this to zero. Together, these two rules (V+ = V-, no input current) reduce any linear op-amp circuit to a KCL problem at the inverting input node. You rarely need to know anything else about the op-amp internals.
Applying these rules to the inverting amplifier: the non-inverting terminal is grounded, so V+ = 0. The virtual short forces V- = 0 as well — this point is called a virtual ground. Current flows from V_in through R_in to the virtual ground node, and the same current (since none enters the op-amp) flows through R_f to V_out. KCL gives V_in/R_in + V_out/R_f = 0, so V_out = -V_in · R_f/R_in. The negative sign means the output is inverted — when the input goes positive, the output goes negative.
For the non-inverting amplifier, the input connects directly to V+. The virtual short sets V- = V_in, so the bottom of R_in is at V_in and the top is at V_out. The current through R_in equals V_in/R_in (flowing from V- to ground). The same current flows through R_f, so V_out - V_in = V_in · R_f/R_in, giving V_out = V_in(1 + R_f/R_in). Notice the minimum gain is 1: even with R_f removed (open) and R_in removed (output shorted to V-), the gain is 1. This configuration is called a voltage follower or buffer.
The ideal model has real limits worth remembering. A real op-amp has a finite gain-bandwidth product: as you increase gain, the usable bandwidth shrinks. There is also a slew rate limit — the maximum rate at which the output can change — which causes distortion for large, fast signals. And the output cannot exceed the supply voltages; the op-amp "clips" if you ask it to output more than the supply rails allow. The ideal model is a powerful tool, but checking these practical limits is always the next step in real design.