There is a great idea behind this famous circuit solution... and it is not just electrical but universal... and can be seen all around us. It is based on the main property of negative feedback systems (including human beings) to compensate for all kinds of harmful disturbances. In their quest to do this, they turn from followers into amplifiers.
So, from this system viewpoint, the non-inverting amplifier is a disturved follower. Let's see how the op-amp does this "magic" in your specific circuit - Fig. 1.6 (a).
If you were connected the op-amp output directly to its inverting input (without a voltage divider), it will easily make its output voltage equal to the input voltage Vi... and will act as an op-amp voltage follower.
When you insert a voltage divider between the op-amp output and the inverting input, it will "disturb" the op-amp by decreasing its output voltage (R1 + R2)/R1 times. The op-amp reacts to this "intervention" by increasing its output voltage so many times. As a result, the equality will be restored... and the voltage after the disturbance (at the inverting input) will follow the input voltage as before... but we take the voltage before the disturbance (at the op-amp output) as an output voltage.
In this way, the negative feedback has "reversed" the voltage divider with transfer ratio of R1/(R1 + R2) converting it into an amplifier with a transfer ratio of (R1 + R2)/R1... or 1 + R2/R1.
The advantage of this intuitive approach over the blind derivation of the formula is that it gives understanding and not just knowledge... and this is something very necessary in circuitry...
You may be interested in attending a lab exercise that I did with my students in 2008. During the lab, we built and investigated this circuit step by step. Then, we described it in a Wikibooks story to share it with curious people on the web.
Another Wikibooks story where I have described a part of correspondence between me and Gordon Deboo (the inventor of Deboo integrator), is dedicated to this great circuit phenomenon. Here is a text that is probably an excerpt from his book - Fig. 1.

Fig. 1. Scanned text that is probably an excerpt from a Deboo's book (Wikibooks).
And finally, here is an ResearchGate question dedicated to this topic: Can we "reverse" a voltage divider by applying the input voltage to its output and taking the output voltage from its input?