discrete mathematics i - complex numberscompalg.inf.elte.hu/~vatai/dm1en-org/part1_complex/... ·...
TRANSCRIPT
Discrete mathematics I - Complex numbers
Discrete mathematics I - Complex numbers
Emil Vatai <[email protected]>(based on hungarian slides by László Mérai)1
January 31, 2018
1Financed from the financial support ELTE won from the Higher EducationRestructuring Fund of the Hungarian Government.
Discrete mathematics I - Complex numbersComplex numbers
Introduction and historical background
Cubic equation
Solving the cubic equationFor a 6= 0, we are looking for the solution ofax3 + bx2 + cx + d = 0 By dividing with a we obtain a monicpolynomial on the lhs:
x3 + b′x2 + c ′x + d ′ = 0 (1)
Reminder: Solving x2 + px + q = 0With the substitution x = y − p
2 we get y2 + q′ = 0. From this wecan easily obtain the solution by rearranging and taking the squareroots. By substituting x = y − b/3 into (1)
y3 + py + q = 0 (2)
Discrete mathematics I - Complex numbersComplex numbers
Introduction and historical background
Solving y 3 + py + q = 0
Idea: try to find the solution in a y = u + v form!By rearranging (u + v)3 = u3 + 3u2v + 3uv2 + v3 we obtain(u + v)3 −3uv(u + v) −(u3 + v3) = 0
y3 +py +q = 0Our goal: find u, v for which −3uv = p, −(u3 + v3) = q. Theny = u + v will be a solution!
Finding u, vu3v3 = (−p
3 )3 and u3 + v3 = −q, u3, v3 will be the roots of thequadratic equation z2 + qz + (−p
3 )3 = 0. Taking the cubic root ofthe solutions of the previous equation:
y = 3
√√√√−q2 +
√(q2
)2+(p3
)3+ 3
√√√√−q2 −
√(q2
)2+(p3
)3(3)
Discrete mathematics I - Complex numbersComplex numbers
Introduction and historical background
Example: solve y 3 − 21y + 20 = 0
It is pretty obvious that y = 1 is a solution.
Using the formulaSubstitution p = −21, q = 20 into (3)
x = 3
√√√√−q2 +
√(q2
)2+(p3
)3+ 3
√√√√−q2 −
√(q2
)2+(p3
)3
x = 3√−10 +
√−243 + 3
√−10−
√−243
We have negative −243 under the square root! Can we continueusing the formula like this?
Discrete mathematics I - Complex numbersComplex numbers
Introduction and historical background
Calculating x = 3√−10 +
√−243 + 3
√−10−
√−243
Let’s (formally) allow (√−3)2 = −3:
(2 +√−3)3 = 23 + 3 · 22 ·
√−3 + 3 · 2(
√−3)2 + (
√−3)3
= −10 + 9√−3 = −10 +
√−243
So −10 +√−243 = (2 +
√−3)3 and similarly
−10−√−243 = (2−
√−3)3
The solution is: x = (2 +√−3) + (2−
√−3) = 4.
I Is this formal calculation with√−3 allowed?
I Why do we calculate the value of −10 +√−243 like this?
I There was a solution y = 1, what happened to it?I Is there a third root? (There should be!)
Discrete mathematics I - Complex numbersComplex numbers
Introduction and historical background
Number sets
Natural numbers: N = {0, 1, 2, . . . }There is no x ∈ N such that: x + 2 = 1 i.e. x + 2 = 1 has nosolution because subtraction is not (always) defined in N!
Integers: Z = {. . . ,−2,−1, 0, 1, 2, . . . }Now we have subtraction (x = −1), but x · 2 = 1 has no solutionbecause division is not (always) defined in Z!
Rational numbers: Q ={
pq : p, q ∈ Z, q 6= 0
}Now we have division (x = 1
2), but x2 = 2 has no solution because
square root is not (always) defined in Q!
Real numbers: RNow we have square root (and a irrational numbers), but x2 = −1has no solution, because the square root of negative numbers is(never) defined!
Discrete mathematics I - Complex numbersComplex numbers
Introduction and historical background
x 2 = −1 can be solved in the set of complex numbers
Application of complex numbersI CS: Computer graphics, geometryI Math: geometry, solving equationsI Physics: quantum mechanics, relativity theory etc.
Introduction of complex numbers (informal definition)Let i be the solution of x2 = −1. We do our calculations as if iwas a variable, substituting i2 = −1. For example:
(1 + i)2 = 1 + 2i + i2 = 1 + 2i + (−1) = 2i .
More generally:
(a + bi)(c + di) = ac − bd + (ad + bc)i (4)
Discrete mathematics I - Complex numbersComplex numbers
Complex numbers
Definition of complex numbers
Definition (The set of complex numbers)The C is the set of complex numbers, where if z ∈ C, then z is anexpression a + bi with a, b ∈ R. This is the rectangular (orCartesian or algebraic) form of z . Re(z) = a is the real part andIm(z) = b is the imaginary part of z . Important warning:Im(z) 6= bi!
Graphical representation
|z |a = Re(z)
b = Im(z)
z = a + bi
Discrete mathematics I - Complex numbersComplex numbers
Complex numbers
Opertaions on complex numbers
Definition (Operations on C)
I Addition: (a + bi) + (c + di) = a + c + (b + d)i .I Multiplication: (a + bi)(c + di) = ac − bd + (ad + bc)i .I Equality: complex numbers are equal if both their real and
imaginary parts are equal i.e. a + bi = c + di if a = c andb = d!
Remarks: let z = a + bi (with a, b ∈ R).
I If b = 0 then z is a real number.I If a = 0 then z is a pure imaginary number.
Discrete mathematics I - Complex numbersComplex numbers
Complex numbers
Alternative (more formal definition) of C
Definition (Complex numbers as ordered pairs)Let C = R× R (Cartesian product), (a, b), (c, d) ∈ C
I Addition: (a, b) + (c, d) = (a + c, d + b);I Multiplication: (a, b) · (c, d) = (ac − bd , ad + bc).
The two definitions are equivalent with i = 0 + 1 · i ≡ (0, 1).a + bi is more convenient when calculating with pencil and paper,(a, b) is used in computer programs.
Theorem (Fundamental theorem of algebra NP)If 0 < n ∈ N,a0, . . . , an ∈ C, where an 6= 0, then for everyexpression a0 + a1x + a2x2 + . . .+ anxn there is a complex numberz ∈ C, such that a0 + a1z + a2z2 + . . .+ anzn = 0.
Discrete mathematics I - Complex numbersComplex numbers
Complex numbers
Calculation with complex numbers: absolute value
Definition (Additive inverse)In general, y is the additive inverse of x if x + y = 0. For r ∈ Rthe additive inverse is −r .
Theorem (Additive inverse)The additive inverse of z = a + bi ∈ C is −z = −a − bi ∈ C.
Definition (Absolute value)The absolute value of the z = a + bi ∈ C complex number inrectangular form is |z | = |a + bi | =
√a2 + b2
For real numbers: |a| = |a + 0i | =√a2 + 02 =
√a2
Theorem (Statement)If z ∈ C, then |z | ≥ 0, and |z | = 0⇔ z = 0
Discrete mathematics I - Complex numbersComplex numbers
Complex numbers
Calculation with complex numbers: reciprocal
Definition (Reciprocal, multiplicative inverse)y is the reciprocal (or multiplicative inverse) of x if x · y = 1. Forr ∈ R \ {0} the reciprocal is 1/r sometimes denoted as r−1.
Reciprocal of complex numbers: rationalisationWhat is the rectangular form of 1
1+i ? Idea: rationalisation, i.e.multiply both numerator and denominator with the conjugate:
11 +√2
= 11 +√2· 1−
√2
1−√2
= 1−√2
(1 +√2)(1−
√2)
= 1−√2
12 − (√2)2 = 1−
√2
1− 2 = −1 +√2
Similarly:
11 + i
1− i1− i = 1− i
(1 + i)(1− i) = 1− i12 − i2 = 1− i
1− (−1) = 1− i2 = 1
2−12 i
Discrete mathematics I - Complex numbersComplex numbers
Complex numbers
Calculation with complex numbers: quotient
ConjugateLet z = a + bi be the rectangular form of a complex number. Theconjugate of z is z = a + bi = a − bi szám.
Theorem (Statement)The reciprocal of z 6= 0 is 1
z = zz·z .
RemarkThe previous statement is correct, since the denominator isz · z = (a + bi)(a − bi) = a2 − (bi)2 = a2 + b2 = |z |2 ∈ R.
Theorem (No zero divisors)z · w = 0⇒ z = 0 vagy w = 0.
Definition (Quotient)The quotient of two complex numbers z
w = z · 1w .
Discrete mathematics I - Complex numbersComplex numbers
Complex numbers
Calculation with complex numbers: rules
Theorem (Prove them for homework)
1. z = z;2. z + w = z + w;3. z · w = z · w;4. z + z = 2Re(z);5. z − z = 2 Im(z) · i ;6. z · z = |z |2;7. If z 6= 0, then z−1 = z
|z|2 ;8. |0| = 0 and if z 6= 0, then |z | > 0;9. |z | = |z |;10. |z · w | = |z | · |w |;11. |z + w | ≤ |z |+ |w | (triangle inequality theorem).
Discrete mathematics I - Complex numbersComplex numbers
Complex numbers
Calculation with complex numbers: proof
Theorem (Prove them at homework)...10. |z · w | = |z | · |w |;...
Proof.
|z · w |2 = z · w · z · w = z · w · z · w= z · z · w · w = |z |2 · |w |2
= (|z | · |w |)2
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Representation of complex numbersOn the complex plane
ϕ
r =|z |
r cosϕ
rsinϕ
z = r(cosϕ+ i sinϕ)
If z = a + bi ∈ C, then Re(z) = a, Im(z) = b.The length of the vector (Re(z), Im(z)) is r =
√a2 + b2 =
√|z |2.
The argument of z 6= 0 complex number is ϕ = arg(z) ∈ [0, 2π)Using trigonometric functions, we can express the coordinates as:
Re(z) = a = r · cosϕ, Im(z) = b = r · sinϕ
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Polar form of complex numbers
Definition (Polar form)The polar (or tigonometric) form of the non-zero z ∈ C isz = r(cosϕ+ i sinϕ), where r > 0 is the absolute value (or length)of z .
RemarksI 0 does not have a polar form (because it has no argument).I The polar form is not unique:
r(cosϕ+ i sinϕ) = r(cos(ϕ+ 2π) + i sin(ϕ+ 2π))
I z = r(cosϕ+ i sinϕ) is the polar form;I z = a + bi is the rectangular form (a = r cosϕ, b = r sinϕ)
Definition (Argument)The argument of a non-zero z ∈ C is ϕ = arg(z) ∈ [0, 2π), suchthat z = |z |(cosϕ+ i sinϕ).
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Converting rectangular to polar form
Using the inverse of tanLet a + bi = r(cosϕ+ i sinϕ), which implies a = r cosϕ andb = r sinϕ.If a 6= 0, then tanϕ = b
a , so
ϕ ={
arctan ba if a > 0;
arctan ba + π if a < 0
If a = 0 then we have a pure imaginary number, so
ϕ = sign(b)π2
Note: ϕ is not the argument, because ϕ ∈ [−π2 ,
3π2 ) is possible.
But this can be fixed by adding 2π.
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Multiplication with complex in polar formLet z ,w ∈ C non-zero complex numbers: z = |z |(cosϕ+ i sinϕ),and w = |w |(cosψ + i sinψ) then their product iszw = |z |(cosϕ+ i sinϕ) · |w |(cosψ + i sinψ) =
= |z ||w |(cosϕ cosψ − sinϕ sinψ + i(cosϕ sinψ + sinϕ cosψ)) == |z ||w |(cos(ϕ+ ψ) + i sin(ϕ+ ψ))
The last equality comes from the trigonometric addition formulas:I cos(ϕ+ ψ) = cosϕ cosψ − sinϕ sinψI sin(ϕ+ ψ) = cosϕ sinψ + sinϕ cosψ
The absolute value of the product is: |zw | = |z ||w |.The argument of the product is:
arg(zw) ={
arg(z) + arg(w) if arg(z) + arg(w) < 2πarg(z) + arg(w)− 2π if 2π ≤ arg(z) + arg(w) < 4π
i.e. the arguments are summed and then reduced by 2π.
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Multiplication in polar form
Theorem (De Moivre’s formula)Let z ,w ∈ C non-zero numbers z = |z |(cosϕ+ i sinϕ),w = |w |(cosψ + i sinψ), and let n ∈ N. Then
zw = |z ||w |(cos(ϕ+ ψ) + i(sin(ϕ+ ψ));zw = |z |
|w |(cos(ϕ− ψ) + i sin(ϕ− ψ)), if w 6= 0;
zn = |z |n(cos nϕ+ i sin nϕ)
The angles are added/subtracted/multiplied. To get the argument,we have to reduce the new angle by 2π
Geometric interpretationMultiplication with z ∈ C is a combined stretching and rotatingtransformation. The plane is “stretched” by |z |, and rotated byarg(z) around 0.
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Roots of complex numbers
Example (8-th root of 1)
(1 + i√2
)8=( 1√
2+ i 1√
2
)8=(
cos π4 + i sin π4
)8=
= cos(8 · π4
)+ i sin
(8 · π4
)= cos 2π + i sin 2π = 1
Other number which for which z8 = 1I 1, −1;I i : i8 = (i2)4 = (−1)4 = 1, and similarly −i ;I 1+i√
2 and −1+i√2 ;
I ±i · 1+i√2 also:
(i · 1+i√
2
)8= i8 ·
(1+i√
2
)8= 1 · 1 = 1
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Calculating the n-th root
Theorem (Equality in polar form)Two complex numbers z = |z |(cosϕ+ i sinϕ) andw = |w |(cosψ + i sinψ) in polar form are equal
|z |(cosϕ+ i sinϕ) = |w |(cosψ + i sinψ)
if |w | = |z | and ψ = ϕ+ k · 2π for some k ∈ Z
Taking the n-th root: Let wn = z (w is unknown):If wn = |w |n(cos nψ + i sin nψ) = |z |(cosϕ+ i sinϕ)then:
I |w |n = |z | ⇒ |w | = n√|z | and
I nψ = ϕ+ k · 2π for some k ∈ Z, i.e.I ψ = ϕ
n + k · 2πn for some k ∈ Z.
If k ∈ {0, 1, . . . , n − 1}, then these are all different numbers.
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Taking the n-th root
Theorem (Taking the n-th root)Let z = |z |(cosϕ+ i sinϕ), n ∈ N. The values of w ∈ C are then-th root of z if wn = z:
w = n√|z |(
cos(ϕ
n + 2πkn
)+ i sin
(ϕ
n + 2πkn
))k = 0, 1, . . . , n − 1.
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Example for: taking the n-th root
w = n√|z |(
cos(ϕ
n + 2kπn
)+ i sin
(ϕ
n + 2kπn
)): k = 0, 1, . . . , n−1
Example (Calculation)Let’s calculate the value 6
√1−i√3+i :
1− i =√2(√
22 − i
√2
2
)=√2(cos 7π
4 + i sin 7π4
)√3 + i = 2
(√3
2 + i 12
)= 2
(cos π6 + i sin π
6)
Since 7π4 −
π6 = 19π
12 :
6√
1−i√3+i = 6
√1√2
(cos 19π
12 + i sin 19π12
)=
= 112√2
(cos 19π+24kπ
72 + i sin 19π+24kπ72
): k = 0, 1, . . . , 5
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Complex roots of unity
n-th roots of unityThe complex numbers ε ∈ C which for which εn = 1 are the n-throots of unity
εk = ε(n)k =
(cos 2kπn + i sin 2kπ
n
): k = 0, 1, . . . , n − 1
Example (8-th roots of unity)
Re
Im
Oε0
ε1ε2
ε3
ε4
ε5ε6
ε7
α
Discrete mathematics I - Complex numbersPolar form of complex numbers
Polar form
Taking the n-th root
The square roots a of a positive real number r is are the solutionsof x2 = r i.e. ±
√r .
Theorem (All n-th roots)Let z ∈ C be a non-zero complex number, n ∈ N and w ∈ C suchthat wn = z. Then the n-th roots of z can be written as wεk fork = 0, 1, . . . n − 1.
Proof.The values of wεk are n-th roots: (wεk)n = wnεn
k = z · 1 = z .This results in n different values, so we have all the n-th roots ofz .
Discrete mathematics I - Complex numbersPolar form of complex numbers
Order and primitive roots of unity
OrderThe integer powers of some complex numbers are periodic:
I 1, 1, 1, . . .I −1, 1,−1, 1, . . .I i ,−1,−i , 1, i ,−1, . . .I 1+i√
2 , i ,−1+i√
2 ,−1, −1−i√2 ,−i , 1−i√
2 , 1,1+i√
2 , i , . . .
In general cos(2πn ) + i sin(2π
n ) has (only) n different powers.Definition (Order)The number of different powers of a complex number z is theorder of z , sometimes denoted by o(z).
Example (Order)
I The order of 1 is 1;I The order of 2 is ∞ : 2, 4, 8, 16, . . .;I The order of −1 is 2: 1,−1;I The order of i is 4: 1, i ,−1,−i .
Discrete mathematics I - Complex numbersPolar form of complex numbers
Order and primitive roots of unity
Properties of order
Theorem (Properties of order)A complex number z
I either has all pairs of integer powers different, then o(z) =∞,I or there are two integer powers equal, and then the powers of
z are periodic, with the period equal to o(z).Also, o(z) = min{d ∈ N+ : zd = 1}, i.e. the order is the smallestpositive integer d such that zd = 1.Furthermore, zk = z` ⇔ o(z) | k − `. Specially: zk = 1⇔ o(z) | k
Proof.Let o(z) <∞. Then there are k, ` integers, such that zk = z`.Suppose k > `. Then zk−` = 1.Let d be the smallest positive integer, such that zd = 1. Let’sdivide n by d (with a remainder), so n = q · d + r , where0 ≤ r < d . Now 1 = zn = zq·d+r = (zd)qz r = 1qz r = z r . Since dis the smallest such integer, r = 0 implying d | n. In the otherdirection: d | n i.e. dq = n⇒ zn = 1. So: d | n⇔ zn = 1.
Discrete mathematics I - Complex numbersPolar form of complex numbers
Order and primitive roots of unity
Primitive roots of unityNot all n-th roots of unity have order equal to n:4-th roots of unity: 1, i ,−1,−i .
I o(1) = 1;I o(−1) = 2I o(i) = 4
Primitive n-th roots of unityThe n-th roots of unity which have order equal to n are theprimitive n-th roots of unity
Theorem (Corollary (proof for homework))
I The powers of a primitive n-th root of unity are exactly then-th roots of unity.
I A primitive n-th root of unity is a k-th root of unity if, andonly if n | k.
Discrete mathematics I - Complex numbersPolar form of complex numbers
Order and primitive roots of unity
Primitive roots of unity
Example (Primitive roots of unity)
I Primitive 1-st root of unity: 1;I Primitive 2-nd root of unity: −1;I Primitive 3-rd roots of unity: −1±i
√3
2 ;I Primitive 4-th roots of unity: ±i ;I Primitive 5-th roots of unity: . . . (HW)I Primitive 6-th roots of unity: 1±i
√3
2 .
Theorem (Statement)An n-th root of unity cos
(2kπ
n
)+ i sin
(2kπ
n
)is a primitive n-th
root of unity, if and only if gcd(n, k) = 1.