---
title: Complex functions as maps
heading: Seeing a function of a complex variable
eyebrow: A12 · Lesson 1 · Complex functions as maps
xp: 40
---

::: hook
A function of a real variable can be drawn as a curve. A function of a complex variable can't: it takes a point of a plane to a point of another plane, and four dimensions don't fit on paper. The way to see one is as a **map**: draw some lines and circles in the z-plane and see where the function sends them. $w = z^2$ squares distances and doubles angles; $w = 1/z$ turns the plane inside out; $w = e^z$ wraps a strip around the origin. Engineers met this long before calling it complex analysis: the Smith chart (C10) is the map $\Gamma = (z - 1)/(z + 1)$ drawn as a chart, and the same idea solves field problems that are hopeless in their original shape.
:::

::: play
- The dashed lines are in the z-plane: a horizontal line at height c, a vertical line at distance c, and a circle of radius r. The solid curves are their images under $w = z^2$, in the same colors.
- Move c: the straight lines map to parabolas, opening left and right. They cross at right angles, just as the lines did.
- Move r: the circle's image is a circle of radius $r^2$, traced twice around, because squaring doubles every angle. The dot z and its image $z^2$ show one point's journey.
:::
:::

```sim plot
view: complex
range: 5
slider: c = 0.1..1.5 step 0.05 = 0.6
slider: r = 0.3..2 step 0.05 = 1.2
curve: u + j*c | over: u = -2..2 | dashed | color: ch2
curve: (u + j*c)^2 | over: u = -2..2 | color: ch2
curve: c + j*u | over: u = -2..2 | dashed | color: ch3
curve: (c + j*u)^2 | over: u = -2..2 | color: ch3
curve: r*exp(j*u) | over: u = 0..2*pi | dashed
curve: r^2*exp(j*2*u) | over: u = 0..pi
dot: c + j*c | label: z
dot: (c + j*c)^2 | label: z²
readout: |z| = abs(c + j*c)
readout: |z²| = abs((c + j*c)^2)
```

::: predict
## Under $w = z^2$, where does the point $z = 1 + j$ go?

- [ ] $1 + j$
- [ ] $2$
- [x] $2j$
- [ ] $1 - j$

::: reveal
$2j$: $(1 + j)^2 = 1 + 2j + j^2 = 2j$. In polar form, $1 + j$ has length $\sqrt2$ and angle 45°; squaring gives length 2 and angle 90°, which is $2j$.
:::
:::

::: nameit
## A function as two real functions

Write $z = x + jy$ and $w = f(z) = u + jv$. Then u and v are real functions of x and y:

$$f(z) = u(x, y) + j\,v(x, y)$$

For $f(z) = z^2$: $u = x^2 - y^2$, $v = 2xy$.

## Some maps

| f(z) | What it does |
|---|---|
| $z + b$ | shifts by b |
| $az$ | rotates by $\arg a$ and scales by $\lvert a\rvert$ |
| $z^n$ | raises $\lvert z\rvert$ to the nth power and multiplies the angle by n |
| $1/z$ | inverts: $\lvert w\rvert = 1/\lvert z\rvert$, $\arg w = -\arg z$ |
| $e^z$ | $\lvert w\rvert = e^x$, $\arg w = y$: a horizontal strip of height 2π covers the whole plane except 0 |
| $(az + b)/(cz + d)$ | a **Möbius transformation**: sends circles and lines to circles and lines |

The Smith chart is the Möbius map $\Gamma = (z - 1)/(z + 1)$ from normalized impedance to reflection coefficient: it sends the right half-plane (every passive impedance) into the unit disk.

## Angles

In the play, the images of two lines that cross at right angles also cross at right angles. Maps given by a differentiable complex function (lesson 2) preserve the angles between curves wherever the derivative isn't zero: they're **conformal**, the property lesson 24 uses to solve field problems.
:::

::: example
## Find u and v for $f(z) = z^2$, and the image of the vertical line $x = c$.

::: solution
1. **Expand the square.**
   $$(x + jy)^2 = x^2 - y^2 + 2jxy$$
   so $u = x^2 - y^2$ and $v = 2xy$.
2. **Put in the line.** On $x = c$:
   $$\begin{aligned} u &= c^2 - y^2 \\ v &= 2cy \end{aligned}$$
3. **Eliminate y.** Substitute $y = v/(2c)$:
   $$u = c^2 - \frac{v^2}{4c^2}$$
   a parabola opening to the left, with its tip at $u = c^2$.

**Answer:** $u = x^2 - y^2$ and $v = 2xy$, and the line $x = c$ maps to the parabola $u = c^2 - v^2/(4c^2)$, opening to the left with its tip at $u = c^2$.
:::
:::

::: example
## Where does the Smith chart's map send $z = 1$, $z = 0$ and $z = j$?

::: solution
1. **The load z = 1.**
   $$\begin{aligned} \Gamma(1) &= \frac{0}{2} \\ &= 0 \end{aligned}$$
   A matched load sits at the center.
2. **The load z = 0.**
   $$\Gamma(0) = -1$$
   A short, at the left edge.
3. **The load z = j.**
   $$\begin{aligned} \Gamma(j) &= \frac{j - 1}{j + 1} \\ &= j \end{aligned}$$
   A pure reactance lands on the unit circle, as every lossless load does.

**Answer:** $z = 1$ goes to the center, $\Gamma = 0$; $z = 0$ goes to $\Gamma = -1$ at the left edge; and $z = j$ goes to $\Gamma = j$ on the unit circle.
:::
:::

::: example
## Where does $w = 1/z$ send the vertical line $\text{Re}\,z = \frac12$? (If z is an impedance with a resistance of ½ Ω, w is its admittance.)

::: solution
1. **Multiply by the conjugate.** Write $z = \frac12 + jy$:
   $$w = \frac{\frac12 - jy}{\frac14 + y^2}$$
   so $u = \frac{1/2}{1/4 + y^2}$ and $v = \frac{-y}{1/4 + y^2}$.
2. **Find the curve.**
   $$\begin{aligned} u^2 + v^2 &= \frac{1}{1/4 + y^2} \\ &= 2u \end{aligned}$$
   which rearranges to
   $$(u - 1)^2 + v^2 = 1$$
   a circle of radius 1 centered at $w = 1$.
3. **Spot checks.** $z = \frac12$ goes to $w = 2$; $z = \frac12 + \frac12j$ goes to $1 - j$; $z = \frac12 - \frac12j$ goes to $1 + j$. All three are on the circle, and as $y \to \pm\infty$, w closes in on the origin.
4. **What it means for the Smith chart.** A line of constant resistance becomes a circle of admittances through 0. This is why constant-resistance curves on a Smith chart are circles.

**Answer:** the line goes to the circle $(u - 1)^2 + v^2 = 1$, of radius 1 centered at $w = 1$, which passes through the origin.
:::
:::

::: check
given: a = 1 | 2 | -3; b = 1 | 3 | -2
answer: a^2 - b^2
tolerance: 0

## What's the real part of $z^2$ for $z = \given{a} + \given{b}j$?

::: right
Right. $u = x^2 - y^2$ = {answer}.
:::

::: misses
- [a^2 + b^2] That's $\lvert z\rvert^2$; $j^2 = -1$ makes the $y^2$ term negative.
- [any] Not yet. $(x + jy)^2 = x^2 - y^2 + 2jxy$.
:::
:::

::: check
given: a = 1 | 2 | -3; b = 1 | 3 | -2
answer: 2*a*b
tolerance: 0

## What's the imaginary part of $z^2$ for $z = \given{a} + \given{b}j$?

::: right
Right. $v = 2xy$ = {answer}.
:::

::: misses
- [a*b] Twice the product: $2xy$.
- [any] Not yet. $v = 2xy$.
:::
:::

::: check
given: r = 0.5 | 1.5 | 3; n = 2 | 3 | 4
answer: r^n
tolerance: 0.5%

## A point on the circle $\lvert z\rvert = \given{r}$ is mapped by $w = z^{\given{n}}$. How far from the origin is its image?

::: right
Right. $r^n$ = {answer}.
:::

::: misses
- [n*r] Powers raise the distance to the nth power; it's the angle that's multiplied.
- [any] Not yet. $\lvert z^n\rvert = \lvert z\rvert^n$.
:::
:::

::: check
given: t = 20 | 35 | 50; n = 2 | 3
answer: n*t
unit: °
tolerance: 0.5%

## A point at angle {t}° is mapped by $w = z^{\given{n}}$. At what angle is its image?

::: right
Right. {answer}°.
:::

::: misses
- [t^n] Angles multiply by n; they aren't raised to the power.
- [any] Not yet. $\arg z^n = n\arg z$.
:::
:::

::: check
given: x = 0.5 | 1.2 | 2; y = 0.5 | 1 | 3
answer: exp(x)
tolerance: 0.5%

## How far from the origin is $e^z$ for $z = \given{x} + \given{y}j$?

::: right
Right. $\lvert e^z\rvert = e^x$ = {answer}; y only sets the angle.
:::

::: misses
- [exp(abs(x + j*y))] Only the real part sets the size: $e^{x + jy} = e^x e^{jy}$.
- [any] Not yet. $\lvert e^{x+jy}\rvert = e^x$.
:::
:::

::: check
given: R = 0.25 | 0.5 | 2 | 3
answer: (R - 1)/(R + 1)
tolerance: 0.5%

## The Smith chart maps a normalized impedance z to $\Gamma = (z - 1)/(z + 1)$. Where does the real impedance $z = \given{R}$ land?

::: right
Right. Γ = {answer}, on the real axis.
:::

::: misses
- [(R + 1)/(R - 1)] Upside down: $(z - 1)/(z + 1)$.
- [any] Not yet. $(z - 1)/(z + 1)$.
:::
:::

::: check
kind: choice

## What does $w = 1/z$ do to the unit circle $\lvert z\rvert = 1$?

- [ ] Sends it to the origin
- [x] Sends it to itself, each point to its mirror image across the real axis
- [ ] Sends it to a line
- [ ] Doubles its radius

::: misses
- [1] Only $z = \infty$ goes to 0.
- [3] $\lvert 1/z\rvert = 1$ there, so it stays a circle of radius 1.
- [4] The radius stays $1/1 = 1$.
:::
:::

::: check
kind: parts
given: a = 1 | 2 | 3; b = 1 | 2 | 4

## The map $w = 1/z$ acts on $z = \given{a} + \given{b}j$.

::: part
answer: a/(a^2 + b^2)
tolerance: 0.5%

### What is the real part of w?

::: misses
- [1/a] Only the whole number can be inverted; multiply top and bottom by $\bar z$.
- [any] $\frac{1}{z} = \frac{\bar z}{\lvert z\rvert^2}$.
:::
:::

::: part
answer: -b/(a^2 + b^2)
tolerance: 0.5%

### What is its imaginary part?

::: misses
- [b/(a^2 + b^2)] The conjugate flips the sign.
- [any] $\frac{-b}{a^2 + b^2}$.
:::
:::
:::

::: check
kind: derivation
vars: x = -3..3, y = -3..3

## Write $w = z^3$ in terms of $z = x + jy$.

::: step
answer: x^3 - 3*x*y^2

### What is u, the real part?
:::

::: step
answer: 3*x^2*y - y^3

### What is v, the imaginary part?
:::

::: right
Right. $(x + jy)^3 = x^3 + 3x^2(jy) + 3x(jy)^2 + (jy)^3$, and $j^2 = -1$, $j^3 = -j$ sort the terms into real and imaginary.
:::
:::

::: explain
## Why can a function of a complex variable be pictured as a map between two planes, but not as an ordinary graph?

::: model
A graph plots an output against its input on perpendicular axes, which needs one dimension for each. A complex input is a point of a plane (two real numbers) and so is the output, so a graph would need four dimensions. Instead, we draw the input plane and the output plane side by side, or on the same axes, and show where the function sends chosen curves: lines, circles, a grid. How those curves bend, stretch and rotate shows what the function does, and properties like preserving angles show up directly as curves still crossing at the same angles.
:::
:::

::: practice

::: check
given: a = 2 | -1; b = 1 | 4
answer: a^2 - b^2
tolerance: 0

## Real part of $(\given{a} + \given{b}j)^2$?

::: misses
- [any] $x^2 - y^2$.
:::
:::

::: check
given: r = 1.5 | 4; n = 2 | 3
answer: r^n
tolerance: 0.5%

## $\lvert z^{\given{n}}\rvert$ for $\lvert z\rvert = \given{r}$?

::: misses
- [any] $r^n$.
:::
:::

::: check
given: R = 0.1 | 0.2 | 0.25 | 0.5 | 2 | 4 | 5 | 10
answer: (R - 1)/(R + 1)
tolerance: 0.5%

## Γ for $z = \given{R}$?

::: misses
- [any] $(z - 1)/(z + 1)$.
:::
:::
:::
