Discrete mathematics I - Emil Vatai <vatai@inf.elte.hu> (based on hungarian slides by László Mérai) 1 January 31, 018 1 Financed from the financial support ELTE won from the Higher Education Restructuring Fund of the Hungarian Government.
Introduction and historical background Cubic equation Solving the cubic equation For a 0, we are looking for the solution of ax 3 + bx + cx + d = 0 By dividing with a we obtain a monic polynomial on the lhs: x 3 + b x + c x + d = 0 (1) Reminder: Solving x + px + q = 0 With the substitution x = y p we get y + q = 0. From this we can easily obtain the solution by rearranging and taking the square roots. By substituting x = y b/3 into (1) y 3 + py + q = 0 ()
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 = u 3 + 3u v + 3uv + v 3 we obtain (u + v) 3 3uv(u + v) (u 3 + v 3 ) = 0 y 3 +py +q = 0 Our goal: find u, v for which 3uv = p, (u 3 + v 3 ) = q. Then y = u + v will be a solution! Finding u, v u 3 v 3 = ( p 3 )3 and u 3 + v 3 = q, u 3, v 3 will be the roots of the quadratic equation z + qz + ( p 3 )3 = 0. Taking the cubic root of the solutions of the previous equation: (q ) y = 3 q ( ) p 3 + + + 3 q 3 (q ) ( ) p 3 + (3) 3
Introduction and historical background Example: solve y 3 1y + 0 = 0 It is pretty obvious that y = 1 is a solution. Using the formula Substitution p = 1, q = 0 into (3) (q x = 3 q + ) ( ) p 3 + + 3 q 3 x = 3 10 + 43 + 3 10 43 (q ) ( ) p 3 + 3 We have negative 43 under the square root! Can we continue using the formula like this?
Introduction and historical background Calculating x = 3 10 + 43 + 3 10 43 Let s (formally) allow ( 3) = 3: ( + 3) 3 = 3 + 3 3 + 3 ( 3) + ( 3) 3 = 10 + 9 3 = 10 + 43 So 10 + 43 = ( + 3) 3 and similarly 10 43 = ( 3) 3 The solution is: x = ( + 3) + ( 3) = 4. Is this formal calculation with 3 allowed? Why do we calculate the value of 10 + 43 like this? There was a solution y = 1, what happened to it? Is there a third root? (There should be!)
Introduction and historical background Number sets Natural numbers: N = {0, 1,,... } There is no x N such that: x + = 1 i.e. x + = 1 has no solution because subtraction is not (always) defined in N! Integers: Z = {...,, 1, 0, 1,,... } Now we have subtraction (x = 1), but x = 1 has no solution because division is not (always) defined in Z! Rational numbers: Q = { p q : p, q Z, q 0} Now we have division (x = 1 ), but x = has no solution because square root is not (always) defined in Q! Real numbers: R Now we have square root (and a irrational numbers), but x = 1 has no solution, because the square root of negative numbers is (never) defined!
Introduction and historical background x = 1 can be solved in the set of complex numbers Application of complex numbers CS: Computer graphics, geometry Math: geometry, solving equations Physics: quantum mechanics, relativity theory etc. Introduction of complex numbers (informal definition) Let i be the solution of x = 1. We do our calculations as if i was a variable, substituting i = 1. For example: More generally: (1 + i) = 1 + i + i = 1 + i + ( 1) = i. (a + bi)(c + di) = ac bd + (ad + bc)i (4)
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 an expression a + bi with a, b R. This is the rectangular (or Cartesian or algebraic) form of z. Re(z) = a is the real part and Im(z) = b is the imaginary part of z. Important warning: Im(z) bi! Graphical representation a = Re(z) z z = a + bi b = Im(z)
Opertaions on complex numbers Definition (Operations on C) Addition: (a + bi) + (c + di) = a + c + (b + d)i. Multiplication: (a + bi)(c + di) = ac bd + (ad + bc)i. Equality: complex numbers are equal if both their real and imaginary parts are equal i.e. a + bi = c + di if a = c and b = d! Remarks: let z = a + bi (with a, b R). If b = 0 then z is a real number. If a = 0 then z is a pure imaginary number.
Alternative (more formal definition) of C Definition ( as ordered pairs) Let C = R R (Cartesian product), (a, b), (c, d) C Addition: (a, b) + (c, d) = (a + c, d + b); 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,a 0,..., a n C, where a n 0, then for every expression a 0 + a 1 x + a x +... + a n x n there is a complex number z C, such that a 0 + a 1 z + a z +... + a n z n = 0.
Calculation with complex numbers: absolute value Definition (Additive inverse) In general, y is the additive inverse of x if x + y = 0. For r R the 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 in rectangular form is z = a + bi = a + b For real numbers: a = a + 0i = a + 0 = a Theorem (Statement) If z C, then z 0, and z = 0 z = 0
1 1 i 1 i 1 i 1 i 1 i 1 1 Discrete mathematics I - Calculation with complex numbers: reciprocal Definition (Reciprocal, multiplicative inverse) y is the reciprocal (or multiplicative inverse) of x if x y = 1. For r R \ {0} the reciprocal is 1/r sometimes denoted as r 1. Reciprocal of complex numbers: rationalisation 1 What is the rectangular form of 1+i? Idea: rationalisation, i.e. multiply both numerator and denominator with the conjugate: 1 1 + = 1 1 + 1 1 = 1 (1 + )(1 ) = 1 1 ( ) = 1 1 = 1 + Similarly:
Calculation with complex numbers: quotient Conjugate Let z = a + bi be the rectangular form of a complex number. The conjugate of z is z = a + bi = a bi szám. Theorem (Statement) The reciprocal of z 0 is 1 z = z z z. Remark The previous statement is correct, since the denominator is z z = (a + bi)(a bi) = a (bi) = a + b = z R. Theorem (No zero divisors) z w = 0 z = 0 vagy w = 0. Definition (Quotient) The quotient of two complex numbers z w = z 1 w.
Calculation with complex numbers: rules Theorem (Prove them for homework) 1. z = z;. z + w = z + w; 3. z w = z w; 4. z + z = Re(z); 5. z z = Im(z) i; 6. z z = z ; 7. If z 0, then z 1 = z z ; 8. 0 = 0 and if z 0, then z > 0; 9. z = z ; 10. z w = z w ; 11. z + w z + w (triangle inequality theorem).
Calculation with complex numbers: proof Theorem (Prove them at homework). 10. z w = z w ;. Proof. z w = z w z w = z w z w = z z w w = z w = ( z w )
Polar form Representation of complex numbers On the complex plane z = r(cos ϕ + i sin ϕ) r = z ϕ r cos ϕ r sin ϕ If z = a + bi C, then Re(z) = a, Im(z) = b. The length of the vector (Re(z), Im(z)) is r = a + b = z. The argument of z 0 complex number is ϕ = arg(z) [0, π) Using trigonometric functions, we can express the coordinates as:
Definition (Argument) Discrete mathematics I - Polar form Definition (Polar form) The polar (or tigonometric) form of the non-zero z C is z = r(cos ϕ + i sin ϕ), where r > 0 is the absolute value (or length) of z. Remarks 0 does not have a polar form (because it has no argument). The polar form is not unique: r(cos ϕ + i sin ϕ) = r(cos(ϕ + π) + i sin(ϕ + π)) z = r(cos ϕ + i sin ϕ) is the polar form; z = a + bi is the rectangular form (a = r cos ϕ, b = r sin ϕ)
Polar form Converting rectangular to polar form Using the inverse of tan Let a + bi = r(cos ϕ + i sin ϕ), which implies a = r cos ϕ and b = r sin ϕ. If a 0, then tan ϕ = b a, so ϕ = { arctan b a if a > 0; arctan b a + π if a < 0 If a = 0 then we have a pure imaginary number, so ϕ = sign(b) π Note: ϕ is not the argument, because ϕ [ π, 3π ) is possible. But this can be fixed by adding π.
Polar form Multiplication with complex in polar form Let z, w C non-zero complex numbers: z = z (cos ϕ + i sin ϕ), and w = w (cos ψ + i sin ψ) then their product is zw = 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: cos(ϕ + ψ) = cos ϕ cos ψ sin ϕ sin ψ sin(ϕ + ψ) = cos ϕ sin ψ + sin ϕ cos ψ The absolute value of the product is: zw = z w. The argument of the product is: { arg(z) + arg(w) if arg(z) + arg(w) < π arg(zw) = arg(z) + arg(w) π if π arg(z) + arg(w) < 4π i.e. the arguments are summed and then reduced by π.
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(ϕ + ψ)); z w = z (cos(ϕ ψ) + i sin(ϕ ψ)), if w 0; w z n = 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 π Geometric interpretation Multiplication with z C is a combined stretching and rotating transformation. The plane is stretched by z, and rotated by
Polar form Roots of complex numbers Example (8-th root of 1) ( ) 1 + i 8 ( 1 = + i ( = cos 8 π 4 Other number which for which z 8 = 1 1, 1; ) 1 8 ( = cos π 4 + i sin π ) 8 = 4 ) ( + i sin 8 π ) = cos π + i sin π = 1 4 i : i 8 = (i ) 4 = ( 1) 4 = 1, and similarly i; 1+i and 1+i ; ±i 1+i also: ( i 1+i ) 8 = i 8 ( 1+i ) 8 = 1 1 = 1
Polar form Calculating the n-th root Theorem (Equality in polar form) Two complex numbers z = z (cos ϕ + i sin ϕ) and w = w (cos ψ + i sin ψ) in polar form are equal z (cos ϕ + i sin ϕ) = w (cos ψ + i sin ψ) if w = z and ψ = ϕ + k π for some k Z Taking the n-th root: Let w n = z (w is unknown): If w n = w n (cos nψ + i sin nψ) = z (cos ϕ + i sin ϕ) then: w n = z w = n z and nψ = ϕ + k π for some k Z, i.e. ψ = ϕ n + k π n for some k Z. If k {0, 1,..., n 1}, then these are all different 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 the n-th root of z if w n = z: ( ) w = z n cos + i sin k = 0, 1,..., n 1. ( ϕ n + πk n ( ϕ n + πk )) n
Polar form Example for: taking the n-th root ( w = z n cos ( ϕ n + kπ ) + i sin n Example (Calculation) Let s calculate the value 6 1 i 3+i : Since 7π 4 6 1 i ( ϕ n + kπ )) : k = 0, 1,..., n 1 n 1 i = ( ) i = ( ) cos 7π 4 + i sin 7π 4 ( ) 3 + i = 3 + i 1 = ( cos π 6 + i sin π ) 6 π 6 = 19π 1 : 3+i = 6 ) 1 (cos 19π 19π 1 + i sin 1 = ( ) 1 19π+4kπ 19π+4kπ
Polar form Complex roots of unity n-th roots of unity The complex numbers ε C which for which ε n = 1 are the n-th roots of unity ( ε k = ε (n) k = cos kπ n Example (8-th roots of unity) + i sin kπ ) : k = 0, 1,..., n 1 n Im ε 3 ε ε 1 ε 4 α O ε 0 Re
Polar form Taking the n-th root The square roots a of a positive real number r is are the solutions of x = r i.e. ± r. Theorem (All n-th roots) Let z C be a non-zero complex number, n N and w C such that w n = z. Then the n-th roots of z can be written as wε k for k = 0, 1,... n 1. Proof. The values of wε k are n-th roots: (wε k ) n = w n ε n k = z 1 = z. This results in n different values, so we have all the n-th roots of z.
Order and primitive roots of unity Order The integer powers of some complex numbers are periodic: 1, 1, 1,... 1, 1, 1, 1,... i, 1, i, 1, i, 1,... 1+i, i, 1+i, 1, 1 i, i, 1 i, 1, 1+i, i,... In general cos( π n ) + i sin( π n ) has (only) n different powers. Definition (Order) The number of different powers of a complex number z is the order of z, sometimes denoted by o(z). Example (Order) The order of 1 is 1; The order of is :, 4, 8, 16,...; The order of 1 is : 1, 1;
Order and primitive roots of unity Properties of order Theorem (Properties of order) A complex number z either has all pairs of integer powers different, then o(z) =, 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 + : z d = 1}, i.e. the order is the smallest positive integer d such that z d = 1. Furthermore, z k = z l o(z) k l. Specially: z k = 1 o(z) k Proof. Let o(z) <. Then there are k, l integers, such that z k = z l. Suppose k > l. Then z k l = 1. Let d be the smallest positive integer, such that z d = 1. Let s divide n by d (with a remainder), so n = q d + r, where 0 r < d. Now 1 = z n = z q d+r = (z d ) q z r = 1 q z r = z r. Since d
Order and primitive roots of unity Primitive roots of unity Not all n-th roots of unity have order equal to n: 4-th roots of unity: 1, i, 1, i. o(1) = 1; o( 1) = o(i) = 4 Primitive n-th roots of unity The n-th roots of unity which have order equal to n are the primitive n-th roots of unity Theorem (Corollary (proof for homework)) The powers of a primitive n-th root of unity are exactly the n-th roots of unity.
Order and primitive roots of unity Primitive roots of unity Example (Primitive roots of unity) Primitive 1-st root of unity: 1; Primitive -nd root of unity: 1; Primitive 3-rd roots of unity: 1±i 3 ; Primitive 4-th roots of unity: ±i; Primitive 5-th roots of unity:... (HW) Primitive 6-th roots of unity: 1±i 3. Theorem (Statement) ( ) ( ) An n-th root of unity cos kπ n + i sin kπ n is a primitive n-th root of unity, if and only if gcd(n, k) = 1.