I came across a perplexing thing while testing some assumptions in Wolfram|Alpha, and as I don't have a math education beyond college algebra, I thought this would be a good place to ask. I would just like to emphasize that this is not a homework question, and is purely curiosity.
Common faulty math proofs tend to use logic like this:
1^0 = 1
2^0 = 1
therefore 1 = 2
This is obviously false because $x^0$ is defined as 1 for all real values of $x$.
But in the case of $e^{2\pi i} = e^0$, the base is the same: $e$. So if $a^x = a^y$ is true, shouldn't it follow, then, that $x = y$ and therefore $2\pi i = 0$? If not, why?
I think the others have given fine answers, but since they haven't been accepted I'll offer one more. Perhaps the piece you're missing (I'm guessing) is this:
No, it doesn't follow! Suppose e.g. that $a=1$: clearly, $1^5 = 1^2$ does not imply $5 = 2$ (the former is true and the latter is false). So one cannot simply equate the exponents (unless one knows that some additional constraints hold).
What then is the mechanical ("algebraic") procedure for resolving expressions like $a^x=a^y$? Take $\log_a$ of both sides, i.e. the logarithm with base $a$. So for $e^x = e^y$, you would apply $\log_e = \ln$, the natural logarithm. And now here you apply what the others have said: just like taking a square root (to solve $x^2 = y^2$, yielding $y = \pm x$), or applying an inverse sine (to solve $\sin(x) = \sin(y)$, yielding $x = y \pm 2n\pi$), when applying the logarithm you have to account for the fact that the $e^{\text{a complex number}}$ is not one-to-one (multiple inputs can mapped to the same output), unlike $e^{\text{a real number}}$. In particular, you get $x = y \pm i2n\pi$. Is this consistent with $e^0 = e^{i2\pi}$? Phew, yes.