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

complex numbers
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Complex Numbers

Complex Numbers 1 / 19

slide-2
SLIDE 2

Complex Numbers

Complex numbers (C) are an extension of the real numbers. z ∈ C takes the form z = x + iy x, y ∈ R

Complex Numbers 2 / 19

slide-3
SLIDE 3

Complex Numbers

Complex numbers (C) are an extension of the real numbers. z ∈ C takes the form z = x + iy 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

slide-4
SLIDE 4

Complex Numbers

Complex numbers (C) are an extension of the real numbers. z ∈ C takes the form z = x + iy 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

slide-5
SLIDE 5

Why Complex Numbers?

Complex Numbers 3 / 19

slide-6
SLIDE 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 x2 = −2 has no roots in R. However, for x ∈ C using the definition of i, we note that −1 = i 2 ⇐ ⇒ x2 = (−1)(2) = 2i 2 = ⇒ x = ± √ 2i

Complex Numbers 3 / 19

slide-7
SLIDE 7

Complex plane

z = x + iy ∈ 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.

  • 10
  • 8
  • 6
  • 4
  • 2

2 4 6 8 10

  • 10
  • 8
  • 6
  • 4
  • 2

2 4 6 8 10 Complex Plane

Representation of 2 + 3i and 4 − 5i

Complex Numbers 4 / 19

slide-8
SLIDE 8

Working with complex numbers

Let z1 = x1 + iy1 and z2 = x2 + iy2 addition z1 + z2 = (x1 + x2) + i(y1 + y2)

Complex Numbers 5 / 19

slide-9
SLIDE 9

Working with complex numbers

Let z1 = x1 + iy1 and z2 = x2 + iy2 addition z1 + z2 = (x1 + x2) + i(y1 + y2) subtraction z1 − z2 = (x1 − x2) + i(y1 − y2)

Complex Numbers 5 / 19

slide-10
SLIDE 10

Working with complex numbers

Let z1 = x1 + iy1 and z2 = x2 + iy2 addition z1 + z2 = (x1 + x2) + i(y1 + y2) subtraction z1 − z2 = (x1 − x2) + i(y1 − y2) multiplication

z1z2 = (x1 + iy1)(x2 + iy2) = x1x2 + ix1y2 + iy1x2 + i 2y1y2 = (x1x2 − y1y2) + i(x1y2 + y1x2)

Complex Numbers 5 / 19

slide-11
SLIDE 11

Working with complex numbers

Let z1 = x1 + iy1 and z2 = x2 + iy2 Complex conjugate ¯ z := x − iy is the complex conjugate of z = x + iy

Complex Numbers 6 / 19

slide-12
SLIDE 12

Working with complex numbers

Let z1 = x1 + iy1 and z2 = x2 + iy2 Complex conjugate ¯ z := x − iy is the complex conjugate of z = x + iy Computing Im and Re parts using complex conjugate Re(z) = z + ¯ z 2 = (x + iy) + (x − iy) 2 = x Im(z) = z − ¯ z 2i = (x + iy) − (x − iy) 2i = y

Complex Numbers 6 / 19

slide-13
SLIDE 13

Working with complex numbers

Let z1 = x1 + iy1 and z2 = x2 + iy2 Complex conjugate ¯ z := x − iy is the complex conjugate of z = x + iy Computing Im and Re parts using complex conjugate Re(z) = z + ¯ z 2 = (x + iy) + (x − iy) 2 = x Im(z) = z − ¯ z 2i = (x + iy) − (x − iy) 2i = y absolute value

Complex Numbers 6 / 19

slide-14
SLIDE 14

Working with complex numbers

Let z1 = x1 + iy1 and z2 = x2 + iy2 Complex conjugate ¯ z := x − iy is the complex conjugate of z = x + iy Computing Im and Re parts using complex conjugate Re(z) = z + ¯ z 2 = (x + iy) + (x − iy) 2 = x Im(z) = z − ¯ z 2i = (x + iy) − (x − iy) 2i = y absolute value |z| :=

  • x2 + y2 =
  • (x + iy)(x − iy) =

√ z ¯ z

Complex Numbers 6 / 19

slide-15
SLIDE 15

Working with complex numbers

division

z1 z2 = x1 + iy1 x2 + iy2 = x1 + iy1 x2 + iy2 x2 − iy2 x2 − iy2

  • (make the denominator real)

= x1x2 + y1y2 x2

2 + y 2 2

+ i x1x2 − y1x2 x2

2 + y 2 2

Complex Numbers 7 / 19

slide-16
SLIDE 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.

1 >

> z1=2+3i; z2 = 4-5i;

2 >

> real(z1)

3

ans =

4

2

5 >

> imag(z1)

6

ans =

7

3

1 >

> z1=2+3i; z2 = 4-5i;

2 >

> norm(z1)

3

ans =

4

3.6056

5 >

> conj(z1)

6

ans =

7

2.0000 - 3.0000i

We can also define functions and do complex arithmetic as usual

Complex Numbers 8 / 19

slide-17
SLIDE 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

slide-18
SLIDE 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 z1 and z2 with a black dashed line.

Complex Numbers 9 / 19

slide-19
SLIDE 19

Adding complex numbers - a geometric view

Parallelogram law z1 = 2 + 3i z2 = 4 − 5i z3 = z1 + z2 = 6 − 2i

  • 10
  • 8
  • 6
  • 4
  • 2

2 4 6 8 10

  • 10
  • 8
  • 6
  • 4
  • 2

2 4 6 8 10 Complex Addition

Complex Numbers 10 / 19

slide-20
SLIDE 20

Multiplication by scalars

z1 = 2 + 3i

  • 10
  • 8
  • 6
  • 4
  • 2

2 4 6 8 10

  • 10
  • 8
  • 6
  • 4
  • 2

2 4 6 8 10 Multiplication by scalars

Complex Numbers 11 / 19

slide-21
SLIDE 21

Multiplying complex numbers

just “foil” it out If z1 = x1 + iy1 and z2 = x2 + iy2 z1z2 = (x1x2 − y1y2) + i(x1y2 + y1x2)

Complex Numbers 12 / 19

slide-22
SLIDE 22

Multiplying complex numbers

just “foil” it out If z1 = x1 + iy1 and z2 = x2 + iy2 z1z2 = (x1x2 − y1y2) + i(x1y2 + y1x2) BUT...to really appreciate this let’s doing some plotting

Complex Numbers 12 / 19

slide-23
SLIDE 23

Multiplying complex numbers – Polar coordinates

Recall that given a point (x, y) in R2, we can write this point in the form (r, θ) with x = r cos θ y = r sin θ x2 + y2 = r2 y x = tan θ

Complex Numbers 13 / 19

slide-24
SLIDE 24

Multiplying complex numbers – Polar coordinates

Recall that given a point (x, y) in R2, we can write this point in the form (r, θ) with x = r cos θ y = r sin θ x2 + y2 = r2 y x = tan θ Polar Representation of Complex numbers If z = x + iy then we can write z as: z = r cos θ + ir sin θ r = |z| =

  • x2 + y2

Complex Numbers 13 / 19

slide-25
SLIDE 25

de Moivre’s Formula

When z = r cos θ + ir sin θ, and n is any natural number, zn = rn cos(nθ) + irn sin(nθ) This means when we compute zn the result is a complex number with length raised to the power n and rotated by an angle nθ.

Complex Numbers 14 / 19

slide-26
SLIDE 26

de Moivre’s Formula

When z = r cos θ + ir sin θ, and n is any natural number, zn = rn cos(nθ) + irn sin(nθ) This means when we compute zn the result is a complex number with length raised to the power n and rotated by an angle nθ.

  • 20
  • 18
  • 16
  • 14
  • 12
  • 10
  • 8
  • 6
  • 4
  • 2

2 4 6 8 10 12 14 16 18 20

  • 20
  • 18
  • 16
  • 14
  • 12
  • 10
  • 8
  • 6
  • 4
  • 2

2 4 6 8 10 12 14 16 18 20 Powers

z1 = 2 + 2i → |z| = 2 √ 2, θ = π 4 z2

1 has r2 = (2

√ 2)2 = 8, 2θ = π 2 z3

1 has r3 = 8

√ 8 and 3θ = 3π 4

Complex Numbers 14 / 19

slide-27
SLIDE 27

Multiplying complex numbers

If z1 = r cos(θ) + i sin(θ) and z2 = s cos(ψ) + is sin(ψ), one can show (using trig identities) that z1z2 = rs cos(θ + ψ) + irs sin(θ + ψ) lengths are multiplied and angle arguments are added

Complex Numbers 15 / 19

slide-28
SLIDE 28

Segments in the complex plane

z1 = 2 + 3i z2 = 6 + 5i

1 2 3 4 5 6 7 1 2 3 4 5 6 7 z1 z2 z2 − z1

Complex Numbers 16 / 19

slide-29
SLIDE 29

Segments in the complex plane

z1 = 2 + 3i z2 = 6 + 5i, 1 2(z2 − z1) z1 + 1 2(z2 − z1)

1 2 3 4 5 6 7 1 2 3 4 5 6 7 z1 z2 z2 − z1 1 2(z2 − z1) z1 + 1 2(z2 − z1)

Complex Numbers 17 / 19

slide-30
SLIDE 30

Chaos game

  • 0.5

0.5 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Rules

1

Color each vertex of an equilateral triangle with a different color.

2

Color a six-sided die so that 2 faces are red, 2 are yellow and 2 are blue

3

Choose a random starting point inside the triangle (this rule may be relaxed)

4

Roll the die.

5

Move half the distance from the seed towards the vertex with the same color as the number rolled.

6

Roll again from the point marked, move half the distance towards the vertex of the same color as the number rolled.

7

Mark the point, repeat.

Complex Numbers 18 / 19

slide-31
SLIDE 31

Chaos game

Generalize the chaos.m script to a 5 sided die and a regular pentagon with coordinates 0 + i −1 4

  • 10 + 2

√ 5 + 1 4( √ 5 − 1)i −1 4

  • 10 − 2

√ 5 − 1 4( √ 5 + 1)i 1 4

  • 10 − 2

√ 5 − 1 4( √ 5 + 1)i 1 4

  • 10 + 2

√ 5 + 1 4( √ 5 − 1)i

Complex Numbers 19 / 19