The imaginary unit, $i,$ and an alternate representation. Recently, I began working with both complex, and imaginary numbers, and I looked at the complex number $i^{n}.$
If $n = 0, i^{n} = 1,$
$n = 1, i^{n} = i = \sqrt{-1},$
$n = 2, i^{n} = i^{2} = i \cdot i = -1,$
$n = 3, i^{n} = i^{3} = i^{2} \cdot i = -1 \cdot i = -i,$ and
$n = 4, i^{n} = i^{4} = i^{3} \cdot i = -i \cdot i = -i^{2} = -(-1) = 1.$
Would it be correct to say that, $\forall{n}, \Re{\left(i^{n}\right)} = \cos{\left(\frac{n \pi}{2}\right)},$ and $\Im{\left(i^{n}\right)} = \sin{\left(\frac{n \pi}{2}\right)},$ where $\frac{n \pi}{2}$ is in radians?
By this logic, $i^{n} = \cos{\left(\frac{n \pi}{2}\right)} + i \sin{\left(\frac{n \pi}{2}\right)}.$
 A: You are absolutely correct.
It's a specific aspect of the Euler formula, given that $i = e^{i\pi/2}$ and the Euler formula being : $e^{ix} = \cos x + i  \sin x$.
A: Yes, this is correct.
You can see this using the formula $e^{ix}=\cos(x)+i\sin(x)$.
First, $i=0+i1=\cos(\pi/2)+i\sin(\pi/2)=e^{i\pi/2}$.
Therefore $i^{n}=e^{in\pi/2}=\cos(n\pi/2)+i\sin(n\pi/2)$.
Let me also give another way to see this, from a different angle.
The function $f:\mathbb Z\to\mathbb C$ defined by $f(n)=i^n$ has period four since $f(n+4)=i^{4+n}=i^4i^n=1i^n=f(n)$.
The function $g:\mathbb Z\to\mathbb C$, $g(n)=\cos(n\pi/2)+i\sin(n\pi/2)$, is also periodic with period four since the cosine and sine functions have period $2\pi$.
Since $f(n)=g(n)$ for all $n\in\{0,1,2,3\}$ and both functions have period four, they must in fact be equal for all $n\in\mathbb Z$.
A: By Euler's formula, for any $x=a+bi \in \mathbb{C}$, $$a+bi = re^{i\theta} = r(\cos \theta + i\sin \theta)$$ where $r= \sqrt{a^2 + b^2}$ and $\theta = \arctan (b/a)$. Thus $i = e^{i\pi/2}$ and $$i^n = e^{ni\pi /2} = \cos\big(\frac{n\pi}{2}\big) + i\sin\big(\frac{n\pi}{2}\big)$$
To see Euler's formula you can think of the complex numbers as ordered pairs $(a,b)$ equipped with a different kind of multiplication: $$(a_1,b_1)\cdot (a_2,b_2) = (a_1a_2,-b_1b_2)$$ Then you can convert these ordered pairs to polar coordinates via the formulas above for $r$ and $\theta$. The expression $re^{i\theta}$ follows from the identities $$\cos x = \frac{e^{ix} + e^{-ix}}{2} \hspace{2mm} , \hspace{2mm} \sin x = \frac{e^{ix} - e^{-ix}}{2i}$$
