My favorite example is the following proof of the Cayley-Hamilton theorem, which caused me some disconcertion when I was a student. Let $A$ be a square matrix, and call $p(t) = \det(tI - A)$ its characteristic polynomial. Then $p(A) = \det(AI-A) = 0$.