2 = 1

They say a little bit of knowledge is a dangerous thing. So, apparently, is a little bit of algebra:

A Proof That 2 = 1

(1)     X = Y                        Given
(2)     X2 = XY                      Multiply both sides by X
(3)     X2 - Y2 = XY - Y2             Subtract Y2 from both sides
(4)     (X + Y)(X - Y) = Y(X - Y)    Factor both sides
(5)     (X + Y) = Y                  Cancel out common factors
(6)     Y + Y = Y                    Substitute in from line (1)
(7)     2Y = Y                       Collect the Y's
(8)     2 = 1                        Divide both sides by Y

QED!

What's wrong with this 'proof'?

Like most of these puzzles, you will appreciate it more if you try to crack it on your own before peeking at the solution.