# Complex Analysis/Complex Functions/Complex Functions

A complex function is one that takes complex values and maps them onto complex numbers, which we write as $f:\mathbb{C}\to\mathbb{C}$. Unless explicitly stated, whenever the term function appears, we will mean a complex function. A function can also be multi-valued - for example, $z^{1/2}$ has two roots for every number. This notion will be explained in more detail in later chapters.

A plot of Abs(z²) as z ranges over the complex plane.

A complex function $f(z):\mathbb{C}\to\mathbb{C}$ will sometimes be written in the form $f(z)=f(x+iy)=u(x,y)+iv(x,y)$, where u and v are real-valued functions of two real variables. We can convert between this form and one expressed strictly in terms of z through the use of the following identities:

$x=\frac{z+\bar z}{2}, y=\frac{1}{i} \frac{z-\bar z}{2}$

While real functions can be graphed on the x-y plane, complex functions map from a two-dimensional to a two-dimensional space, so visualizing it would require four dimensions. Since this is impossible we will often use the three-dimensional plots of $\Re z$, $\Im z$, and |z| to gain an understanding of what the function "looks" like.

For an example of this, take the function $f(z)=z^2=(x^2-y^2)+i(2xy)$. The plot of the surface $|z^2|=x^2+y^2$ is shown to the right.

Another common way to visualize a complex function is to graph input-output regions. For instance, consider the same function $f(z) = z^2$ and the input region being the "quarter disc" $Q \cap \Bbb{D}$ obtained by taking the region

$Q = \{x + iy : x,y \ge 0 \}$ (i.e. $Q$ is the first quadrant)

and intersecting this with the disc $\Bbb{D}$ of radius 1 :

$\Bbb{D} = \{z : |z| \le 1\}$ .

If we imagine inputting every point of $Q \cap \Bbb{D}$ into $f$, marking the output point, and then graphing the set $f( Q \cap \Bbb{D} )$ of output points, the output region would be $UHP \cap \Bbb{D}$ where

$UHP = \{x + iy : y \ge 0 \}$ ($UHP$ is called the upper half plane).

So, the squaring function "rotationally stretches" the input region to produce the output region. This can be seen using the polar-coordinate representation of $\Bbb{C}$, $z = r cis(\theta)$. For example, if we consider points on the unit circle $S^1 = \{z : |z|=1\}$ (i.e. the set "$r = 1$") with $\theta \le \pi/2$ then the squaring function acts as follows:

$f(z) = [ 1 cis(\theta) ]^2 = cis( 2 \theta )$

(here we have used $cis( \theta ) cis( \phi ) = cis(\theta+\phi)$ ). We see that a point having angle $\theta$ is mapped to the point having angle $2 \theta$. If $\theta$ is small, meaning that the point is close to $z=1$, then this means the point doesn't move very far. As $\theta$ becomes larger, the difference between $\theta$ and $2 \theta$ becomes larger, meaning that the squaring function moves the point further. If $\theta = \pi/2$ (i.e. $z = i$) then $2 \theta = \pi$ (i.e. $z^2 = -1$).

Next