So I recently learnt about $i$ and I can't wrap my head around the concept of $i^2=-1$ or that $\sqrt{-1}$ can even exist. Today I was thinking about $i$ again and thought of a "proof" that $i=1$. $$i^4=1 \text{ and } 1^4=1 \text{ so } i^4=1^4$$ $$i^4=1^4 \to \sqrt[4]{i^4}=\sqrt[4]{1^4} \to i=1$$ But if $i=1$, then $i^2 \neq -1$. So I think I must have messed up something in the proof. Can someone point out where this went wrong? I know you can $\text{"prove" }1=2$ by accidentally dividing by $0$ and I suspect something similar is happening.
For anyone else having trouble with complex numbers @mrsamy commented this link and I found it quite helpful: https://www.math.toronto.edu/mathnet/answers/imaginary.html
This has nothing to do with complex numbers. By the same argument, $-1=1$, since$$(-1)^2=1^2\implies\sqrt{(-1)^2}=\sqrt{1^2}\implies-1=1.$$The error lies in assuming that $\sqrt{x^2}=x$. Actually, $\sqrt{x^2}=|x|$. In the case of complex numbers, it's even worst, since every complex number (other than $0$) has four fourth roots. So, the expression $\sqrt[4]z$ doesn't make sense unless and until you decide which fourth root of $z$ you have in mind. Even then, it will often be false that $\sqrt[4]{z^4}=z$.