Complex Numbers and Their Algebra: Quick Revision | StemPy Lab
Mathematics
Complex Numbers and Their Algebra: Quick Revision
A brief note on Complex Numbers and Their Algebra: the number i, the form a+ib and equality, adding, subtracting and multiplying, the inverse and division, and the powers of i. With a worked example, practice, a program and questions to check yourself.
A brief note on Complex Numbers and Their Algebra. Read it before a test. Try each question at the end before you open its answer.
The number i
No real number squares to a negative number. So we bring in i, with i2=−1.
For a>0, −a=ai. So −25=5i.
A complex number is z=a+ib: the real part is a, the imaginary part is b. Both are real numbers.
a+ib=c+id means a=c and b=d: one equation gives two.
Complex numbers cannot be put in order. In Python, i is written 1j.
Adding, subtracting and multiplying
Add and take away part by part:
(a+ib)±(c+id)=(a±c)+i(b±d)
Multiply out and put −1 for i2:
(a+ib)(c+id)=(ac−bd)+i(ad+bc)
The closure, commutative, associative and distributive laws hold. The identities are 0 and 1.
Every algebraic identity still works, and x2+1=(x+i)(x−i).
The inverse and division
For a+ib=0:
a+ib1=a2+b2a−ib
To divide, multiply the top and the bottom by the bottom with the sign of i changed.
The powers of i
i1=i, i2=−1, i3=−i, i4=1, and the cycle repeats.
in=ir, where r is the remainder of n on division by 4. This works for negative n too.
Four powers in a row add up to 0.
ab=ab fails when a and b are both negative: write each root with i first.
A worked example
Find the real numbers x and y for which (x+iy)(1+2i)=7+4i.
Divide.x+iy=1+2i7+4i.
Multiply the top and the bottom by 1−2i. The bottom is 1+4=5. The top is 7−14i+4i−8i2=15−10i.
Simplify.x+iy=515−10i=3−2i, so x=3 and y=−2.
Check: (3−2i)(1+2i)=3+6i−2i−4i2=7+4i.
Practice with new numbers
A program to try
The program checks the rules of this note against Python's own arithmetic: the rule for a product, the rule for a quotient, and the cycle of the powers of i.
Mistakes to avoid
Keeping i in the imaginary part. In 2−9i the imaginary part is −9.
Leaving i2 in an answer. Always replace i2 with −1.
Dividing part by part. Multiply the top and the bottom by the bottom with the sign of i changed.
Two negative roots under one sign.−5−20=−10, not 10.
Writing i in Python. Python needs j, as in 2 + 3j.
Check yourself
Write −50 as a multiple of i, in its simplest form.