Math Review with Matlab Complex Numbers Complex Math
Math Review with Matlab: Complex Numbers Complex Math S. Awad, Ph. D. M. Corless, M. S. E. E. E. C. E. Department University of Michigan-Dearborn
Complex Numbers: Complex Math Complex Number Math n n n n Rectangular Addition Rectangular Subtraction Polar Multiplication Rectangular Multiplication Polar Division Complex Conjugate Rectangular Division 2
Complex Numbers: Complex Math Complex Addition n n The addition of two complex number z 1 and z 2 gives another complex number Addition of complex numbers is most easily done in Rectangular Form 3
Complex Numbers: Complex Math Addition Example n As an example, the following two complex numbers can be added mathematically and graphically 4
Complex Numbers: Complex Math Matlab Addition n This result can be verified in Matlab » Z 1=2+3 i; » Z 2=4+i; » Z 3=Z 1+Z 2 Z 3 = 6. 0000 + 4. 0000 i 5
Complex Numbers: Complex Math Complex Subtraction n n Similarly, subtraction of two complex number z 1 and z 2 gives another complex number Subtraction of complex numbers is most easily done in Rectangular Form 6
Complex Numbers: Complex Math Subtraction Example n n As an example, the following two complex numbers can be subtracted graphically and mathematically Subtracting z 2 is the same as adding -z 2 7
Complex Numbers: Complex Math Matlab Subtraction n This result can be verified in Matlab » Z 1=3+3 i; » Z 2=2+i; » Z 3=Z 1 -Z 2 Z 3 = 1. 0000 + 2. 0000 i 8
Complex Numbers: Complex Math Polar Multiplication n Multiplication of complex numbers is most easily done in polar form since: 9
Complex Numbers: Complex Math Polar Multiplication n Similarly, the shorthand angle notation can be used to express polar multiplication 10
Complex Numbers: Complex Math Rectangular Multiplication n Multiplication of complex numbers can also be done in Rectangular Form by directly multiplying z 1 and z 2 11
Complex Numbers: Complex Math Multiplication Example n n Multiply the two complex numbers first using the directangular form Then verify the results using the polar version of multiplication. 12
Complex Numbers: Complex Math Direct Multiplication n Direct multiplication in the rectangular form yields: 13
Complex Numbers: Complex Math Polar Multiplication n z 1 and z 2 must first be converted to polar form 14
Complex Numbers: Complex Math Polar Multiplication n Verify that this is same result as rectangular multiplication 15
Complex Numbers: Complex Math Matlab Verification n Verify the multiplication of z 1 and z 2 using Matlab » z 1=3+2 i; z 2=1 -4 i; » mult=z 1*z 2 mult = 11. 0000 -10. 0000 i » r = abs(mult) r = 14. 8661 » theta=angle(mult) theta = -0. 7378 16
Complex Numbers: Complex Math Polar Division n Division of complex numbers is most easily done in Polar Form 17
Complex Numbers: Complex Math Polar Division n Similarly, the shorthand angle notation can be used to express polar multiplication 18
Complex Numbers: Complex Math Polar Division Example n Divide the complex number z 1 by z 2 by hand, then use Matlab to verify the result 19
Complex Numbers: Complex Math Matlab Division » z 1=10*exp(i*60*(pi/180)); » z 2=5*exp(i*30*(pi/180)); Convert to Radians » div=z 1/z 2 div = 1. 7321 + 1. 0000 i » Mag=abs(div) Mag = 2 » Theta=angle(div)*180/pi Theta = 30. 0000 Convert to Degrees 20
Complex Numbers: Complex Math Complex Conjugate n n The Complex Conjugate of a complex number is found by changing the sign of the imaginary portion Complex Conjugate is denoted as z* This is equivalent to negating the angle Corresponds to a reflection of z in the real axis of an Argand diagram 21
Complex Numbers: Complex Math Conjugate Example n Plot the complex number z = 4 + i 2 and it’s complex conjugate z* 22
Complex Numbers: Complex Math Matlab Conjugate n The conj command returns the complex conjugate of a complex number » z=4+2 i; » zconj=conj(z) zconj = 4. 0000 - 2. 0000 i » » » feather(z); hold on feather(zconj, 'r') xlabel('Real'); ylabel('Imaginary'); 23
Complex Numbers: Complex Math Useful Complex Conjugate Relationships Addition Subtraction Multiplication 24
Complex Numbers: Complex Math Rectangular Division n n Division of complex numbers can also be done in Rectangular Form by use of the Complex Conjugate The result is the multiplication of z 1 by the conjugate of z 2 divided by the magnitude of z 2 squared 25
Complex Numbers: Complex Math Rectangular Division n Explicitly worked out, the division is: 26
Complex Numbers: Complex Math Division Example n Divide z 1 by z 2 using the complex conjugate method 27
Complex Numbers: Complex Math Matlab Verification n The previous result is easily verified using Matlab » z 1=4+j; » z 2=2 -3 j; » z 3 = z 1/z 2 z 3 = 0. 3846 + 1. 0769 i 28
Complex Numbers: Complex Math Summary n n n Complex addition and subtraction are most easily done using the rectangular form Complex multiplication and division are most easily done using the exponential polar form The complex conjugate can be used as a tool for implementing division using the rectangular form of complex numbers 29
- Slides: 29