I’ve been seeing these sort of math problems around a lot lately:
This one is from Troll Physics, a funny parody site which I recommend to anyone equipped with a sense of humour and an understanding of the basic exact sciences.
The problem with these types of math problems is that they aren’t properly described — that’s expected since otherwise the trick would be obvious to everyone.
In this particular case, there is an illegal conversion between the last two lines. If we look closely at the final simplification (the removal of a²-ab), it’s actually hiding an operation whereby both sides of the equation are divided by a²-ab.
These types of simplifications are so simple that they’re usually skipped when solving mathematical problems, which is convenient here, since it contributed to the illusion.
However, the reason it’s important to consider all operations is exactly to avoid falling into traps like the one above. Since in the beginning of the equation it was defined that a=b, then we know that a²-ab must equal zero.
And what can’t you do with a zero?
You can’t use it as a divisor.