Quadratic Formula A quadratic equation is a second order polynomial: y = ax2 + bx + c. If a = 1, b = 0, and c = −2, then y = x2 − 2. The quadratic formula √ −b ± b2 − 4ac x= 2a gives solutions to the following equation: ax2 + bx + c = 0. The solutions to x2 − 2 = 0 are: √ √ √ ± 8 ±2 2 x= = = ± 2. 2 2 Figure 1: Left: y = x2 − 2. Right: y = x2 + 2. The Square Root of -1 If a = 1, b = 0, and c = 2, then y = x2 + 2. The quadratic formula gives solutions to x2 + 2 = 0: √ √ √ ± −8 ±2 −2 x= = = ± −2. 2 2 We can’t take the square root of a negative number! So we√use an imaginary number, i, to represent the −1: √ √ x = ± −2 = ±i 2. The Square Root of -1 (contd). Imaginary numbers can be added just like real numbers: 7i + 5i = 12i. Can they be multiplied? √ 2 2 7i · 5i = 35i = 35 −1 = −35 which is real, not imaginary. Complex Numbers A complex number, c, has a real part, x, and an imaginary part, y: c = x + yi. A complex number can be decomposed into its real and imaginary parts: Re(c) = x Im(c) = y. Two complex numbers, c1 and c2, are equal, if and only if Re(c1) = Re(c2) and Im(c1) = Im(c2). In other words, (x + iy) = (u + iv) iff x = u and y = v. Adding Complex Numbers Two complex numbers, c1 and c2, can be added: Re(c1 + c2) = Re(c1) + Re(c2) Im(c1 + c2) = Im(c1) + Im(c2). The real parts are added to form the real part of the sum and the imaginary parts are added to form the imaginary part of the sum. In other words, if c1 = x + yi and c2 = u + vi, then (x + yi) + (u + vi) = (x + u) + (y + v)i. Euler’s Equation The Taylor series for sin x, cos x and ex are: x0 x2 x4 x6 x8 cos x = − + − + + ... 0! 2! 4! 6! 8! x1 x3 x5 x7 x9 sin x = − + − + + ... 1! 3! 5! 7! 9! 1 2 3 4 0 x x x x x ex = + + + + + ... 0! 1! 2! 3! 4! Euler’s Equation (contd.) What is the Taylor series for eix? ix e = = = = = (ix)0 (ix)1 (ix)2 (ix)3 (ix)4 + + + + + ... 0! 1! 2! 3! 4! i0x0 i1x1 i2x2 i3x3 i4x4 + + + + + ... 0! 1! 2! 3! 4! x0 x1 x2 x3 x4 x5 + i − − i + + i − ... 0! 1! 2! 3! 4! 5! 0 2 4 1 3 5 x x x x x x − + − ... + i − + − ... 0! 2! 4! 1! 3! 5! cos x + i sin x. Polar to Rectangular We have just derived Euler’s equation: eiθ = cos θ + i sin θ. If we multiply both sides of the equation by a we get: aeiθ = a cos θ + ia sin θ = x + iy where a is amplitude and θ is phase. The left side of the equation is a complex number in polar form. The right side is a complex number in rectangular form: Re(aeiθ) = a cos θ = x Im(aeiθ) = a sin θ = y. The above equations show how we can convert from polar to rectangular. How do we go from rectangular to polar? Rectangular to Polar To solve for amplitude, a, given x + iy, we use the fact that x = a cos θ and y = a sin θ to write the following equation: a2 cos2 θ + a2 sin2 θ = x2 + y2 which can be rearranged to yield 2 2 2 a cos θ + sin θ = x2 + y2 and since cos2 θ + sin2 θ = 1, it follows that p a = x 2 + y2 . To solve for phase, θ, we use the fact that x = a cos θ and y = a sin θ to write the following equation: a sin θ y = tan θ = a cos θ x which can be directly solved for θ: y θ = tan−1 . x Imaginary Real Figure 2: The complex plane. Multiplication in Rectangular Form Using the distributive property of multiplica√ tion, and the fact that i = −1, we can derive the rules for multiplying two complex numbers in rectangular form: (x + iy) · (u + iv) = xu + ixv + iyu − yv = (xu − yv) + i(xv + yu). To summarize, given two complex numbers, c1 and c2: Re(c1 · c2) = Re(c1)Re(c2) − Im(c1)Im(c2) Im(c1 · c2) = Re(c1)Im(c2) + Im(c1)Re(c2) ...or rewriting this in matrix notation: Re(c1 · c2) Re(c2) −Im(c2) Re(c1) = . Im(c1 · c2) Im(c2) Re(c2) Im(c1) But this is pretty hard to remember. Multiplication in Polar Form Given two complex numbers in polar form: c1 = a1eiθ1 c2 = a2eiθ2 . We start with the rules for multiplying two complex numbers in rectangular form: Re(c1 · c2) Re(c2) −Im(c2) Re(c1) = . Im(c1 · c2) Im(c2) Re(c2) Im(c1) Now substitute a2 cos θ2 for Re(c2), a2 sin θ2 for Im(c2), a1 cos θ1 for Re(c1), and a1 sin θ1 for Im(c1) to get: Re(c1 · c2) a2 cos θ2 −a2 sin θ2 a1 cos θ1 = . Im(c1 · c2) a2 sin θ2 a2 cos θ2 a1 sin θ1 Multiplying this out yields: Re(c1 · c2) = a1a2 cos θ1 cos θ2 − a1a2 sin θ1 sin θ2 Im(c1 · c2) = a1a2 cos θ1 sin θ2 + a1a2 sin θ1 cos θ2. Multiplication in Polar Form (contd.) Using the identities: cos(θ1 + θ2) = cos θ1 cos θ2 − sin θ1 sin θ2 sin(θ1 + θ2) = cos θ1 sin θ2 + sin θ1 cos θ2 we see that Re(c1 · c2) = a1a2 cos(θ1 + θ2) Im(c1 · c2) = a1a2 sin(θ1 + θ2). It follows that a1eiθ1 · a2eiθ2 = a1a2ei(θ1+θ2). To summarize, we multiply the amplitudes and sum the phases. Observation It is easy to add two complex numbers in rectangular form but hard in polar. Conversely it is easy to multiply two complex numbers in polar form but hard in rectangular. Imaginary Real Figure 3: Multiplication of complex numbers. Square root of a complex number • A complex number always has two square roots. • We find the first square root by taking the square root of the amplitude, a, and dividing the phase, θ, by 2. • The second square root has the same amplitude, but is at θ/2 + π. iθ • Consequently, the square roots of ae are √ iθ/2 √ i(θ/2+π) ae and ae . N-th roots of unity • Question How many square roots does 1 have? • Answer Two. They are both real. • Question How many cube roots does 1 have? • Answer Three. Only one of which is real. • Question How many fourth roots does 1 have? • Answer Four. Two are real. Two are imaginary. Do you see a pattern? Imaginary Real Figure 4: The square roots of aei θ are √ aeθ/2 and √ ae(θ/2+π) . Complex conjugate c = x + iy c∗ = x − iy ...or, in polar form: c = aeiθ c∗ = ae−iθ The complex conjugate has the same amplitude, but the phase is multiplied by minus one. Imaginary Imaginary e^(1i 2pi / 3) 2 pi / 2 2 pi / 3 Real e^(1i 2pi / 2) Real e^(0i 2pi / 2) e^(0i 2pi / 3) e^(2i 2pi / 3) Imaginary Imaginary e^(1i 2pi / 5) e^(1i 2pi / 4) e^(2i 2pi / 5) 2 pi / 4 2 pi / 5 Real e^(2i 2pi / 4) Real e^(0i 2pi / 5) e^(0i 2pi / 4) e^(3i 2pi / 5) e^(3i 2pi / 4) e^(4i 2pi / 5) Imaginary e^(2i 2pi / 6) Imaginary e^(2i 2pi / 7) e^(1i 2pi / 6) e^(1i 2pi / 7) e^(3i 2pi / 7) 2 pi / 6 2 pi / 7 Real e^(3i 2pi / 6) Real e^(0i 2pi / 6) e^(0i 2pi / 7) e^(4i 2pi / 7) e^(4i 2pi / 6) e^(6i 2pi / 7) e^(5i 2pi / 6) e^(5i 2pi / 7) Figure 5: The N-th roots of unity. Complex conjugate (contd.) The sum of a conjugate pair: c + c∗ = (x + iy) + (x − iy) = 2x = 2Re(c) The product of a conjugate pair: cc∗ = (x + iy)(x − iy) = x2 + iy − iy − i2y2 = x 2 + y2 = a2 ...or, in polar form: cc∗ = aeiθae−iθ = a2ei(θ−θ) = a2 The amplitude of a complex number is the square root of the product of the complex number and its conjugate: √ |c| = cc∗. Imaginary Real Figure 6: Complex conjugate.