Complex Number Calculator

Perform arithmetic with complex numbers, convert between rectangular (a + bi) and polar (r∠θ) forms, and visualize inputs and results on the Argand plane. Choose degrees or radians for angles and show step-by-step work for teaching or verification.

You may enter decimals or simple fractions like 3/4.
In polar form enter magnitude and angle in selected unit (degrees/radians).

Complex numbers: arithmetic, conversions and geometric interpretation

Complex numbers extend the familiar system of real numbers by introducing a square root of −1, denoted by the imaginary unit i. Any complex number can be written in rectangular form as a + bi, where a is the real part and b is the imaginary part. Equivalently, a complex number can be expressed in polar form as r∠θ (sometimes written r e^{iθ}), where r ≥ 0 is the magnitude (distance from the origin in the complex plane) and θ is the argument (angle made with the positive real axis). Both forms are useful: rectangular form is convenient for addition and subtraction, while polar form makes multiplication, division, and powers more intuitive because magnitudes multiply and angles add.

Arithmetic on complex numbers follows algebraic rules that mirror real arithmetic but with the special rule i² = −1. For addition and subtraction, operate component-wise: (a + bi) + (c + di) = (a + c) + (b + d)i. For multiplication, distribute as with binomials and apply i² = −1: (a + bi)(c + di) = (ac − bd) + (ad + bc)i. Division is slightly more elaborate: divide by multiplying numerator and denominator by the complex conjugate of the denominator to produce a real denominator, then simplify to rectangular form. In polar form multiplication and division are simpler: multiply magnitudes and add angles for multiplication, divide magnitudes and subtract angles for division.

Geometrically, each complex number corresponds to a point or vector in the Argand plane: its real part is the x-coordinate and its imaginary part is the y-coordinate. Complex addition corresponds to vector addition — placing vectors tip-to-tail — while multiplication combines scaling and rotation. For example, multiplying by i corresponds to a 90° rotation (anticlockwise) because i has magnitude 1 and argument 90°. This geometric viewpoint is particularly useful in physics, signal processing, and control theory where complex phasors represent oscillations or rotating vectors.

Conversion between rectangular and polar forms uses elementary trigonometry. Given z = a + bi, the magnitude is r = √(a² + b²) and the argument θ = atan2(b, a), where atan2 is the two-argument arctangent that returns an angle in the correct quadrant. Conversely, given polar coordinates (r, θ), rectangular components are a = r cos θ and b = r sin θ. When working with degrees or radians be careful to keep angle units consistent. Software and calculators commonly allow switching between degrees and radians for convenience.

Complex arithmetic is also powerfully expressed using Euler's formula: e^{iθ} = cos θ + i sin θ. Hence r e^{iθ} = r(cos θ + i sin θ) is an equivalent representation of the polar form, and many identities and transforms in mathematics and engineering exploit this compact notation. For instance, raising a complex number to an integer power in polar form is straightforward: (r e^{iθ})^n = r^n e^{i n θ}; De Moivre's theorem follows immediately.

When presenting results, it is helpful to show both rectangular and polar forms. Rectangular yields explicit real and imaginary parts useful for algebra, while polar emphasizes magnitude and phase useful for interpreting scaling and rotation. A good calculator will provide both and convert cleanly between them, displaying angles normalized to a conventional range (for example (−π, π] in radians or (−180°, 180°] in degrees).

Precision and numeric stability matter. JavaScript uses IEEE 754 double precision arithmetic; for many practical uses this is sufficient, but be mindful of rounding when magnitudes differ by many orders or when denominators approach zero. Division by zero is invalid; the tool should detect exact zero denominators and report an error. For near-zero denominators numerical results can be large and suffer rounding noise.

Visualization on the Argand plane helps build intuition. Plot the two operands as points or vectors, and then plot the result; add vector arrows and optionally annotate magnitudes and angles. Canvas-based plotting (such as CanvasJS used here) offers responsive, interactive charts where users can pan, zoom, or hover to inspect coordinates. Seeing multiplication as a rotation and scaling of the first vector toward the second is a memorable way to understand complex multiplication.

Worked example — multiplication:

  1. Let z₁ = 3 + 4i. Convert to polar: r₁ = 5, θ₁ = atan2(4,3) ≈ 53.130°.
  2. Let z₂ = 1 − 2i. Convert to polar: r₂ = √(1² + (−2)²) = √5 ≈ 2.2361, θ₂ = atan2(−2,1) ≈ −63.434°.
  3. Multiply in polar: r = r₁ × r₂ = 5 × √5 ≈ 11.1803; θ = θ₁ + θ₂ ≈ −10.304°.
  4. Convert back to rectangular: a = r cos θ ≈ 11.1803 cos(−10.304°) ≈ 11.0; b = r sin θ ≈ −2.0 → result ≈ 11 − 2i (rounded).

Worked example — division:

  1. Using the same z₁ and z₂, divide z₁ / z₂ in polar: r = r₁ / r₂ = 5 / √5 = √5 ≈ 2.2361; θ = θ₁ − θ₂ ≈ 116.564°.
  2. Rectangular form: a = r cos θ ≈ −1.0, b = r sin θ ≈ 2.0 → result ≈ −1 + 2i.

Teaching tip: show intermediate arithmetic explicitly — the product of reals and imaginaries for multiplication, and conjugation for division — so learners see how terms combine and cancel. This calculator’s step-by-step option provides those intermediate algebraic steps for clarity and verification.

Applications of complex arithmetic are widespread: AC circuit analysis uses complex impedances; control and signal processing use transfer functions and phasors; quantum mechanics uses complex-valued wave functions; and many numerical methods operate on complex eigenvalues for stability assessment. Having a reliable calculator to experiment with arithmetic, conversions, and plots accelerates learning and debugging.

Conclusion: complex numbers unite algebra and geometry. Whether you are computing sums, products, quotients, converting forms, or visualizing transformations, a clear interface with both numeric and graphical feedback is tremendously helpful. Use rectangular form for addition and subtraction, polar form for multiplication and division, show both forms to communicate results, and plot on the Argand plane to build geometric intuition.

Frequently Asked Questions (FAQs)

1. What input formats are accepted?
Rectangular (enter real and imaginary parts separately) and polar (magnitude and angle in selected unit). The tool accepts decimals and simple fractions.
2. Can I view both rectangular and polar results?
Yes — the program displays the result in both forms side-by-side, with angles normalized to the chosen unit.
3. How are angles normalized?
Angles are normalized to (−180°, 180°] when using degrees or (−π, π] when using radians to keep representation consistent.
4. What happens if I try to divide by 0 + 0i?
The tool flags division by zero as invalid and will not perform the calculation; it requests a valid non-zero denominator.
5. Do you support plotting multiple points?
Graph Mode plots both input complex numbers and the result. You can visually inspect their positions and vector relationships in the Argand plane.
6. Are computations precise?
Computations use JavaScript double precision. Display precision is adjustable; for high-precision needs use specialized numerical libraries.
7. How are multiplication and division easier in polar form?
Multiplication multiplies magnitudes and adds angles; division divides magnitudes and subtracts angles, avoiding some algebraic expansion steps required in rectangular form.
8. Can I copy the step-by-step solution?
Use the Copy Result button to copy a summary. The Download CSV option exports detailed values and the steps log.
9. Is Euler's form supported?
Yes — the article explains Euler form r e^{iθ}; the calculator shows polar r∠θ which is mathematically equivalent and convenient for computation and display.
10. Do you support complex conjugate operations?
This tool focuses on basic arithmetic and conversions; the step-by-step output shows conjugation used during division. Adding a dedicated conjugate button is possible on request.