Rendering fractals…
Linear Algebra × Fractal Geometry

The Infinite Dance of Matrices:
Fractal Geometry

Explore how simple matrices generate infinitely complex structures found in nature, technology, and mathematics..

Explore
Scroll

The Evolution of Fractal Geometry

Trace the revolutionary journey from Euclid's smooth world to Mandelbrot's rough reality — a timeline of mathematical rebellion.

Ancient — 300 BC

Classical Euclidean Geometry

For over two thousand years, mathematics described the world with perfect circles, lines, and triangles. But clouds are not spheres, mountains are not cones, and coastlines are not smooth curves. Nature demanded a new language.

1883

Cantor Set & Weierstrass Function

Georg Cantor created a set by repeatedly removing the middle third of a line segment — producing a "dust" of points with zero length but uncountably many elements. Karl Weierstrass discovered a function that is continuous everywhere but differentiable nowhere, shocking the mathematical world.

1904 — 1915

Koch Snowflake & Sierpiński Triangle

Helge von Koch constructed a curve of infinite length enclosing a finite area — a mathematical "monster." Wacław Sierpiński created his famous triangle by recursively removing centers from triangles, producing a shape with zero area but infinite perimeter.

1918

Julia & Fatou Sets

Gaston Julia and Pierre Fatou independently studied the iteration of complex functions z → z² + c, discovering infinitely intricate boundaries between convergence and divergence. Without computers, they could only imagine the shapes — but their work laid the foundation for the Mandelbrot set.

1967

Mandelbrot's Coastline Question

Benoît Mandelbrot published "How Long Is the Coast of Britain?" — demonstrating that a coastline's measured length depends on the ruler size. As the ruler shrinks, the length grows without bound. This paper introduced the concept of fractal dimension to mainstream science.

1975 — 1980

Birth of "Fractal" & Computer Visualization

Mandelbrot coined the term "fractal" from Latin "fractus" (broken) and published "The Fractal Geometry of Nature." Using IBM computers, he generated the first visualizations of the Mandelbrot set — revealing a structure of infinite complexity that became an icon of mathematics.

Benoît B. Mandelbrot

November 20, 1924 — October 14, 2010

Born in Warsaw, Poland, to a Lithuanian-Jewish family, Mandelbrot fled to France during World War II. His uncle Szolem Mandelbrojt, a mathematician, influenced his early education. Despite an unconventional academic path, he earned his PhD from the University of Paris in 1952.

Mandelbrot spent 35 years at IBM's Thomas J. Watson Research Center, where access to computing power allowed him to visualize mathematical structures no one had seen before. He later became Sterling Professor of Mathematical Sciences at Yale University.

His revolutionary insight was that roughness, irregularity, and self-similarity — long dismissed as "pathological" by mathematicians — are actually the fundamental geometry of nature. Trees, rivers, lungs, galaxies, financial markets — all follow fractal patterns.

"Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth, nor does lightning travel in a straight line." — Benoît Mandelbrot

Fractal Library

A curated visual set of natural fractal patterns and classic mathematical fractals.

Theoretical Foundation: Iterated Function Systems

Fractals are built by repeatedly applying affine transformation matrices — a process rooted in the heart of linear algebra.

To generate a fractal, we apply affine transformations to a point iteratively. Each transformation scales, rotates, shears, or translates the point in 2D space.

At the core lies a 2×2 transformation matrix A and a translation vector b. In each iteration, the current point is multiplied by the matrix and the vector is added.

By choosing different matrix coefficients, we can produce an infinite variety of fractal structures. Each coefficient determines the transformation's character — its scale, angle, and curvature.

When the eigenvalues of A satisfy |λ| < 1, the IFS is contractive — meaning repeated iteration converges to a unique fixed shape called the attractor. This is guaranteed by the Banach Fixed-Point Theorem.

xn+1 = A · xn + b
a₁₁a₂₁
a₁₂a₂₂
Matrix A
·
xₙyₙ
Point
+
bₓbᵧ
Shift
A
2×2 Transformation
(Scale, Rotate, Shear)
xₙ
Current Point
in 2D Space
b
Translation Vector
(Offset / Shift)

🔑 Key Takeaway

"Without linear algebra, modern fractal generation would not exist. Matrices encode scaling, rotation, reflection, and translation, allowing simple rules to generate infinite mathematical complexity."

🔄 Rotation

[ cos θ −sin θ ]
[ sin θ cos θ ]

Rotates a point around the origin by angle θ. For θ = 90°, the matrix sends (1,0) → (0,1). Preserves distances and angles — this is an orthogonal transformation with det(A) = 1.

📐 Scaling

[ sₓ 0 ]
[ 0 sᵧ ]

Scales x by sₓ and y by sᵧ. When sₓ = sᵧ, this is a uniform scaling. In IFS fractals, we typically use |s| < 1 to create contractive maps — making copies smaller than the original at each step.

↗️ Shearing

[ 1 k ]
[ 0 1 ]

Shifts points horizontally proportional to their y-coordinate (or vice versa). This "tilts" shapes, creating parallelogram-like distortions. The Barnsley fern uses shear to create the natural lean of leaflets.

🪞 Reflection

[ 1 0 ]
[ 0 −1 ]

Reflects across the x-axis (shown above) or y-axis. Reflections have det(A) = −1. In fractal generation, reflections create symmetric patterns — like the left-right symmetry of the Barnsley fern.

Matrix Playground

Modify matrix coefficients to explore how affine transformations shape geometry in real-time.

Transformation Controls

[ a₁₁ a₁₂ ] / [ a₂₁ a₂₂ ]
[ bₓ bᵧ ] (normalized 0–1)
MATRIX ANALYSIS
λ₁: -
λ₂: -
Det(A): -
Status: -
Affine transformation visualization — 80,000 iterated points

📐Transform Matrices: Unit Circle → Ellipse

Red/Orange lines = Eigenvectors

Encoding Nature: The Barnsley Fern

Four simple affine transformation matrices and probabilities are enough to generate a complex biological structure found in nature.

The Barnsley fern is generated using exactly 4 affine transformations. Each transform has a specific probability that controls the visual weight of each part of the plant.

FuncabcdefProb.
f₁0.000.000.000.160.000.001%
f₂0.850.04−0.040.850.001.6085%
f₃0.20−0.260.230.220.001.607%
f₄−0.150.280.260.240.000.447%

f₁ — Stem · f₂ — Main body · f₃ — Left leaflet · f₄ — Right leaflet

100,000 iterated points — Barnsley Fern IFS

📝 Theoretical Proof (Step-by-Step)

How does the computer compute a single point? Let's transform the initial vector v = [1.0, 5.0] using the main stem transform f₂:

Step 1 (A • v):
0.85
-0.04
0.04
0.85
1.0
5.0
=
1.05
4.21
Step 2 (+ b):
1.05
4.21
+
0.0
1.6
Final Output:
1.05
5.81
➔ Transformed Vector v'
Formula Matrix Model: f(v) = A • v + b

🧮 Transform Calculator

Select an IFS transform matrix function and enter custom coordinates to see the dynamic affine mapping results.

Click calculate to map vector...
Formula: f(X) = A • X + b

Famous Fractal Problems

From paradoxical coastlines to infinitely complex sets — these celebrated problems reveal the surprising power of fractal mathematics.

🌊 The Coastline Paradox

L(ε) ~ ε^(1−D), D ≈ 1.25

In 1967, Mandelbrot asked: "How long is the coast of Britain?" The answer is unsettling — it depends on your ruler. With a 100 km ruler, Britain's coast is about 2,800 km. With a 50 km ruler, it's 3,400 km. With a 10 km ruler, it jumps to over 5,000 km.

As the ruler shrinks toward zero, the measured length grows without bound — approaching infinity. This happens because coastlines are fractals with a dimension D ≈ 1.25, meaning they're "more than a line but less than a plane."

Calculated Coastline Length
2,800 km

🔮 Interactive Mandelbrot & Julia Lab

zn+1 = zn² + c

Click inside the Mandelbrot map to pick constant c and instantly render its Julia set.

Mandelbrot Map — Click to pick c
Current c: -0.7000 + 0.2701i
Julia Set for f(z)=z²+c

🔺 The Sierpiński Triangle

Dimension = log(3)/log(2) ≈ 1.585

The Sierpiński triangle demonstrates a profound connection between randomness and determinism. The "chaos game" algorithm: pick any starting point, randomly choose one of three vertices, move halfway there, and plot the point. Repeat 100,000 times.

Chaos game — 100,000 random points

🧲 Complex Roots: Newton Fractals

zn+1 = zn - f(zn) / f'(zn)

Fractals emerge beautifully from Calculus. When solving polynomial equations like z³ - 1 = 0 using the Newton-Raphson method in the complex plane, the boundaries between the "basins of attraction" for the 3 roots form an infinitely detailed fractal.

Interactive Challenge: Click anywhere on the map to drop a "test point". Watch the engine calculate its chaotic path to one of the 3 roots!
[System Ready] Awaiting user input...
Click on the canvas to start Newton-Raphson iterations.
White dots represent the 3 actual roots of z³ - 1 = 0

📉 The First Monster: Weierstrass

f(x) = Σ aⁿ cos(bⁿ π x)

Before fractals had a name, mathematicians discovered "monsters" that defied intuition. In 1872, Karl Weierstrass shocked the world with this function.

It is the first published example of a function that is continuous everywhere but differentiable nowhere. You can draw it without lifting your pen, but it has no tangents—it is composed entirely of infinitely microscopic sharp corners.

📐 Fractal Dimension Calculator

Box-Counting Method: Measure the complexity of classic fractals.

D = limε→0 log(N(ε)) / log(1/ε)

Fractal dimension quantifies how a shape fills space. The box-counting method overlays grids of varying sizes (ε) and counts boxes containing part of the fractal (N). The slope of log(N) vs. log(1/ε) gives D.

📐 Computed Fractal Dimension (D):
Fractal preview — used for box‑counting

Koch Fractal Explorer

Choose a shape and increase the iteration depth to watch simple polygons transform into infinitely complex fractal curves.

Iteration Depth0
012345678910

L-System Engine: Grow Your Own Fractal

Lindenmayer Systems (L-Systems) use formal grammar rules to model the growth processes of plant development and fractal curves. Define an axiom, rules, and an angle to grow your own.

🧬 L-System Compiler & Rules

Select a preset to load a classic fractal, or write your own rules in the inputs below.

📖 Quick Guide
  • F / G : Move forward & Draw
  • + : Turn right by Angle
  • - : Turn left by Angle
  • [ : Save current state
  • ] : Load last saved state
  • X / Y : Variables
Turtle Graphics Engine Ready.

Fractal Audio Lab

"Welcome to the Fractal Audio Lab. Here, we explore the sonification of iterative functions. By mapping mathematical parameters to audio frequencies, we can 'hear' the structural differences between various fractals. Stable regions produce steady, lower tones, while chaotic boundaries generate complex, dynamic pitches."

No fractal selected

Real-World Applications

Fractal geometry extends far beyond pure mathematics — it drives revolutionary applications from industry to finance to medicine.

Image Compression

Fractal compression exploits self-similarity in images to achieve high compression ratios. Achieves 10,000:1 ratios for specific image types.

Financial Markets

Mandelbrot's multifractal model reveals that price changes follow fractal patterns, explaining "fat tails" in market data.

Telecommunications

Fractal antennas operate across multiple frequency bands simultaneously, enabling compact multi-band antennas in smartphones and WiFi.

Computer Graphics

Fractal algorithms generate realistic terrain, clouds, trees, and water in games and films. Used extensively in Avatar and Minecraft.

Medical Imaging

Fractal dimension analysis detects cancer in medical images — tumor boundaries have higher fractal dimensions than healthy tissue.

Nature & Biology

Fractal patterns pervade the natural world: branching of trees, rivers, blood vessels, lungs (300 million alveoli in a 6‑liter cavity).

Primary Sources

  • Mandelbrot, B. B. (1982). The Fractal Geometry of Nature. W. H. Freeman and Company.
  • Mandelbrot, B. B. (1967). How Long Is the Coast of Britain? Science, 156(3775), 636-638.
  • Barnsley, M. F. (1988). Fractals Everywhere. Academic Press.
  • Falconer, K. J. (2003). Fractal Geometry: Mathematical Foundations and Applications. Wiley.

Academic Papers

  • Hutchinson, J. E. (1981). Fractals and Self Similarity. Indiana University Mathematics Journal, 30(5), 713-747.
  • Julia, G. (1918). Mémoire sur l'itération des fonctions rationnelles. Journal de Mathématiques Pures et Appliquées, 8, 47-245.
  • Weierstrass, K. (1872). Über continuirliche Functionen eines reellen Arguments. Königlich Preußische Akademie der Wissenschaften.
  • Lindenmayer, A. (1968). Mathematical models for cellular interaction in development. Journal of Theoretical Biology, 18, 280-315.

Online Resources

  • 3Blue1Brown. Fractals are typically not self-similar. YouTube.
  • Wikipedia contributors. Fractal. Wikipedia, The Free Encyclopedia.
  • Wolfram MathWorld. Fractal. mathworld.wolfram.com.
  • University of Cambridge. Plus Magazine: Fractal Dimension. plus.maths.org.
0
IFS Transforms
0
Barnsley Iterations
0
Max Vector Lines
0
Year of "Fractal"
🎓 Guided Mode