Visualizing Derivatives (phase plots 2)

In part one we looked at some simple functions in the complex plane. Now let's say more about what complex arithmetic looks like.

Multiplication is rotation

Part one hinted at this: multiplying two complex numbers together adds their two angles together relative to the origin, so multiplying by a complex number has the visual effect of a rotation. We see this when we move parts of the function around and the color swirls spin to keep the different pieces connected -- the points where the function is zero or infinity pull against each other, spinning the colors as needed to maintain their connection.

Try moving the pieces of this demo again to see how this works. Whenever you move one point, the other points rotate with it, either in the same direction or the opposite. Which ones move in which directions? Is there a pattern? What do you need to do to rotate a point through a full circle?


Remember that the derivative of a function is the rate at which that function is changing. The standard picture of this is to draw a graph and show the derivative at a point as the slope of the graph at that point. With phase plots we need a different approach.

The most important information in a phase plot is the locations where the color swirls converge. These are the places where the function hits zero or infinity. But what it means for a function's derivative to hit zero is that the function “isn't changing,” that is, it has a slope of zero because it has the same value everywhere nearby.

This also has a nice interpretation with phase plots: because phase lines of different colors can't cross each other, the places where a function stays the same locally are the place where the phase lines collide and cross. Let's see an example.

Two views

Here we give two views of a function. First is the function itself, which you can move around the same as before, and second is the function's derivative, which has a color swirl wherever the lines of the original function crossed each other. In the example above, we have a function with three zeroes, and their colors collide at two points in the middle. Initially you can even see the collision in the big central green patch as the points where the grid lines cross each other. As you move the zeroes around, the collision points and colors change as well.

Here's another one with five zeroes. A good thing to try is to try to move the zeroes of the derivative into places you want by dragging one of the function zeroes around. It's sometimes counterintuitive but it follows certain patterns, and with practice you'll get the pattern you want.

One important fact that you can see in these demos that you might remember from calculus is that the derivative of a polynomial always has degree one less than the original, which means the number of zeroes drops by one.


Everything gets more complicated when we allow infinities as well. Here's a function with three zeroes and one infinity:

Now we don't get a simple pattern where the number of zeroes drops by one. The points seem to invert themselves around the infinity.

But the degree still drops by one, if we define “degree” as the number of zeroes minus the number of poles. It might not look like it since the derivative still has three zeroes and one infinity, but if you look closely you'll see that the colors in the center of the derivative cycle twice -- it's a double infinity, just like you can form double zeroes in a regular polynomial by moving them on top of each other.

The poles of the derivative will always orbit near the poles of the original function, and the total degree will be one less. For a polynomial with no poles, that means there has to be fewer zeroes, since there's nowhere to put a pole. If there's a pole to start with, though, the zeroes don't have to drop, and in a simple function like this one they will be in the same place as the original one..

This one shows why the word “orbit” applies to the poles. This time the three poles split into five, and as you move them around they spin around each other like particles.

Source code

The source code for all the phase demos is all up on Github. It's not documented or supported, but it can build and run all the demos on this page if you want to see what other functions look like!