Meaning of $\frac{x-y}{y}$ versus $\frac{x}{y}-1$

I'm trying to understand what is probably a fairly simple math concept, but this is escaping me for some reason. Why are the results of these two expressions equal? Thanks for any responses.

$$\frac{x-y}{y}$$

$$\frac{x}{y}-1$$


If you want an informal answer rather than an algebraic proof, see if this helps.

Suppose you have $x$ lollies (or sweets, or candies, depending which country you are in) to be shared equally among $y$ children. Each will receive $x/y$ lollies.

Now suppose that before the lollies are shared, $y$ of them magically disappear. Then each child will receive one lolly fewer, that is, each will receive $$\frac{x}{y}-1$$ lollies. But looking at it another way, there are now $x-y$ lollies, so each child will receive $$\frac{x-y}{y}$$ of them. Therefore these two numbers must be equal.


It comes down to the distributive law: $$ \frac{x-y}{y} = \frac{1}{y}(x-y) = \frac 1y x - \frac 1y y = \frac xy - 1 $$


Since there is subtraction in the numerator:

$$\frac{x-y}{y}=\frac{x}{y}-\frac{y}{y}=\frac{x}{y}-1$$


multiply both expressions by $y$ so that $$\frac{x-y}{y}$$ becomes $x-y$ and $$\frac{x}{y}-1$$ becomes $y(\frac{x}{y}-1)=x-y$.