I get how the formula is made. What I don't get is why whoever decided to multiply the equation by $(1-r)$. I'm referencing this link at Wikipedia. I get the mechanics, just not some of the logic.
Consider $$ \sum_{i=0}^{n-1} a^i=a^0+a^1+a^2+...+a^{n-2}+a^{n-1} $$
I get that the ratio is $r$, but why multiply this equation by $(1-r)$ and not some other quantity minus $r$?
Thanks \ AndyAndy