Whenever I hear "beautiful math", I immediately think fractals. A personal favorite of mine, for some time now, has been the Mandelbrot set.

Take a point on the complex plane: $(x,y) \to x + yi$. If you square this number $(x+yi)^2 = (x^2 - y^2) + 2xyi$, then square the result, and so on to infinity, one of three things will happen. If the magnitude of this complex number (straightline distance from the origin) is less than one, the value will asymptotically trend to zero. If the magnitude is more than one, it will trend to infinity. If the magnitude is exactly one, the value will either be unchanged, or it will move around to various other points that are of magnitude 1. This in itself can be used to draw some visually-interesting graphs. The set of all points for which the function does not diverge to infinity is the S-set, and its shape is the unit circle.

The Mandelbrot set adds a simple variation to the function; instead of just iteratively squaring, the value is squared, then the original value is added. The set of all points for which this function does not diverge is the M-set. Sounds easy, and it is, but the shape we get is, shall we say, more complex:

The shape of the M-set, in fact, has infinite detail given real coefficients of the complex numbers. The above image (and most other images of the Mandelbrot set) are colored, by using the number of iterations of squaring and adding needed to determine that the function diverges from that point (if the magnitude of the value ever exceeds 2 it will definitely diverge) to pick a color from a gradient or other palette (above, from dark blue to white).

Zoom in closer to any point on the edge of the set, and the M-set displays it true beauty:

"Pretty", I hear you say, "but how's it useful?" Well:

- Notice the self-similarity in many of the images; in a few, you see the image of the full set reproduced at what ends up being a much smaller scale. The mathematical reasons behind this are the focus of study in data compression algorithms.
- This same self-similarity is also being used by astrophysicists to explain aspects of our entire universe, such as why galaxies tend to form in similar, roughly rotationally-symmetrical shapes.
- The points close to but not in the M-set do not diverge linearly away from the nearest edge. The path any one starting value takes through the complex plane on its way to infinity is, in many cases, just as interesting (from aesthetic and mathematical standpoints) as the full set. This path-tracing has been used to simulate light in complex reflective/refractive structures, like insect shells.
- Portions of the M-set (and of the related Julia sets) have been used as topological maps to generate artificial terrain for movies and video games.
- Another type of fractal, the Hilbert space-filling curve, is used in cell phones and other devices for their antennas (to place the desired total length of antenna conductor into as small an area as possible).