# Raising a complex number to the nth power

1. Jul 16, 2008

### magda3227

I was looking around a little bit for an algorithm that would compute a complex number to the nth power.

Can anyone supply me a resource that covers this? I wouldn't imagine it being different than some sort of (x+y)^n formula.

2. Jul 16, 2008

### yenchin

You can convert the complex number into either polar form or exponential form and then use De Moivre's theorem.

3. Jul 16, 2008

### HallsofIvy

DeMoivre's theorem:
If $z= r e{i\theta}$, then $z^n= r^ne^{i n\theta}$.

r is the "modulus" or absolute value of z: if z= x+iy then $|z|= \sqrt{x^2+ y^2}$.

$\theta$ is the "argument" or angle the line through 0 and z in the complex plane makes with the real-axis: if z= x+ iy, then $\theta= arctan(y/x)$.

4. Jul 16, 2008

### maze

@Magda:
Here's a question for you to ponder: if you take a complex number, z, that has length 1 (a^2 + b^2 = 1 for z = a+bi), then what happens when you keep raising it to higher and higher powers: z^1, z^2, z^3, ... z^100000, ...

5. Jul 16, 2008

### magda3227

Thank you all very much. I was not familiar with DeMoivre's Theorem at all. I have seen Euler's identity, however.

In response to maze, I have no idea what happens when you raise a complex number, z = length 1 to higher and higher powers. I can't even begin to make an assumption of what would happen.

I'm not smart. :/

6. Jul 16, 2008

### maze

Try some examples!

Here are the most obvious ones:
1 1 1 1 1 1 1 1 ...
i -1 -i 1 i -1 ...

Here are some for you to try:
1/sqrt(2) + i/sqrt(2)
-1/2 + i*sqrt(3)/2

7. Jul 17, 2008

### HallsofIvy

It's not a matter of being smart, it's a matter of having specific knowledge. It is true, generally, that |xn|= |x|n. In particular, if |z|= 1 then every power of z will also have absolute value 1. In the complex plane, the absolute value of a number is its distance from the origin. Every number with absolute value 1 lies on the unit circle. If z is on the unit circle, the so is zn for all n, although they may move around the unit circle.

8. Jul 17, 2008

### maze

was hoping he would figure this out on his own....