complex numbers
play

Complex Numbers Complex Numbers 1 / 19 Complex Numbers Complex - PowerPoint PPT Presentation

Complex Numbers Complex Numbers 1 / 19 Complex Numbers Complex numbers ( C ) are an extension of the real numbers. z C takes the form z = x + i y x , y R Complex Numbers 2 / 19 Complex Numbers Complex numbers ( C ) are an extension of


  1. Complex Numbers Complex Numbers 1 / 19

  2. Complex Numbers Complex numbers ( C ) are an extension of the real numbers. z ∈ C takes the form z = x + i y x , y ∈ R Complex Numbers 2 / 19

  3. Complex Numbers Complex numbers ( C ) are an extension of the real numbers. z ∈ C takes the form z = x + i y x , y ∈ R x is the real part of z (Re( z )) y is the Imaginary part of z (Im( z )) Complex Numbers 2 / 19

  4. Complex Numbers Complex numbers ( C ) are an extension of the real numbers. z ∈ C takes the form z = x + i y x , y ∈ R x is the real part of z (Re( z )) y is the Imaginary part of z (Im( z )) i is the Imaginary unit defined by the property i 2 = − 1 Complex Numbers 2 / 19

  5. Why Complex Numbers? Complex Numbers 3 / 19

  6. Why Complex Numbers? The field (a set on which + , − , × , / are defined) of real numbers is not closed algebraically , i.e. there exist polynomials with real coefficients but do not have any real solutions. For example x 2 = − 2 has no roots in R . However, for x ∈ C using the definition of i , we note that √ − 1 = i 2 ⇐ ⇒ x 2 = ( − 1)(2) = 2 i 2 = ⇒ x = ± 2 i Complex Numbers 3 / 19

  7. Complex plane z = x + i y ∈ C has two independent components ( real part x and imaginary part y ). As a result a 2D plane is needed to represent all possible combinations of x and y . The x -axis corresponds to the real axis and y -axis is the imaginary axis. Complex Plane 10 8 6 4 2 0 -2 -4 -6 -8 -10 -10 -8 -6 -4 -2 0 2 4 6 8 10 Representation of 2 + 3 i and 4 − 5 i Complex Numbers 4 / 19

  8. Working with complex numbers Let z 1 = x 1 + i y 1 and z 2 = x 2 + i y 2 addition z 1 + z 2 = ( x 1 + x 2 ) + i ( y 1 + y 2 ) Complex Numbers 5 / 19

  9. Working with complex numbers Let z 1 = x 1 + i y 1 and z 2 = x 2 + i y 2 addition z 1 + z 2 = ( x 1 + x 2 ) + i ( y 1 + y 2 ) subtraction z 1 − z 2 = ( x 1 − x 2 ) + i ( y 1 − y 2 ) Complex Numbers 5 / 19

  10. Working with complex numbers Let z 1 = x 1 + i y 1 and z 2 = x 2 + i y 2 addition z 1 + z 2 = ( x 1 + x 2 ) + i ( y 1 + y 2 ) subtraction z 1 − z 2 = ( x 1 − x 2 ) + i ( y 1 − y 2 ) multiplication z 1 z 2 = ( x 1 + i y 1 )( x 2 + i y 2 ) = x 1 x 2 + i x 1 y 2 + i y 1 x 2 + i 2 y 1 y 2 = ( x 1 x 2 − y 1 y 2 ) + i ( x 1 y 2 + y 1 x 2 ) Complex Numbers 5 / 19

  11. Working with complex numbers Let z 1 = x 1 + i y 1 and z 2 = x 2 + i y 2 Complex conjugate ¯ z := x − i y is the complex conjugate of z = x + i y Complex Numbers 6 / 19

  12. Working with complex numbers Let z 1 = x 1 + i y 1 and z 2 = x 2 + i y 2 Complex conjugate ¯ z := x − i y is the complex conjugate of z = x + i y Computing Im and Re parts using complex conjugate Re( z ) = z + ¯ z = ( x + i y ) + ( x − i y ) = x 2 2 Im( z ) = z − ¯ z = ( x + i y ) − ( x − i y ) = y 2 i 2 i Complex Numbers 6 / 19

  13. Working with complex numbers Let z 1 = x 1 + i y 1 and z 2 = x 2 + i y 2 Complex conjugate ¯ z := x − i y is the complex conjugate of z = x + i y Computing Im and Re parts using complex conjugate Re( z ) = z + ¯ z = ( x + i y ) + ( x − i y ) = x 2 2 Im( z ) = z − ¯ z = ( x + i y ) − ( x − i y ) = y 2 i 2 i absolute value Complex Numbers 6 / 19

  14. Working with complex numbers Let z 1 = x 1 + i y 1 and z 2 = x 2 + i y 2 Complex conjugate ¯ z := x − i y is the complex conjugate of z = x + i y Computing Im and Re parts using complex conjugate Re( z ) = z + ¯ z = ( x + i y ) + ( x − i y ) = x 2 2 Im( z ) = z − ¯ z = ( x + i y ) − ( x − i y ) = y 2 i 2 i absolute value √ x 2 + y 2 = � � | z | := ( x + i y )( x − i y ) = z ¯ z Complex Numbers 6 / 19

  15. Working with complex numbers division = x 1 + i y 1 z 1 x 2 + i y 2 z 2 � x 1 + i y 1 �� x 2 − i y 2 � = (make the denominator real) x 2 + i y 2 x 2 − i y 2 = x 1 x 2 + y 1 y 2 + i x 1 x 2 − y 1 x 2 x 2 2 + y 2 x 2 2 + y 2 2 2 Complex Numbers 7 / 19

  16. Complex numbers in MATLAB WARNING: Do not use the i as a variable in your code. Defining complex numbers: >> z1=2+3i; z2 = 4-5i; or >>z1 = complex(2,3) ( Use this option, especially if you want to plot real numbers on the complex plane ) To extract the real and imaginary parts use the MATLAB functions real and imag , resp. as Use norm and conj to compute | z | and ¯ z , resp. > z1=2+3i; z2 = 4-5i; > z1=2+3i; z2 = 4-5i; 1 > 1 > > real(z1) > norm(z1) 2 > 2 > ans = ans = 3 3 2 3.6056 4 4 > imag(z1) > conj(z1) 5 > 5 > ans = ans = 6 6 3 2.0000 - 3.0000i 7 7 We can also define functions and do complex arithmetic as usual Complex Numbers 8 / 19

  17. Complex numbers in MATLAB - plotting Plotting points Use the MATLAB plot function as plot(z,LineSpec) . e.g. to plot a red dotted complex point of size 20: >>plot(z1, ' r. ' , ' MarkerSize ' ,20) Complex Numbers 9 / 19

  18. Complex numbers in MATLAB - plotting Plotting points Use the MATLAB plot function as plot(z,LineSpec) . e.g. to plot a red dotted complex point of size 20: >>plot(z1, ' r. ' , ' MarkerSize ' ,20) Plotting lines Again use the MATLAB plot function e.g. >>plot([z0 z1], ' b-- ' , ' Linewidth ' ,2) will join the points z 1 and z 2 with a black dashed line. Complex Numbers 9 / 19

  19. Adding complex numbers - a geometric view Parallelogram law z 1 = 2 + 3 i z 2 = 4 − 5 i z 3 = z 1 + z 2 = 6 − 2 i Complex Addition 10 8 6 4 2 0 -2 -4 -6 -8 -10 -10 -8 -6 -4 -2 0 2 4 6 8 10 Complex Numbers 10 / 19

  20. Multiplication by scalars z 1 = 2 + 3 i Multiplication by scalars 10 8 6 4 2 0 -2 -4 -6 -8 -10 -10 -8 -6 -4 -2 0 2 4 6 8 10 Complex Numbers 11 / 19

  21. Multiplying complex numbers just “foil” it out If z 1 = x 1 + i y 1 and z 2 = x 2 + i y 2 z 1 z 2 = ( x 1 x 2 − y 1 y 2 ) + i ( x 1 y 2 + y 1 x 2 ) Complex Numbers 12 / 19

  22. Multiplying complex numbers just “foil” it out If z 1 = x 1 + i y 1 and z 2 = x 2 + i y 2 z 1 z 2 = ( x 1 x 2 − y 1 y 2 ) + i ( x 1 y 2 + y 1 x 2 ) BUT...to really appreciate this let’s doing some plotting Complex Numbers 12 / 19

  23. Multiplying complex numbers – Polar coordinates Recall that given a point ( x , y ) in R 2 , we can write this point in the form ( r , θ ) with x = r cos θ y = r sin θ x 2 + y 2 = r 2 y x = tan θ Complex Numbers 13 / 19

  24. Multiplying complex numbers – Polar coordinates Recall that given a point ( x , y ) in R 2 , we can write this point in the form ( r , θ ) with x = r cos θ y = r sin θ x 2 + y 2 = r 2 y x = tan θ Polar Representation of Complex numbers If z = x + i y then we can write z as: z = r cos θ + i r sin θ � x 2 + y 2 r = | z | = Complex Numbers 13 / 19

  25. de Moivre’s Formula When z = r cos θ + i r sin θ , and n is any natural number, z n = r n cos( n θ ) + i r n sin( n θ ) This means when we compute z n the result is a complex number with length raised to the power n and rotated by an angle n θ . Complex Numbers 14 / 19

  26. de Moivre’s Formula When z = r cos θ + i r sin θ , and n is any natural number, z n = r n cos( n θ ) + i r n sin( n θ ) This means when we compute z n the result is a complex number with length raised to the power n and rotated by an angle n θ . Powers 20 18 16 14 √ 12 2 , θ = π z 1 = 2 + 2 i → | z | = 2 10 4 8 √ 6 2) 2 = 8 , 2 θ = π 1 has r 2 = (2 z 2 4 2 2 0 √ 8 and 3 θ = 3 π 1 has r 3 = 8 z 3 -2 -4 4 -6 -8 -10 -12 -14 -16 -18 -20 -20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 Complex Numbers 14 / 19

  27. Multiplying complex numbers If z 1 = r cos( θ ) + i sin( θ ) and z 2 = s cos( ψ ) + i s sin( ψ ), one can show (using trig identities) that z 1 z 2 = rs cos( θ + ψ ) + i rs sin( θ + ψ ) lengths are multiplied and angle arguments are added Complex Numbers 15 / 19

  28. Segments in the complex plane z 1 = 2 + 3 i z 2 = 6 + 5 i 7 6 z 2 5 4 z 1 3 z 2 − z 1 2 1 0 0 1 2 3 4 5 6 7 Complex Numbers 16 / 19

  29. Segments in the complex plane 1 z 1 + 1 z 1 = 2 + 3 i z 2 = 6 + 5 i , 2( z 2 − z 1 ) 2( z 2 − z 1 ) 7 6 z 2 5 z 1 + 1 2( z 2 − z 1 ) 4 z 1 3 z 2 − z 1 2 1 2( z 2 − z 1 ) 1 0 0 1 2 3 4 5 6 7 Complex Numbers 17 / 19

  30. Chaos game 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 -0.5 0 0.5 Rules Color each vertex of an equilateral triangle with a different color. 1 2 Color a six-sided die so that 2 faces are red, 2 are yellow and 2 are blue Choose a random starting point inside the triangle (this rule may be relaxed) 3 4 Roll the die. Move half the distance from the seed towards the vertex with the same color as the 5 number rolled. Roll again from the point marked, move half the distance towards the vertex of the same 6 color as the number rolled. Mark the point, repeat. 7 Complex Numbers 18 / 19

  31. Chaos game Generalize the chaos.m script to a 5 sided die and a regular pentagon with coordinates 0 + i √ √ − 1 � 5 + 1 10 + 2 4( 5 − 1) i 4 √ √ − 1 � 5 − 1 10 − 2 4( 5 + 1) i 4 √ √ 1 � 5 − 1 10 − 2 4( 5 + 1) i 4 √ √ 1 � 5 + 1 10 + 2 4( 5 − 1) i 4 Complex Numbers 19 / 19

Recommend


More recommend