TITLE: Why should you never divide both sides by a variable when solving an equation?
QUESTION [38 upvotes]: I'm currently working through an algebra book, and during the chapter about rational expressions and inequalities, the author has a side note in which he states:

Never divide both sides of the equation by a variable, even if you're
  doing it to try to solve a rational equation, because there's a very
  real danger that you will actually eliminate answers.

The reason I'm asking this question is because I didn't understand how answers can be eliminated when dividing both sides of an equation by a variable.
Can you show me an example of how this can happen and why?

REPLY [5 votes]: Assuming division is not the correct step, none of the answers clearly mention what to do instead. Suppose you end up with
$$ f(x)g(x)=f(x)h(x),$$
where $f(x)$ is the common factor. Instead of dividing by $f(x)$, you rewrite the equality as:
$$ f(x)(g(x)-h(x)) = 0.$$
Now $f(x)=0 \vee g(x)-h(x)=0$.