Visualize Complex Numbers & Euler's Formula
Visualize complex numbers as points on the plane and Euler's formula as a point tracing the unit circle. Animate why e^(iθ) = cos θ + i sin θ in Manim.
To visualize complex numbers, plot them as points on the complex plane — the real part on the x-axis, the imaginary part on the y-axis. Euler's formula, , then becomes a point tracing the unit circle as increases. Animating that single point is the clearest way to show why the formula is true. Build it in Manim or generate it from a prompt with QuantumSketch.
Complex numbers are just the plane
A complex number is a point at coordinates . That reframing dissolves most of the mystery: addition is vector addition, magnitude is distance from the origin, and the "imaginary" axis is simply the vertical one. Showing as an arrow from the origin makes complex arithmetic concrete before any formula appears.
Set up the complex plane
Manim's ComplexPlane (or NumberPlane) gives you the grid for free:
from manim import *
class ComplexPoint(Scene):
def construct(self):
plane = ComplexPlane().add_coordinates()
self.play(Create(plane))
z = plane.n2p(3 + 2j) # number -> point
dot = Dot(z, color=YELLOW)
arrow = Arrow(plane.n2p(0), z, buff=0)
self.play(GrowArrow(arrow), FadeIn(dot))
n2p ("number to point") converts a Python complex number directly to screen coordinates, so you think in math, not pixels.
Animate Euler's formula
Now the centerpiece: let run from to and trace . Because its magnitude is always 1, the point stays on the unit circle, and its shadow on each axis draws and :
theta = ValueTracker(0)
circle = Circle(radius=1).move_to(plane.n2p(0))
point = always_redraw(
lambda: Dot(plane.n2p(np.exp(1j * theta.get_value())), color=RED)
)
self.add(circle, point)
self.play(theta.animate.set_value(TAU), run_time=4, rate_func=linear)
As the red dot sweeps the circle, you can drop perpendiculars to each axis to show and being traced simultaneously — that's Euler's formula, seen rather than memorized.
The "aha" with rotating vectors
Multiplying by rotates a complex number by angle . Animate a vector being multiplied by and watch it turn 90° — suddenly "multiplication by is a quarter turn" is obvious. This rotational view is why complex numbers are the natural language for waves, signals, and AC circuits.
From idea to narrated video
Drawing this by hand in Manim teaches the mechanics; producing a polished, narrated explainer takes longer. QuantumSketch generates the storyboard, animation, and narration from a prompt like "explain Euler's formula on the unit circle." The underlying Manim techniques are open in manim-coding-skill.
Frequently Asked Questions
How do you visualize complex numbers? Plot as the point on the complex plane — real part horizontal, imaginary part vertical — and draw it as an arrow from the origin.
How do you animate Euler's formula? Sweep an angle from to and trace , which stays on the unit circle while its axis projections draw and .
Why is multiplying by i a 90° rotation? , and multiplying by rotates by . So multiplying by rotates a complex number a quarter turn.
What tool animates this best? Manim for direct control, or QuantumSketch to generate a narrated version from a text prompt.
Written by Shihab Shahriar Antor — AI Engineer & Founder of Shahriar Labs. Turn a prompt into a narrated math video with QuantumSketch; Manim techniques in manim-coding-skill. Also building freelm.