Mathematics in the complex plane are sometimes surprisingly difficult to understand! Well, the complex numbers definitely earned their name! Maybe you’re also studying complex analysis, or have studied it in the past and didn’t quite understand it. The fact is, it requires a lot of imagination to see the concepts.

I sometimes like to compensate for my lack of imagination by writing an app that visualizes the things I wanna see. This one, I would like to share with others, so I wrote it in Javascript. You can have a look at it ** here**.

It’s basically a way to visualize how a given variable **z** maps into a function **f(z)**. If **f(z)** is multi-valued (like, for example if **f(z)=sqrt(z)**), then the complex map “compresses” the entire **z** plane in a fraction of the **f(z)** plane. In the example **f(z)=sqrt(z)**, as you probably already learned, this fraction is 1/2 (since the exponent is 1/2). The function **f(z)=sqrt(z)** is then said to have two branches. Functions that have this behavior will have a **branch point**, which is this point where as you go along 360º in a small circle around it, the function **f(z)** does not make a 360º arc. The function f(z) then becomes discontinuous, “it branches”. The discontinuity is actually along a curve that starts at the branch point, and this curve is called “a branch cut”. The branch cut, however, can be any curve starting at any angle. It just needs to start at the branch point.

The mind-numbing part starts to happen when the argument of the multi-valued function (for example, **sqrt(z) **and **log(z)** are the most commonly seen functions in math) is another function. Then, the branch points lie at the roots of the argument. If there are multiple complex roots, each one of them will be a branch point, from which a branch cut has to be made. Determining one of the branch cut curves, however, determines all of the remainder branch cuts.

Let this settle a bit. Let’s say you place a cut in the target function **f(z)** around the branch point as a line at an angle ϑ. **z** in polar form can be written as **z=R exp(iα)**. The reason why branches occur in a complex function is because **f(R exp(iα))≠f(R exp(iα+2πi))** , even though **z=R exp(iα)**=** R exp(iα+2πi)** (i.e., as you go around a full rotation, the point in the complex

**z**plane is the same. But

**f(R exp(iα))**is uniquely defined. This means that the function

**f(z)**itself determines how much angular displacement one full rotation about a branch point in

**z**incurs in the

**f(z)**plane. Therefore, defining the branch cut line automatically defines the region of

**f(z)**that is available in the mapping

**z->f(z)**, which is “the branch” of

**f(z)**.

The app I developed computes that, for simple functions like sqrt(z+5). However, it is not general. It assumes that the branch cut starts at (0,0) in the **f(z)** plane. If the branch cut has to start at a different coordinate (say, for f(z)=sqrt(z)+1 it would have to start at (1,0) ), then the app mapping does not work correctly. It, nevertheless, gives some insight (in my opinion). Especially for a student! If you wanna develop it further, let me know!!

## An example

Consider the function **f(z)=sqrt(z^2-4)**. This function has two branch points, i.e., where the argument of sqrt() is zero. These points are the roots of z^2-4, which are +2 and -2. The square root function maps the full **z** plane to a half plane, which is why in the app it appears like this:

On the right-half, we see the **f(z)** plane. The color represents the angle, i.e., **arg(f(z))**. We see the upper half plane in vivid colors, whereas the lower half is ‘dull’. The upper half is the current branch. The branch cut is defined, interactively, by the white solid line. The other branch cut line is, as discussed, automatically defined in the dashed line by the half-plane mapping the square root function gives. This upper-half plane branch cut, shown in the **z** plane, looks like two lines spanning out from the branch points (+2 and -2). They appear in the left-hand figure as a discontinuity in the color (which represents the angle of **f(z)**).

The cool thing is that, by dragging the little black dot in the right hand figure, we can move the branch cut interactively. Here’s a video of what happens if we go around the circle:

And another one going though other random functions:

I hope this helps you as much as it helped me understand these concepts! It’s actually quite cool once you visualize it!