## Announcements:

Read Section 4.1 for Wednesday. Work through recommended homework questions.

Midterm 2: this Thursday evening, 7-8:30 pm. People with a conflict should already have let me know. Midterm 2 covers from Section 2.3 until the end of Chapter 3 (Wednesday), but builds on the earlier material as well. A practice exam is available from the course home page. Last name A-Q must write in NS1, R-Z in NS7. See the missed exam section of the course web page for policies, including for illness.

Tutorials: No quiz; focused on review.

Office hour: today, 1:30-2:30, MC103B.
Help Centers: Monday-Friday 2:30-6:30 in MC 106.

Extra Linear Algebra Review Session: Tuesday, Nov 5, 4:30-6:30pm, MC110.

Exercises for Appendix C are here, and there are solutions.

Tomorrow is the last day to drop a course without academic penalty.

## New Material: Appendix C: Complex numbers

Complex numbers will be used in Chapter 4, so we'll cover them now.

A complex number is a number of the form $a + bi$, where $a$ and $b$ are real numbers and $i$ is a symbol such that $i^2 = -1$.

If $z = a + bi$, we call $a$ the real part of $z$, written $\Re z$, and $b$ the imaginary part of $z$, written $\Im z$.

Complex numbers $a+bi$ and $c+di$ are equal if $a=c$ and $b=d$.

Whiteboard: sketch complex plane and various points.

Addition: $(a+bi)+(c+di) = (a+c) + (b+d)i$, like vector addition.

Multiplication: $(a+bi)(c+di) = (ac-bd) + (ad+bc)i$. (Explain.)

Examples: $(1+2i) + (3+4i) = 4+6i$ \begin{aligned} (1+2i)(3+4i) &= 1(3+4i)+2i(3+4i) = 3+4i+6i+8i^2 \\ &= (3 - 8) + 10 i = -5+10i \end{aligned} $$5(3+4i) = 15+20i$$ $$(-1)(c+di) = -c -di$$ The conjugate of $z = a+bi$ is $\bar{z} = a-bi$. Reflection in real axis. We'll use this for division of complex numbers in a moment.

Theorem (Properties of conjugates): Let $w$ and $z$ be complex numbers. Then:
1. $\bar{\bar{z}} = \query{z}$
2. $\overline{w+z} = \query{\bar{w} + \bar{z}}$
3. $\overline{w z} = \query{\bar{w} \bar{z}}$ (typo in text) (good exercise)
4. If $z \neq 0$, then $\overline{w/z} = \query{\bar{w} / \bar{z}}$ (see below for division)
5. $z$ is real if and only if $\bar{z} = \query{z}$.

The absolute value or modulus $|z|$ of $z = a+bi$ is $$\kern-4ex |z| = |a+bi| = \sqrt{a^2+b^2}, \qtext{the distance from the origin.}$$ Note that $$\kern-4ex z \bar{z} = (a+bi)(a-bi) = a^2 -abi+abi-b^2 i^2 = a^2 + b^2 = |z|^2$$ This means that for $z \neq 0$ $$\kern-4ex \frac{z \bar{z}}{|z|^2} = 1 \qtext{so} z^{-1} = \frac{\bar{z}}{|z|^2}$$ This can be used to compute quotients of complex numbers: $$\kern-4ex \frac{w}{z} = \frac{w}{z} \frac{\bar{z}}{\bar{z}} = \frac{w \bar{z}}{|z|^2}.$$ Example: $$\kern-8ex \frac{-1+2i}{3+4i} = \frac{-1+2i}{3+4i} \frac{3-4i}{3-4i} = \frac{5+10i}{3^2+4^2} = \frac{5+10i}{25} = \frac{1}{5} + \frac{2}{5}i$$

Theorem (Properties of absolute value): Let $w$ and $z$ be complex numbers. Then:
1. $|z| = 0$ if and only if $z = 0$.
2. $|\bar{z}| = |z|$
3. $|w z| = |w| |z|$  (good exercise!)
4. If $z \neq 0$, then $|w/z| = |w|/|z|$. In particular, $|1/z| = 1/|z|$.
5. $|w+z| \leq |w| + |z|$.

### Polar Form

A complex number $z = a + bi$ can also be expressed in polar coordinates $(r, \theta)$, where $r = |z| \geq 0$ and $\theta$ is such that $$a = r \cos \theta \qqtext{and} b = r \sin \theta \qqtext{(sketch)}$$ Then $$z = r \cos \theta + (r \sin \theta) i = r(\cos \theta + i \sin \theta)$$ To compute $\theta$, note that $$\tan \theta = \sin\theta/\cos\theta = b/a .$$ But this doesn't pin down $\theta$, since $\tan(\theta+\pi) = \tan\theta$. You must choose $\theta$ based on what quadrant $z$ is in. There is a unique correct $\theta$ with $-\pi < \theta \leq \pi$, and this is called the principal argument of $z$ and is written $\Arg z$ (or $\arg z$).

Examples: If $z = 1 + i$, then $r = |z| = \sqrt{1^2+1^2} = \sqrt{2}$. By inspection, $\theta = \pi/4 = 45^\circ$. We also know that $\tan \theta = 1/1 = 1$, which gives $\theta = \pi/4 + k \pi$, and $k = 0$ gives the right quadrant.

We write $\Arg z = \pi/4$ and $z = \sqrt{2}(\cos \pi/4 + i \sin \pi/4)$.

If $w = -1 - i$, then $r = \sqrt{2}$ and by inspection $\theta = -3\pi/4 = -135^\circ$. We still have $\tan \theta = -1/-1 = 1$, which gives $\theta = \pi/4 + k \pi$, but now we must take $k$ odd to land in the right quadrant. Taking $k=-1$ gives the principal argument: $$\Arg w = -3\pi/4 \qtext{and} w = \sqrt{2}(\cos (-3\pi/4) + i \sin (-3\pi/4)).$$

### Multiplication and division in polar form

Let $$z_1 = r_1(\cos \theta_1 + i \sin\theta_1) \qtext{and} z_2 = r_2(\cos \theta_2 + i \sin\theta_2) .$$ Then \begin{aligned} z_1 z_2 &= r_1 r_2 (\cos \theta_1 + i \sin\theta_1) (\cos \theta_2 + i \sin\theta_2) \\ &= r_1 r_2 [(\cos \theta_1 \cos\theta_2 - \sin\theta_1\sin\theta_2) + i(\sin\theta_1 \cos\theta_2 + \cos\theta_1\sin\theta_2)] \\ &= r_1 r_2 [\cos(\theta_1 + \theta_2) +i \sin(\theta_1+\theta_2)] \end{aligned} So $$\kern-6ex |z_1 z_2| = |z_1| |z_2| \qtext{and} \Arg(z_1 z_2) = \Arg z_1 + \Arg z_2 \qtext{(up to multiples of 2\pi)}$$ Sketch on whiteboard. See also Example C.4.

Repeating this argument gives:

Theorem (De Moivre's Theorem): If $z = r(\cos\theta+i\sin\theta)$ and $n$ is a positive integer, then $$z^n = r^n (\cos(n\theta) + i \sin(n\theta))$$ When $r \neq 0$, this also holds for $n$ negative. In particular, $$\frac{1}{z} = \frac{1}{r} (\cos\theta - i\sin\theta).$$

Example C.5: Find $(1+i)^6$.

Solution: We saw that $1+i = \sqrt{2}(\cos(\pi/4)+i\sin(\pi/4))$. So \begin{aligned} (1+i)^6 &= (\sqrt{2})^6 (\cos(6\pi/4)+i\sin(6\pi/4)) \\ &= 8 (\cos(3\pi/2) + i\sin(3\pi/2)) \\ &= 8 (0 + i(-1)) = -8i \end{aligned}

### $n$th roots

De Moivre's Theorem also lets us compute $n$th roots:

Theorem: Let $z = r(\cos\theta + i\sin\theta)$ and let $n$ be a positive integer. Then $z$ has exactly $n$ distinct $n$th roots, given by $$r^{1/n} \left[ \cos\left(\frac{\theta+2k\pi}{n}\right) + i\sin\left(\frac{\theta+2k\pi}{n}\right) \right]$$ for $k = 0, 1, \ldots, n-1$.

These are equally spaced points on the circle of radius $r^{1/n}$.

Example: The cube roots of $-8$: Since $-8 = 8(\cos(\pi)+i\sin(\pi))$, we have $$(-8)^{1/3} = 8^{1/3} \left[ \cos\left(\frac{\pi+2k\pi}{3}\right) + i\sin\left(\frac{\pi+2k\pi}{3}\right) \right]$$ for $k = 0, 1, 2$. We get $$2 ( \cos(\pi/3)+i\sin(\pi/3) ) = 2(1/2 + i \sqrt{3}/2) = 1 + \sqrt{3} i$$ $$2 ( \cos(3\pi/3)+i\sin(3\pi/3) ) = 2(-1 + 0 i ) = -2$$ $$2 ( \cos(5\pi/3)+i\sin(5\pi/3) ) = 2(1/2 - i \sqrt{3}/2) = 1 - \sqrt{3} i$$

### Euler's formula

Using some Calculus, one can prove:

Theorem (Euler's formula): For any real number $x$, $$e^{ix} = \cos x + i \sin x$$

Thus $e^{ix}$ is a complex number on the unit circle. This is most often used as a shorthand: $$z = r (\cos\theta + i\sin\theta) = re^{i\theta}$$ It also leads to one of the most remarkable formulas in mathematics, which combines 5 of the most important numbers: $$e^{i \pi} + 1 = 0$$