A square root of −1
No real number squares to a negative number: for every real . So has no real solution, and has no real value (lesson 1.1.1).
We add one new number, , defined by . It is called the imaginary unit. With it, every negative number has square roots: , since .
Rule: Square roots of negative numbers
as well, so has two square roots, and . means the one with a plus sign, just as means 3, not .
A complex number is , where and are real numbers. is the real part and the imaginary part. For the real part is 3 and the imaginary part is , a real number, not .
Two kinds of number sit inside this. With , is just the real number , so every real number is complex. With , the number is called purely imaginary.
The complex plane
A complex number has two parts, so it needs two coordinates. Draw as the point : real part across, imaginary part up.
This is the complex plane. Its horizontal axis holds the real numbers and its vertical axis the purely imaginary ones.
Adding and subtracting work part by part, as for coordinates: , and . In the plane, adding moves a point 3 across and 2 down.
Rule: Adding and subtracting
Add the real parts, and add the imaginary parts. Subtracting takes each part away in the same way.
The conjugate of is , read "z bar". It has the same real part and the opposite imaginary part. In the plane it is the mirror image of in the real axis.
The modulus is the distance from 0 to the point , by Pythagoras' theorem (lesson 1.7.1). For a real number it is the absolute value of lesson 0.3.3: . It is never negative, and only 0 has modulus 0.
Rule: Conjugate and modulus
The conjugate mirrors in the real axis. The modulus is its distance from 0.
The modulus of is , and its conjugate is its mirror image. Adding two complex numbers moves one point by the steps of the other.
For : and . Adding a number to its conjugate cancels the imaginary parts: , twice the real part.
Try it
Python writes as j, straight after a number: 4 + 3j, or 1j for itself.
z.real and z.imag give the two parts, as decimals. z.conjugate() gives the conjugate and abs(z) the modulus.
Multiplying
Multiply out the brackets as for , then replace by .
Example 1. Multiply .
The became , which joined the real part. Doing the same with letters gives a rule for every product.
Rule: Multiplying
The comes from . A real number times just scales both parts: .
Powers of , and the quarter turn
Multiplying by again and again gives a table that repeats.
| power | ||||||||
|---|---|---|---|---|---|---|---|---|
| value | 1 | 1 |
Algebra shows why: , and . After every fourth power you are back at 1, so only the remainder after dividing the power by 4 matters. For example .
Multiplying any number by gives . The point moves to : a quarter turn anticlockwise about 0. So , and three more quarter turns lead back to .
Each multiplication by turns a point a quarter turn about 0 and keeps its distance from 0. Four turns bring it back, which is why .
Try it
The first line checks Example 1.
The loop multiplies by 1j eight times and prints the table. -0 is a zero that Python reached from the negative side; read it as 0. The last loop shows the four quarter turns of .
Dividing
Division rests on one product. Multiplying out, . So a number times its conjugate is real and never negative.
Rule: A number times its conjugate
The imaginary parts cancel. For , , which is .
To divide by , multiply the top and the bottom by its conjugate . The bottom becomes the real number , and dividing by a real number divides both parts.
Rule: Dividing
Use the conjugate of the bottom, not of the top. The bottom is 0 only when , and dividing by 0 is still impossible.
Example 2. Divide by . The top becomes , and the bottom .
Multiplying back checks it: .
A special case: , because . Dividing by is a quarter turn clockwise.
Try it
The first line multiplies by its conjugate. It prints (25+0j): a complex number whose imaginary part is 0.
Python divides complex numbers with /. The cell then checks Example 2, multiplies back, and works out .
Complex roots of a quadratic
Lesson 1.2.2 stopped at a negative discriminant: no real roots, because the formula needs the square root of a negative number. With the quadratic formula works anyway.
Example 3. Solve . The discriminant is , and . So
Putting back in checks it. , and . Then .
Rule: Negative discriminant
The two roots are conjugates of each other. Their real part, , is the axis of symmetry from lesson 1.2.2.
For a quadratic with real , and , complex roots always come as such a conjugate pair. That is what np.roots showed in lesson 1.3.1: has the real root 2 and the pair .
Try it
math.sqrt(-16) stops with an error, because math works only with real numbers. Its complex twin, cmath, returns 4j.
The cell then puts back into the quadratic, which gives 0, and lets np.roots find both roots.
Lesson 1.7.3 describes each complex number by its distance and its angle instead. That makes multiplying, and the quarter turn above, much simpler to see.
Common mistakes
- The imaginary part is a real number. For it is , not .
- is , so is . Replace every after multiplying out: is , not .
- Python's
jgoes straight after a number:1j, notj. On its own,jis a variable name. - The modulus squares both parts. , not . And is also 5: the squares remove the signs.
- To divide, use the conjugate of the bottom. Multiplying by the conjugate of the top leaves a complex number underneath.
- fails for negative numbers. , but . Take the out first.
- A negative discriminant does not mean "no roots". It means no real roots, and two complex ones, conjugates of each other.
Complex numbers
0 of 12 correct
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
How to type answers
- Powers with
^:x^7,2^(1/3),a^-2. - Multiply with
*or by writing side by side:3x^2,2(x+1). ln(x)is the natural log,log(x, 2)is log base 2,eis Euler's number,sqrt(x)is a square root.sin(x),cos(x)andtan(x)take radians; writepifor π andsin(x)^2for sin²x.- Your first answer to each question is saved: it counts towards your score and brings the question back for review.
- Exact answers like
ln(20)/ln(3)are best. Decimals need about 4 significant figures.
Summary card
- , and for . A complex number is , with real part and imaginary part , both real.
- In the complex plane is the point . Adding and subtracting work part by part.
- The conjugate mirrors in the real axis; the modulus is its distance from 0.
- Multiply out and replace by : . Powers of repeat every 4, and multiplying by is a quarter turn.
- . To divide, multiply top and bottom by the conjugate of the bottom.
- A quadratic with a negative discriminant has two complex roots, , conjugates of each other.
- In Python:
2 + 3j,abs(z),z.conjugate(),z.real,z.imag, andcmath.sqrtfor square roots of negatives.