Why do I only get one answer when evaluating $x^2=2x$?

$$x^2=2x$$ If $x \neq 0$, we can divide by $x$: $$x=2$$ And you should check what happens if $x=0$. Similarly: $$(x-2)(x-3)x=2x(x-2)$$ If $x-2 \neq 0$ we can divide by $x-2$: $$x(x-3)=2x$$ If $x \neq 0$ we can divide by $x$: $$x-3=2$$ $$x=5$$ And we should go back and check what happens if $x=0$ or $x-2=0$.


I relate pretty hard to this question because I remember struggling with this in my early algebra classes.


The reason that your approach doesn't get the entire solution set is this... So we have $x^2 = 2x$. Suppose we're blind to the reality of what these roots are. We can tell there's two at least, certainly.

Can we divide by $x$, though?

Initially, it would seem so, right? There's a factor on each side, they just "cancel".

But then as you noticed - one of the roots is $0$. More explicitly, $x=0$.

So when you divide by $x$ on both sides, you're dividing by the roots of the equation - that is, you're dividing by $0$ when you consider one particular root. That's not kosher as you probably know, and is why this method is not foolproof. Since one of the roots isn't zero, you can get that root, at least, but not the zero root.


When you begin solving the equation $x^2=2x$, $x$ potentially can be any number (or numbers). You have no idea because you obviously haven't yet solved the equation. Suppose one of the numbers that makes that equation true is zero: $$ x\cdot x=2\cdot x\\ 0\cdot 0=2\cdot 0\\ 0\cdot\frac{0}{0}=2\cdot\frac{0}{0}\implies 0=2 $$

You get a nonsensical result because you just violated one of the basic principles in mathematics: you can't divide by zero because division by zero is an undefined operation in mathematics. As soon as you're attempting to divide something by zero, you're dong anything, but mathematics because in mathematics, strictly speaking, there is no such operation as division by zero.

Why is division by zero meaningless? Let me quote Wikipedia on this:

In ordinary arithmetic, the expression $\frac{a}{0}$ has no meaning, as there is no number which, when multiplied by 0, gives a (assuming a ≠ 0), and so division by zero is undefined. Since any number multiplied by zero is zero, the expression $\frac{0}{0}$ is also undefined.

You still could divide by $x$ on the condition that $x\ne 0$:

$$ x^2=2x\\ \frac{x^2}{x}=\frac{2x}{x}\\ x=2 $$

And then you would have to separately check if $x=0$ is also a root of that equation:

$$ x^2=2x\\ 0^2=2\cdot 0\\ 0=0 $$

So, it turns out that $x=0$ is also a solution. Therefore, your solution set consists of two numbers: $2$ and $0$.