De Moivre’s Theorem Calculator: Complex Numbers & Powers


De Moivre’s Theorem Calculator

Welcome to the De Moivre’s Theorem Calculator. This tool simplifies the process of raising complex numbers to an integer power using De Moivre’s Theorem. Enter your complex number in polar form (or convert from rectangular) and the desired power to see the result.

Complex Number Power Calculator



The real component of the complex number (a + bi).


The imaginary component of the complex number (a + bi).


The integer exponent to raise the complex number to. Must be a non-negative integer.


Understanding De Moivre’s Theorem

De Moivre’s Theorem is a fundamental result in complex number theory that provides a straightforward way to calculate the power of a complex number when it’s expressed in its polar form. It dramatically simplifies operations that would otherwise be very cumbersome if performed in rectangular form. The theorem states that for any complex number $z$ expressed as $z = r(\cos \theta + i \sin \theta)$, where $r$ is the modulus (or magnitude) and $\theta$ is the argument (or angle), raising $z$ to an integer power $n$ is given by:

$$z^n = r^n(\cos(n\theta) + i \sin(n\theta))$$

This theorem is incredibly useful in various fields, including electrical engineering, signal processing, quantum mechanics, and advanced mathematics, for solving polynomial equations, finding roots of unity, and analyzing periodic functions.

How to Use This De Moivre’s Theorem Calculator

Our De Moivre’s Theorem calculator is designed for ease of use. It takes a complex number in rectangular form ($a + bi$) and an integer power ($n$) as input, then calculates the result of $z^n$ using the theorem.

  1. Enter the Real Part (a): Input the real component of your complex number.
  2. Enter the Imaginary Part (b): Input the imaginary component of your complex number.
  3. Enter the Power (n): Input the integer exponent you wish to apply. This should be a non-negative integer.
  4. Click ‘Calculate’: The calculator will process your inputs.

The results will be displayed immediately, showing:

  • Main Result: The final complex number $z^n$ in polar form (magnitude and angle) and ideally also in rectangular form for easier interpretation.
  • Intermediate Radius (r): The magnitude of the original complex number, $r = \sqrt{a^2 + b^2}$.
  • Intermediate Angle (Radians): The argument of the original complex number, $\theta = \arctan(b/a)$ (adjusted for quadrant).
  • Intermediate Angle (Degrees): The argument converted to degrees for broader understanding.

Interpreting Results: The main result shows the complex number raised to the power $n$. The intermediate values help you understand the original complex number’s polar representation and how De Moivre’s Theorem transforms it.

Copy Results: Use the ‘Copy Results’ button to easily transfer the calculated values to your notes or other applications.

Reset: The ‘Reset’ button clears all fields and returns them to default values, allowing you to start a new calculation.

De Moivre’s Theorem Formula and Mathematical Explanation

De Moivre’s Theorem is derived from Euler’s formula, $e^{i\theta} = \cos \theta + i \sin \theta$. A complex number $z$ in polar form can be written as $z = r e^{i\theta}$.

Using this exponential form, raising $z$ to the power $n$ becomes:

$$z^n = (r e^{i\theta})^n = r^n (e^{i\theta})^n = r^n e^{i(n\theta)}$$

Substituting back Euler’s formula:

$$z^n = r^n (\cos(n\theta) + i \sin(n\theta))$$

This shows that to raise a complex number to a power $n$, you raise its modulus $r$ to the power $n$ and multiply its argument $\theta$ by $n$.

Variable Explanations

Variables in De Moivre’s Theorem
Variable Meaning Unit Typical Range
$z$ Complex number N/A $a + bi$ or $r(\cos \theta + i \sin \theta)$
$a$ Real part of the complex number Real Number $(-\infty, \infty)$
$b$ Imaginary part of the complex number Real Number $(-\infty, \infty)$
$r$ Modulus (magnitude) of the complex number Non-negative Real Number $[0, \infty)$
$\theta$ Argument (angle) of the complex number Radians or Degrees Typically $[0, 2\pi)$ or $(-\pi, \pi]$ radians; $[0, 360)$ or $(-180, 180]$ degrees.
$n$ Integer exponent Integer …, -2, -1, 0, 1, 2, …
$z^n$ The complex number raised to the power $n$ N/A Resulting complex number

Practical Examples

Example 1: Squaring a Simple Complex Number

Let’s calculate $(1 + i)^2$.

  • Input Real Part (a): 1
  • Input Imaginary Part (b): 1
  • Input Power (n): 2

Calculation Steps:

  1. Convert to polar form:
    • $r = \sqrt{1^2 + 1^2} = \sqrt{2}$
    • $\theta = \arctan(1/1) = \pi/4$ radians (or 45 degrees)

    So, $z = \sqrt{2}(\cos(\pi/4) + i \sin(\pi/4))$.

  2. Apply De Moivre’s Theorem:
    • $r^n = (\sqrt{2})^2 = 2$
    • $n\theta = 2 \times (\pi/4) = \pi/2$ radians (or 90 degrees)
  3. Result in polar form: $z^2 = 2(\cos(\pi/2) + i \sin(\pi/2))$
  4. Convert back to rectangular form: $2(0 + i \times 1) = 2i$.

Calculator Output (for $a=1, b=1, n=2$):

  • Main Result: Approximately $2(\cos(1.57) + i \sin(1.57))$ which is $0 + 2i$.
  • Intermediate Radius: $\sqrt{2} \approx 1.414$
  • Intermediate Angle (Radians): $\pi/4 \approx 0.785$
  • Intermediate Angle (Degrees): 45°

Interpretation: Squaring the complex number $1+i$ results in $2i$. This aligns with the algebraic expansion: $(1+i)^2 = 1^2 + 2(1)(i) + i^2 = 1 + 2i – 1 = 2i$.

Example 2: Finding the Cube of a Complex Number

Let’s calculate $(-1 – i)^3$.

  • Input Real Part (a): -1
  • Input Imaginary Part (b): -1
  • Input Power (n): 3

Calculation Steps:

  1. Convert to polar form:
    • $r = \sqrt{(-1)^2 + (-1)^2} = \sqrt{1 + 1} = \sqrt{2}$
    • Since both parts are negative, the angle is in the third quadrant. $\theta = \arctan(-1/-1) + \pi = \arctan(1) + \pi = \pi/4 + \pi = 5\pi/4$ radians (or 45° + 180° = 225°).

    So, $z = \sqrt{2}(\cos(5\pi/4) + i \sin(5\pi/4))$.

  2. Apply De Moivre’s Theorem:
    • $r^n = (\sqrt{2})^3 = 2\sqrt{2}$
    • $n\theta = 3 \times (5\pi/4) = 15\pi/4$ radians. To simplify the angle, we subtract multiples of $2\pi$. $15\pi/4 – 2\pi = 15\pi/4 – 8\pi/4 = 7\pi/4$ radians (or $3 \times 225° = 675°$; $675° – 360° = 315°$).
  3. Result in polar form: $z^3 = 2\sqrt{2}(\cos(7\pi/4) + i \sin(7\pi/4))$
  4. Convert back to rectangular form: $2\sqrt{2}(\frac{\sqrt{2}}{2} + i (-\frac{\sqrt{2}}{2})) = 2\sqrt{2} \times \frac{\sqrt{2}}{2} – i \times 2\sqrt{2} \times \frac{\sqrt{2}}{2} = 2 – 2i$.

Calculator Output (for $a=-1, b=-1, n=3$):

  • Main Result: Approximately $2\sqrt{2}(\cos(5.498) + i \sin(5.498))$ which is $2 – 2i$.
  • Intermediate Radius: $\sqrt{2} \approx 1.414$
  • Intermediate Angle (Radians): $5\pi/4 \approx 3.927$
  • Intermediate Angle (Degrees): 225°

Interpretation: Raising $-1-i$ to the power of 3 yields the complex number $2-2i$. This demonstrates how De Moivre’s Theorem efficiently handles powers of complex numbers, even those in different quadrants.

Key Factors Affecting De Moivre’s Theorem Calculations

  1. Accuracy of Polar Conversion: The most crucial step before applying De Moivre’s Theorem is accurately converting the complex number from rectangular ($a+bi$) to polar ($r(\cos \theta + i \sin \theta)$) form. Errors in calculating the modulus ($r = \sqrt{a^2 + b^2}$) or the argument ($\theta$) will propagate directly to the final result. Special attention must be paid to determining the correct quadrant for the angle $\theta$ using the signs of $a$ and $b$.
  2. The Power (n): The theorem is stated for integer powers. While extensions exist for fractional powers (related to finding roots), the standard theorem applies directly to positive, negative, and zero integers. A power of $n=0$ always results in 1 (for non-zero $z$). Negative powers $n = -m$ mean $z^{-m} = 1/z^m$, which involves calculating the reciprocal of $z^m$.
  3. Modulus of the Base Complex Number (r): If $r=0$ (i.e., the complex number is $0+0i$), then $z^n = 0$ for any positive integer $n$. If $r=1$, then $r^n=1$, simplifying the calculation significantly to just $(\cos \theta + i \sin \theta)^n = \cos(n\theta) + i \sin(n\theta)$. If $r > 1$, the magnitude grows rapidly with $n$. If $0 < r < 1$, the magnitude shrinks.
  4. Argument of the Base Complex Number ($\theta$): The argument is multiplied by $n$. This means that as $n$ increases, the angle $n\theta$ can cycle around the complex plane multiple times. It’s standard practice to reduce the final angle $n\theta$ to be within a principal range, typically $[0, 2\pi)$ or $(-\pi, \pi]$ radians, by adding or subtracting multiples of $2\pi$.
  5. Precision and Rounding: Calculations involving square roots and trigonometric functions often result in irrational numbers. The level of precision used in intermediate steps (e.g., value of $\pi$, $\sqrt{2}$) can affect the final answer, especially for high powers or complex numbers with magnitudes far from 1. Our calculator uses standard floating-point precision.
  6. Choice of Angle Units (Radians vs. Degrees): While the theorem holds true for angles in either unit, calculations are typically performed using radians, as they are the natural unit for angles in calculus and many areas of science and engineering. Ensure consistency. If you start with degrees, convert to radians for calculation, or ensure your trigonometric functions (like those in programming languages) match the input unit. Our calculator provides both for clarity.

Visualizing Complex Number Powers


Visual representation of the original complex number (blue) and the result after applying De Moivre’s Theorem (red) on the complex plane. The angle arcs indicate the arguments $\theta$ and $n\theta$.

Frequently Asked Questions (FAQ)

What is the polar form of a complex number?

The polar form expresses a complex number $z = a + bi$ using its distance from the origin (modulus $r$) and the angle it makes with the positive real axis (argument $\theta$). It is written as $z = r(\cos \theta + i \sin \theta)$ or in exponential form as $z = re^{i\theta}$.

Can De Moivre’s Theorem be used for non-integer powers?

The standard De Moivre’s Theorem is strictly for integer powers ($n \in \mathbb{Z}$). For fractional powers (like finding roots, e.g., $n = 1/m$), a related formula is used, which results in $m$ distinct roots. The formula is $z^{1/m} = r^{1/m} (\cos(\frac{\theta + 2k\pi}{m}) + i \sin(\frac{\theta + 2k\pi}{m}))$ for $k = 0, 1, …, m-1$. Our calculator is designed for integer powers.

How do I handle negative powers with De Moivre’s Theorem?

If the power $n$ is negative, let $n = -m$ where $m$ is a positive integer. Then $z^n = z^{-m} = \frac{1}{z^m}$. You can calculate $z^m$ using the theorem and then find its reciprocal. Alternatively, the formula $z^n = r^n(\cos(n\theta) + i \sin(n\theta))$ still holds true for negative integers because $(\cos \phi)^{-1} = \cos(-\phi)$ and $(\sin \phi)^{-1} = \sin(-\phi)$ is not strictly true, but rather $1/(\cos \phi + i \sin \phi) = \cos \phi – i \sin \phi = \cos(-\phi) + i \sin(-\phi)$.

What happens if the complex number is 0?

If the complex number is $0 + 0i$, its modulus $r$ is 0. For any positive integer power $n$, $0^n = 0$. For $n=0$, $0^0$ is typically considered undefined or context-dependent (often taken as 1 in combinatorics or set theory). For negative powers, $0^n$ (where $n<0$) involves division by zero, hence it's undefined.

Why is the angle calculation important in polar form?

The angle (argument) is crucial because De Moivre’s Theorem involves multiplying the angle by the power $n$. This rotation effect is fundamental to the theorem’s application. Getting the angle correct, especially its quadrant, is vital for accurate results.

Is De Moivre’s Theorem used in fields outside pure mathematics?

Yes, absolutely. It’s widely used in electrical engineering for AC circuit analysis (phasors), signal processing (Fourier transforms), control systems, and physics (quantum mechanics). Its ability to simplify complex number exponentiation makes it invaluable for analyzing systems with sinusoidal components.

What is the relationship between De Moivre’s Theorem and Euler’s Formula?

De Moivre’s Theorem can be elegantly derived using Euler’s formula ($e^{i\theta} = \cos \theta + i \sin \theta$). Expressing a complex number in exponential polar form ($z = re^{i\theta}$) makes applying the power $n$ trivial: $(re^{i\theta})^n = r^n e^{i(n\theta)}$, which directly translates back to $r^n(\cos(n\theta) + i \sin(n\theta))$.

Can the calculator handle very large integer powers?

The calculator uses standard JavaScript number types, which have limitations on precision and maximum value. For extremely large integer powers, results might lose precision or overflow. Specialized libraries for arbitrary-precision arithmetic would be needed for such cases.

© 2023 Your Website Name. All rights reserved.


Leave a Reply

Your email address will not be published. Required fields are marked *