The Non-Inverting Amplifier and the Virtual Short
The feedback divider sets the gain
Slide the feedback resistor ratio Rf/Rg. The virtual short holds V− equal to Vin, and the Rf-Rg divider coming down from the output feeds a fraction of Vout back to V−. The op-amp raises its output until that feedback equals Vin, so the output becomes (1+Rf/Rg) times the input. Set the ratio so the gain is exactly 4.
Feed the input into the non-inverting terminal
Connect the input voltage Vin directly to the non-inverting input V+. An ideal op-amp under negative feedback drives its two inputs equal (the virtual short), so the inverting input V− also sits at Vin. In the inverting amplifier V+ was grounded and V− was 0 V; here V+ is Vin, so V− is pinned to Vin. The virtual short is exactly this: the two inputs reach the same potential while no current flows between them.
The feedback is a voltage divider
From the output Vout, Rf and Rg run in series down to ground, and the node between them touches V−. This is a voltage divider with the output as its source. No current enters the V− terminal, so the division is clean: the voltage at V− is Vout·Rg/(Rg+Rf). The virtual short makes this equal Vin, so Vout·Rg/(Rg+Rf) = Vin, which rearranges to Vout = Vin·(Rg+Rf)/Rg = Vin·(1+Rf/Rg). The gain 1+Rf/Rg is the reciprocal of the fraction β = Rg/(Rg+Rf) the divider feeds back.
The mirror of the inverter, and the follower
The inverting amplifier used a virtual ground (V−=0) to make a gain of −Rf/Rin. The non-inverting one uses a virtual short (V−=Vin) to make a gain of 1+Rf/Rg. One flips the sign and can have a gain below one; the non-inverting preserves the sign and always has a gain of at least one. Because the input enters the infinite input resistance at V+, it also draws almost no current from the source. Set Rf to zero, or remove Rg, and the gain becomes exactly one — a voltage follower (buffer) that passes the voltage through unchanged while lowering the impedance.
Back to the first screen
As you slid the feedback ratio, the output grew to (1+Rf/Rg) times the input, and at Rf/Rg = 3 it was exactly four times. The single choice of feeding the input into the non-inverting terminal pinned the inverting input to Vin, and the divider coming down from the output fed a fraction back while the op-amp raised its output until the two matched. The sign stays, the gain is always at least one. The story the inverter told with a virtual ground, the non-inverter retells with a virtual short and a voltage divider, mirror-like.