The mathematical definition of the Mandelbrot set uses the complex quadratic polynomial

P(z, c) = z2 + c,

where z and c are complex numbers conveniently visualized as points in an Argand diagram. Since the result is also a complex number, then for a particular value of the parameter c, any z will map to another point. By repeating the process an arbitrary number of times, we generate a sequence of higher-order polynomials:

P2(z, c) = P(P(z, c), c),
P3(z, c) = P(P2(z, c), c), …

and generally

Pn+1(z, c) = P(Pn(z, c), c).

For a particular initial value of z, this generates a sequence of points (the "orbit" of z) and starting from z = 0 we get Pn(0, c), which is the orbit of 0. This orbit depends on the parameter c and one of two cases must apply: either the sequence escapes to infinity or else it remains bounded, within a finite distance of the origin. The Mandelbrot set is the set of all values of c for which Pn(0, c) is finite for all n.