== Complex Numbers == * Definitions i is sqrt(-1) y i is an "imaginary" number, where y is real (e.g. 3i, 5i, -2i) x + y i is a "complex" number, where (x,y) are real (e.g. 2+3i, 4-3i) * The complex plane +i | | -1 ---+---- 1 | | -i * Addition (x + y i) + (a + b i) = (x+a) + (y+b) i which is just like vector addition. * Conjugate z = x + i y z* = x - i y = "complex conjugate" of z. |z|^2 = z* z = x^2 + y^2 = squared length of z. * Polar form rectangular form x + i y polar form R ( cos(theta) + i sin(theta) ) R = sqrt( x^2 + y^2 ) = | x + i y | theta = counterclockwise angle from real = atan(b/a) Exercises : 1) Let z = 1+i. Find z*. 2) Same z. Find (R, theta) where z = R exp(i theta). 3) Find polar form of this z*. * Multiplication (a + b i) (c + d i) = (a c - b d) + (a d + b c) i Amplitudes multiply. Phases add. Exercises : 3) Verify these last two claims. (Pick some numbers and try it.) 4) Show that multiplication by i is a +90deg phase shift. * Roots z = ( x + y i ) = R ( cos(theta) + i sin(theta) ) z^(1/n) = R^(1/n) ( cos(phi) + i sin(phi) ) phi = (theta + 2 pi m)/n m = any integer Exercises : 5) Find the 2 square roots of 1 using this formula with m=0,1 6) Find the 6 sixth roots of 1 using this formula with m=0..5. * Exponential notation exp(i theta) = cos(theta) + i sin(theta) Exercises: 7) Show that derivatives of these two sides agree. 8) Show that this is consistent with the multiplications rules. * Connecting all this with waves Waves are written as y = f(x) = A cos( x + delta ) where A = amplitude, delta = phase at x=0. Therefore each wave is described by 2 numbers: (A,delta). Complex numbers also have an amplitude and a phase - and they're easier to work with. Just say "R" rather than "A". Example 1 - shifting the phase of a wave Trig functions wave y = 10 cos( x ) phase shifted y = 10 cos( x + pi/10) operator "stick pi/10 inside the parens" ... yuch. Complex exponentials wave y = 10 exp(i x) phase shifted y = 10 exp(i (x + pi/10) ) operator multiply by exp(i pi/10) ... ahhh. Example 2 - adding two waves Trig functions 5 cos( x + pi/10 ) + 3 cos( x + pi/5 ) ... and you're in the middle trig identity hell, starting with cos(a+b)=cos(a)cos(b)-sin(a)sin(b). Yeah, you can do it, but it's basically witchcraft. Complex exponentials 5 exp( i ( x + pi/10) ) + 3 exp( i (x + pi/5) ) factors into exp(i x) ( 5 exp(i pi/10) + 3 exp(i pi/5) ) = Z exp(i x) where Z gives *both* the amplitude and phase offset. Then it's just plug'n'chug. Z = A exp(i delta) = x + i y x = Real(Z) = 5 cos(pi/10) + 3 cos(pi/5) y = Imag(Z) = 5 sin(pi/10) + 3 sin(pi/5) A = sqrt( x^2 + y^2 ) = amplitude of the wave delta = atan(y/x) = phase of the wave * So what's going on here Differentiating cos(x) gives sin(x). Look at the graphs; it's a 90 degree phase shift. The two "sin" and "cos" names can obscure the fact that these are essentially the same wave shape. Multiplying by i also rotates by 90 degrees, but in the complex plane. So why not just work there? * Cool stuff to put on your T-shirt e^(pi i) + 1 = 0 Two transcendental numbers, the multiplicative and additive identities, and the square root of negative one, all in one small package. You can almost see God. * For a really good time, try all this in Mathematica. For example, type the following, where "Esc" means hit the Escape key, and "Enter" means hit the Enter key. Esc ee Esc contrl-^ Esc p Esc Esc ii Esc Enter or in a more formulaic form, just type this and then hit Enter. Exp[Pi I] * More exercises 9) Simplify (1-3i)/(2+3i) into the form (x + i y). (Hint: multiply top and bottom by the conjugate of the bottom.) 10) Simplify i^i into the form (x + i y). (Hint: write the first i in polar form.) * Executive summary Complex exponentials are a replacement notation for trig functions which can make the manipulation of wave math clearer. Important identities, definitions, and formulas. i = sqrt(-1) z = x + i y = R exp(i theta) where R = |z| = sqrt(z* z) = length of z = sqrt(x^2 + y^2) theta = angle counterclockwise from +x axis = atan(y/x) exp(i x) = cos(x) + i sin(x) cos(x) = ( exp(i x) + exp(-i x) )/2 sin(x) = ( exp(i x) - exp(-i x) )/(2i) ------------------------------------------------------------------------------- Jim Mahoney 9/6/04 mahoney@marlboro.edu