You may want to review multiplying complex numbers first.

One nice thing about *i* is that it's a very easy number to
raise to powers. Of course, *i*^{0} = 1, since
anything raised to the 0 power is 1, and *i*^{1}
= *i* since anything raised to the 1 power is itself.
Also, *i*^{2} = −1; that's the whole point
of *i*. It follows that *i*^{3} =
−*i* and *i*^{4} = 1. From then on, the
cycle just keeps repeating. So, to
compute *i*^{n} (for any whole
number *n*), just divide *n* by 4 and look at the
remainder. If it's 0, the answer is 1. If it's 1, the answer
is *i*. If it's 2, the answer is −1. Finally, if it's
3, the answer is −*i*.