z = 0 + 0i
Ready

About Newton's Fractal

Newton's method is one of the oldest algorithms for finding roots of functions: starting from a guess z₀, it iterates z ← z − f(z)/f′(z) until the sequence converges to a root. When applied to a polynomial in the complex plane, this simple iteration creates an unexpectedly intricate structure — the boundary between the regions that converge to different roots is a fractal. For the classic case f(z) = z³ − 1, the three roots of unity (the cube roots: 1, e^{2πi/3}, e^{4πi/3}) each attract a basin, and the boundaries between these basins are infinitely detailed at every scale.

Each pixel on the canvas represents a starting point in the complex plane. The simulation runs Newton's iteration from that point and colours the pixel by which root it converges to, with brightness encoding convergence speed (bright = fast). Use the polynomial selector to switch between z³−1, z⁴−1, z⁵−1, and higher degrees, and scroll or pinch to zoom into the fractal boundary to reveal ever-finer self-similar structure.

Frequently Asked Questions

What is Newton's method and why does it create a fractal?

Newton's method iterates z ← z − f(z)/f′(z) to find roots of f. For polynomials of degree ≥ 3 in the complex plane, the basins of attraction (sets of starting points converging to each root) are separated by an infinitely complex boundary. The boundary is a Julia set — it has fractal dimension greater than 1 and is self-similar at all scales. Near any boundary point you can find starting points heading to all n roots simultaneously.

What are the n-th roots of unity and where are they in the picture?

The n-th roots of unity are the n solutions of zⁿ = 1: they are zₖ = e^{2πik/n} = cos(2πk/n) + i·sin(2πk/n) for k = 0, 1, …, n−1. They lie equally spaced on the unit circle in the complex plane. For z³ − 1, the three roots are at angles 0°, 120°, and 240°; Newton's method applied to any starting point will converge to one of these three values — or fail to converge in the chaotic boundary region.

Why does adding more roots (higher degree) make the fractal more complex?

With n roots there are n basins competing for every starting point. For z² − 1 the basin boundary is just the imaginary axis — trivially simple, as Arthur Cayley showed in 1879. For n ≥ 3 the boundaries become fractal Julia sets. The complexity grows with n: more roots mean more basins, and the boundary between them becomes progressively more intricate with richer self-similar patterns at finer scales.

What is Cayley's problem?

In 1879 Arthur Cayley solved Newton's method convergence for z² − 1 (the boundary is simply the imaginary axis) but noted that z³ − 1 "presents considerable difficulty." That difficulty is precisely the fractal — a structure that could not be visualised until computers could colour millions of pixels. The modern understanding came through the work of Mandelbrot, Hubbard, and Douady in the 1980s using the theory of complex dynamical systems.

What does the brightness encoding mean?

Brighter pixels converged to their root in fewer Newton iterations; darker pixels required more. Points near the fractal boundary oscillate between basins for many steps before finally settling, making them dark. Points far from the boundary converge rapidly and appear bright. This brightness-by-iteration technique is called the "escape time" or "iteration count" colouring method, analogous to how the Mandelbrot set is usually rendered.

How fast does Newton's method converge?

For starting points away from the fractal boundary, Newton's method converges quadratically: the number of correct decimal digits roughly doubles with each iteration. Starting 0.1 away from a root, after one step you're ~0.01 away, after two ~0.0001, and so on. This rapid convergence makes Newton's method one of the most efficient root-finding algorithms in practice, used in calculators, GPS receivers, and virtually all scientific computing libraries.

What happens at z = 0 during the iteration?

At z = 0 the derivative f′(z) = n·z^{n−1} = 0, so the Newton step z − f(z)/f′(z) is undefined (division by zero). In practice the simulation perturbs z by a tiny amount (∼10⁻¹⁰) to avoid this singularity. The origin is a "repelling fixed point" of the Newton map — starting near it causes the iteration to diverge or jump erratically before eventually landing in a basin.

Is the fractal boundary really infinitely detailed?

Yes — mathematically the Julia set boundary has Hausdorff dimension strictly between 1 and 2 (for Newton fractals it is typically close to 2). At any magnification level you can zoom in to reveal new structure identical in character to the large-scale picture. In practice the simulation's resolution limits visible detail, but the mathematical object is self-similar at all scales — zooming 10^100 times would reveal patterns indistinguishable from the overview.

What is the relaxed Newton's method?

Relaxed Newton replaces the standard step with z ← z − a·f(z)/f′(z), where a is a relaxation parameter. With a = 1 you get classic Newton. Values a ≠ 1 distort the basins and can create chaotic regions where no root is ever reached. Over-relaxation (a > 1) accelerates convergence for well-behaved starting points but expands the chaotic boundary. The "chaos" polynomial preset z³ − 2z + 2 has attracting 2-cycles that capture some trajectories indefinitely.

How is Newton's fractal related to the Julia set and Mandelbrot set?

The basin boundaries of Newton's method are Julia sets for the rational map N(z) = z − f(z)/f′(z). The Mandelbrot set parametrises which Julia sets are connected vs. totally disconnected. Newton fractals are a special family of Julia sets where the rational map comes from the Newton iteration. The rich boundary structure seen here — with countably many "lobes" and infinite recursion — is a direct consequence of the same complex-dynamical theory that produces the Mandelbrot set.

About this simulation

This simulation renders Newton's fractal by running Newton's root-finding iteration z ← z − f(z)/f′(z) from every pixel of the complex plane, treating each pixel as a starting guess. The pixel is coloured by which root the iteration converges to, with brightness showing how many steps convergence took.

🔬 What it shows

The n roots of zⁿ−1, evenly spaced around the unit circle, each with its own basin of attraction. Bright colours mean quick convergence; the dark, tangled boundary regions between basins are where the fractal detail lives.

🎮 How to use

Choose a polynomial (z³−1 through z⁸−1), then adjust max iterations, tolerance ε, and colour saturation with the sliders. Scroll to zoom, click-and-drag to pan; Reset view returns to the default frame, Re-render redraws with current settings.

💡 Did you know?

Arthur Cayley solved the two-root case (z²−1) in 1879, but he noted the three-root case z³−1 "presents considerable difficulty" — that difficulty turned out to be a genuine fractal, understood only a century later through complex dynamics.

Frequently asked questions

Why does Newton's method produce a fractal here?

For polynomials with three or more roots, the boundary between points converging to different roots is infinitely detailed at every zoom level. This boundary is a type of Julia set.

What do the colours and brightness in the image represent?

Each hue corresponds to one root, so a pixel's colour shows which root its starting point reached; brightness encodes how many iterations that took, fast convergence rendered brighter.

What does the tolerance ε slider actually control?

Tolerance sets how close a point must get to a root to count as converged. A larger ε accepts convergence sooner and gives smoother basins; a smaller ε reveals finer boundary structure but needs more computation.

Why does adding more roots make the picture more complex?

With more roots, more basins compete for every starting point, so the boundary has to weave between more neighbours. Moving from z³−1 to z⁸−1 roughly doubles the basins and visibly increases boundary intricacy.

What happens if a pixel never converges within the iteration limit?

Such pixels are rendered dark grey. This typically happens right on the fractal boundary, where the iteration can bounce between basins for a long time before settling, or in a genuinely chaotic point.