I'm reading Spivak's Calculus:
2 What's wrong with the following "proof"? Let $x=y$. Then
$$x^2=xy\tag{1}$$
$$x^2-y^2=xy-y^2\tag{2}$$
$$(x+y)(x-y)=y(x-y)\tag{3}$$
$$x+y=y\tag{4}$$
$$2y=y\tag{5}$$
$$2=1\tag{6}$$
I guess the problem is in $(3)$, it seems he tried to divide both sides by $(x-y)$. The operation would be acceptable in an example such as:
$$12x=12\tag{1}$$
$$\frac{12x}{12}=\frac{12}{12}\tag{2}$$
$$x=1\tag{3}$$
I'm lost at what should be causing this, my naive exploration in the nature of both examples came to the following: In the case of $12x=12$, we have an imbalance: We have $x$ in only one side then operations and dividing both sides by $12$ make sense.
Also, In $\color{red}{12}\color{green}{x}=12$ we have a $\color{red}{coefficient}$ and a $\color{green}{variable}$, the nature of those seems to differ from the nature of
$$\color{green}{(x+y)}\color{red}{(x-y)}=y(x-y)$$
It's like: It's okay to do the thing in $12x=12$, but for doing it on $(x+y)(x-y)=y(x-y)$ we need first to simplify $(x+y)(x-y)$ to $x^2-y^2$.