1 00:00:02,490 --> 00:00:03,260 Welcome back. 2 00:00:03,260 --> 00:00:06,620 Today we're going to be doing part two of the Complex Numbers section. 3 00:00:06,620 --> 00:00:11,000 In this section, we will be doing a review of the complex numbers arithmetic 4 00:00:11,000 --> 00:00:12,150 as well as present a couple of 5 00:00:12,150 --> 00:00:14,910 useful identities for working with complex numbers. 6 00:00:14,910 --> 00:00:16,970 In the previous lesson, we graphed complex numbers on the 7 00:00:16,970 --> 00:00:20,980 complex plane, we did conversions from rectangular to polar format. 8 00:00:20,980 --> 00:00:23,530 And we talked about complex conjugates and how to find them. 9 00:00:24,600 --> 00:00:27,840 In this lesson we will adding, subtracting, multiplying, and dividing 10 00:00:27,840 --> 00:00:28,700 complex numbers. 11 00:00:28,700 --> 00:00:30,120 And then using Euler's Identity 12 00:00:30,120 --> 00:00:32,730 to simplify working with trigonometric identities. 13 00:00:34,150 --> 00:00:37,920 First of all, adding complex numbers. If I have z1 and add it to z2. 14 00:00:40,020 --> 00:00:42,620 We can just basically say what we're going to do is add the real 15 00:00:42,620 --> 00:00:47,610 parts and the imaginary parts individually and then put them together in this form. 16 00:00:47,610 --> 00:00:51,000 And we can do this because the real part and the imaginary parts are orthogonal 17 00:00:51,000 --> 00:00:55,140 to each other, so it makes it possible for us to do math this way. 18 00:00:55,140 --> 00:00:57,800 There's also a graphical representation that we can look at. 19 00:00:57,800 --> 00:01:01,328 If I have two vectors, here the red vector is 1 plus j2 and the blue 20 00:01:01,328 --> 00:01:05,200 vector is minus j, ore minus 3 plus j, and we want to add them together. 21 00:01:06,220 --> 00:01:09,190 Graphically, it's the same thing as taking one of these vectors 22 00:01:09,190 --> 00:01:11,290 and sticking it on the tail end of the other vector, 23 00:01:13,360 --> 00:01:13,860 like this. 24 00:01:15,650 --> 00:01:17,530 Or equivalently taking the blue vector and sticking it 25 00:01:17,530 --> 00:01:19,330 on the tail of the red vector like this. 26 00:01:21,540 --> 00:01:25,470 And then finding where we get those, where we 27 00:01:25,470 --> 00:01:28,410 end up, at the point where they kind of converge. 28 00:01:29,610 --> 00:01:32,590 And, so that would be this point shown by the green. 29 00:01:32,590 --> 00:01:35,150 If we look at the mathematical formula, doing the 30 00:01:35,150 --> 00:01:38,344 arithmetic, we do 1 minus 3 gives us minus 31 00:01:38,344 --> 00:01:43,540 2, j2 plus j gives us min, plus 3j, and so that corresponds to the value in green. 32 00:01:43,540 --> 00:01:47,320 So our graphical representation matches up with our arithmetic calculation. 33 00:01:48,990 --> 00:01:51,430 If you want to multiply complex numbers, first of all 34 00:01:51,430 --> 00:01:55,230 we'll expand this out, it's the a plus jb formats. 35 00:01:55,230 --> 00:01:58,970 If we do this in rectangular form, we need to use the distributive property. 36 00:02:00,270 --> 00:02:09,000 So what we see is we get a1 times a2 plus jb1 times a2 plus a1 times jb2. 37 00:02:09,000 --> 00:02:14,570 So all of these things this b1 a2, is right here. 38 00:02:14,570 --> 00:02:20,100 This a1 b2 is here. And then we have, j times j, b1 times b2. 39 00:02:20,100 --> 00:02:23,110 And so that j squared actually ends up being a negative 1. 40 00:02:23,110 --> 00:02:25,940 So the real part becomes a1, a2 minus b1, b2. 41 00:02:25,940 --> 00:02:29,930 And the imaginary part is j times a1, b2 plus b1, a2. 42 00:02:29,930 --> 00:02:33,412 This is a little bit of work. 43 00:02:33,412 --> 00:02:37,160 And perhaps a little bit difficult to memorize. 44 00:02:37,160 --> 00:02:39,850 But let's go and see kind of what multiplication means 45 00:02:39,850 --> 00:02:40,920 in complex numbers. 46 00:02:40,920 --> 00:02:46,810 So if I have some vector like this and I multiply it by 2 what I'm doing is I'm 47 00:02:46,810 --> 00:02:48,885 multiplying the real part and the imaginary part by 48 00:02:48,885 --> 00:02:52,160 2, which means that basically I am doubling the length. 49 00:02:53,340 --> 00:02:54,270 I guess I should use a different color. 50 00:02:56,230 --> 00:02:57,500 The result is doubling the length. 51 00:02:57,500 --> 00:03:00,320 If I did it by one half, it would be one half length. 52 00:03:01,430 --> 00:03:04,961 Well now suppose that I multiply this, 53 00:03:04,961 --> 00:03:07,260 this black vector by a j. 54 00:03:07,260 --> 00:03:09,140 So now I'm taking the real part and multiplying 55 00:03:09,140 --> 00:03:11,220 it by a j, so now it becomes an imaginary. 56 00:03:11,220 --> 00:03:14,240 I'm taking the imaginary part and multiplying it by a j. 57 00:03:14,240 --> 00:03:17,680 So now it becomes a negative real part. So it ends up being, 58 00:03:20,750 --> 00:03:24,170 a vector of the same magnitude was the black one 59 00:03:25,640 --> 00:03:29,390 but we've rotated it by 90 degrees or by pi halves. 60 00:03:30,950 --> 00:03:33,260 And this is essentially what we see when we multiply complex 61 00:03:33,260 --> 00:03:36,249 numbers and I take two complex numbers and multiply them together. 62 00:03:37,715 --> 00:03:39,840 Is can be more easily seen in polar format. 63 00:03:40,890 --> 00:03:44,200 We're scaling it by multiplying the magnitudes together. 64 00:03:44,200 --> 00:03:45,860 And then we're doing a rotation by adding 65 00:03:45,860 --> 00:03:46,290 the phases. 66 00:03:46,290 --> 00:03:50,330 And we can see why that is if we actually go back to what this means. 67 00:03:50,330 --> 00:03:59,250 This is A1 times e to the jth theta 1, times A2 e to the j theta 2. 68 00:03:59,250 --> 00:04:04,690 Multiplying this together we get A1 times A2, times e to the j theta 1 times e to 69 00:04:04,690 --> 00:04:08,050 the j theta 2, which if, since I'm multiplying 70 00:04:08,050 --> 00:04:11,010 2 things with the same base, we can just add 71 00:04:11,010 --> 00:04:15,840 the exponentials. So it's e to the j theta 1 plus j theta 2. 72 00:04:15,840 --> 00:04:20,430 So I can factor out the j, either the j theta 1 plus theta 73 00:04:20,430 --> 00:04:25,130 2, which if I put it into polar form it looks just like that. 74 00:04:26,170 --> 00:04:29,200 So we see the multiplication basically is just stretching or, or, 75 00:04:30,305 --> 00:04:34,110 compressing the, the length of the vector as well as the rotation. 76 00:04:36,030 --> 00:04:38,400 Now suppose I want to subtract complex numbers. 77 00:04:38,400 --> 00:04:42,520 Well subtraction is basically the inverse of multiplication or, we can take 78 00:04:42,520 --> 00:04:45,330 the second term and multiply by negative 1 and just add them together. 79 00:04:46,800 --> 00:04:48,960 So, to better understand what's going on here, we need 80 00:04:48,960 --> 00:04:50,920 to know what it means to multiply by a negative 1. 81 00:04:50,920 --> 00:04:53,760 Well if I have a vector coming out like this, you can 82 00:04:53,760 --> 00:04:56,430 look at the negative, multiplying by negative one one of two ways. 83 00:04:56,430 --> 00:04:58,070 We're either taking this amplitude and making it 84 00:04:58,070 --> 00:05:00,060 a negative amplitude in the same direction, theta, 85 00:05:01,360 --> 00:05:05,960 which brings us over like this. Or, we could look at it as multiplying it 86 00:05:05,960 --> 00:05:12,470 by j twice, which means that I'm taking this and rotating around by 90 degrees. 87 00:05:15,090 --> 00:05:18,140 One time and two times. And that will give us the same result. 88 00:05:19,820 --> 00:05:21,250 So what, basically what we're going to be doing, is 89 00:05:21,250 --> 00:05:23,750 taking this vector, and flipping it around over the axis. 90 00:05:26,660 --> 00:05:29,600 So arithmetically all we're doing is taking the real part of 91 00:05:29,600 --> 00:05:32,000 the first term and subtracting the real part of the second term. 92 00:05:33,320 --> 00:05:35,410 And do this, and doing the same thing with the complex terms. 93 00:05:37,640 --> 00:05:40,610 Graphically, if I have this vector I'm going to need to take this 94 00:05:40,610 --> 00:05:44,140 vector, flip it across the axis which is multiplying it by the negative 1. 95 00:05:44,140 --> 00:05:47,670 And then we'd just use the same addition where we put 96 00:05:47,670 --> 00:05:51,150 the, the vectors on the ends to find where we correspond. 97 00:05:51,150 --> 00:05:57,365 And so the corresponding point here is 1 minus negative 3 98 00:05:57,365 --> 00:06:03,582 gives us 4 and then 2 minus 99 00:06:03,582 --> 00:06:06,590 1 gives us 1. 100 00:06:06,590 --> 00:06:08,470 Now, lets look at dividing complex numbers. 101 00:06:08,470 --> 00:06:10,860 Again, we can do it using the rectangular format. 102 00:06:10,860 --> 00:06:14,080 But what we need to typically do when we're dividing complex 103 00:06:14,080 --> 00:06:17,690 numbers is to get rid of the complex terms in the denominator. 104 00:06:17,690 --> 00:06:21,410 And we do this by multiplying by the complex conjugate of the bottom. 105 00:06:22,750 --> 00:06:28,915 So, what we're doing is doing a2 minus jb2 divided 106 00:06:28,915 --> 00:06:33,310 by a2 minus jb2. This is 107 00:06:33,310 --> 00:06:37,920 just a fancy way of multiplying by one. But we're doing it in a creative way 108 00:06:37,920 --> 00:06:44,560 because when we do this, this a2 plus jb2 becomes a2 squared plus b2 squared. 109 00:06:44,560 --> 00:06:49,500 And since a and b are real value things, the denominator is now purely real. 110 00:06:49,500 --> 00:06:54,160 And then we can find that this is the real part and this is the imaginary part 111 00:06:54,160 --> 00:06:55,089 of doing this calculation. 112 00:06:56,220 --> 00:06:59,040 But once again not particularly intuitive and it turns out 113 00:06:59,040 --> 00:07:01,400 that again it's easier to do in the polar format. 114 00:07:02,560 --> 00:07:06,260 So if I have A1, angle theta 1, and A2, angle theta 2, 115 00:07:06,260 --> 00:07:09,880 we get A1 over A2 with an angle of theta 1 minus theta 2. 116 00:07:09,880 --> 00:07:12,730 And again you can see this if we go back to the exponentials. 117 00:07:12,730 --> 00:07:19,450 And multiply the exponentials together, we'll see that this is going to give 118 00:07:19,450 --> 00:07:25,470 us a result equal to A1 over A2, e to the j theta 1 minus theta 2. 119 00:07:25,470 --> 00:07:29,070 Corresponding to this polar equation right here. 120 00:07:29,070 --> 00:07:31,310 So it turns out that typically what's going to 121 00:07:31,310 --> 00:07:34,350 be easiest is any time you're adding or subtracting. 122 00:07:34,350 --> 00:07:36,860 Put the value into rectangular format. 123 00:07:36,860 --> 00:07:38,390 And then combine the real and imaginary 124 00:07:38,390 --> 00:07:41,700 terms, add them, respectively, and get your result. 125 00:07:41,700 --> 00:07:45,200 If you're multiplying or dividing, it's typically easier 126 00:07:45,200 --> 00:07:49,160 to go through and put them into polar form, do your calculation. 127 00:07:49,160 --> 00:07:51,890 And then if you want them in rectangular form, you can convert back. 128 00:07:55,330 --> 00:07:56,570 Couple of useful identities. 129 00:07:56,570 --> 00:07:59,370 First of all, if I take a number, a complex number, multiply it by 130 00:07:59,370 --> 00:08:01,880 its complex conjugate, I'm going to get 131 00:08:01,880 --> 00:08:06,050 the amplitude of that value quantity squared. 132 00:08:06,050 --> 00:08:08,760 And the reason the, that occurs is if I look 133 00:08:08,760 --> 00:08:14,640 at the calculation a plus jb times a minus jb. 134 00:08:16,090 --> 00:08:20,710 This gives us, a squared plus b squared since 135 00:08:20,710 --> 00:08:27,220 the a bj term here and the minus j times ab term here 136 00:08:27,220 --> 00:08:32,010 cancel each other out, and then the minus 1 and the two j's give us a positive 1. 137 00:08:32,010 --> 00:08:34,930 And if we look at this graphed on the plane, 138 00:08:37,580 --> 00:08:42,380 this is the real part a, and the imaginary part b. 139 00:08:42,380 --> 00:08:46,796 Well the length of this leg here c, we can calculate using 140 00:08:46,796 --> 00:08:52,500 Pythagorean Theorem a squared plus b squared is equal to c squared. 141 00:08:54,060 --> 00:08:56,040 Well this a squared plus b squared has to be equal to c 142 00:08:56,040 --> 00:09:01,370 squared where it turns out that c is the length of the vector. 143 00:09:01,370 --> 00:09:03,386 The, or the absolute 144 00:09:03,386 --> 00:09:07,770 value, or the modulus of z quantity squared. 145 00:09:09,900 --> 00:09:12,370 Couple of other useful things is, if I want to find the real part of z, 146 00:09:12,370 --> 00:09:16,680 I can do that by taking z, adding its complex conjugate, and dividing it by 2. 147 00:09:16,680 --> 00:09:19,300 Because a plus jb, 148 00:09:22,140 --> 00:09:26,490 plus a minus jb divided by 2. 149 00:09:26,490 --> 00:09:29,250 Well, we have these two a's, and the jb 150 00:09:29,250 --> 00:09:31,450 here and the minus jb here cancel each other out. 151 00:09:31,450 --> 00:09:32,920 So this gives us a. 152 00:09:34,260 --> 00:09:35,200 You can do the same thing for the 153 00:09:35,200 --> 00:09:37,440 imaginary terms, except now this is a minus. 154 00:09:38,960 --> 00:09:42,070 So now the a's cancel each other out, this becomes minus 155 00:09:42,070 --> 00:09:47,840 j2b, and so you divide it by the j2, and that 156 00:09:47,840 --> 00:09:48,950 cancels out to give you b. 157 00:09:51,100 --> 00:09:54,410 These can be useful in and of themselves, but one place that 158 00:09:54,410 --> 00:09:58,790 they find particular use is when we want to work with trigonometric functions. 159 00:09:58,790 --> 00:10:00,900 Instead of dealing with trigonometric functions 160 00:10:00,900 --> 00:10:03,690 directly, we can use complex exponentials. 161 00:10:04,720 --> 00:10:08,950 And this can be really handy because you might remember from learning trigonometry. 162 00:10:08,950 --> 00:10:11,320 There are all of these identities and you can never remember 163 00:10:11,320 --> 00:10:14,630 exactly the identities that were being used and where they came from. 164 00:10:14,630 --> 00:10:16,303 Well, if I looked at 165 00:10:16,303 --> 00:10:21,450 either the j theta we know that either the j theta is equal to the cosine 166 00:10:21,450 --> 00:10:27,270 of theta plus j times the sine of theta, which is Spoilers identity. 167 00:10:27,270 --> 00:10:28,340 If I want the real part, 168 00:10:30,700 --> 00:10:31,660 it's cosine of theta. 169 00:10:31,660 --> 00:10:33,300 So the cosine of theta is the real part of this. 170 00:10:33,300 --> 00:10:37,320 So all we need to do is take this, add its complex conjugate and divide by 2. 171 00:10:37,320 --> 00:10:39,650 So cosine of theta could be e to the j 172 00:10:39,650 --> 00:10:42,090 theta plus e to the minus j theta, divided by 2. 173 00:10:42,090 --> 00:10:42,590 You're 174 00:10:44,740 --> 00:10:47,750 going to do the same thing to define sine of theta, just using the other side. 175 00:10:48,800 --> 00:10:51,700 And to give an example of the way this can be useful, 176 00:10:51,700 --> 00:10:58,500 suppose that I wanted to calculate the cosne of theta quantity squared. 177 00:10:58,500 --> 00:11:00,570 This is, an identity. 178 00:11:00,570 --> 00:11:01,940 It's very useful. 179 00:11:01,940 --> 00:11:05,740 But a lot of people forget what this equals off the top of their heads. 180 00:11:07,030 --> 00:11:08,820 Well we can actually use this to find out. 181 00:11:10,030 --> 00:11:14,960 So this is going to be equal to e to the j theta plus e to the minus j theta 182 00:11:16,200 --> 00:11:21,620 divided by 2, times, got again, e to the j theta, 183 00:11:21,620 --> 00:11:26,810 plus e to minus j theta, divided by 2. 184 00:11:26,810 --> 00:11:30,340 So using the distributive law, you get e to the j theta 185 00:11:30,340 --> 00:11:34,100 times e to the j theta is e to the j 2 theta, 186 00:11:35,550 --> 00:11:40,220 e to the j theta times e to the minus j theta, is equal to 0. 187 00:11:40,220 --> 00:11:44,530 Which is 1, e to the minus j theta and e to the j theta again gives us 1. 188 00:11:44,530 --> 00:11:47,370 And then e to the minus j theta times e to the 189 00:11:47,370 --> 00:11:51,340 minus j theta is equal to e to the minus j2 theta. 190 00:11:51,340 --> 00:11:55,523 And on the bottom we have 2 times 2, which is 4. 191 00:11:57,060 --> 00:12:00,580 So splitting this up a little bit, we see that we have two right 192 00:12:00,580 --> 00:12:01,760 here that we can put together. 193 00:12:01,760 --> 00:12:06,830 So 2 over 4 is one half plus, and then here, this 194 00:12:06,830 --> 00:12:10,530 e to the j2 theta and e to the j2 theta, over 4. 195 00:12:10,530 --> 00:12:14,380 So that is actually equal to one half times e to 196 00:12:14,380 --> 00:12:17,590 the j2 theta plus e to the j2 theta divided by 2. 197 00:12:17,590 --> 00:12:20,480 And going back to here, we see that that's 198 00:12:20,480 --> 00:12:22,896 just going to be the cosine of 2 times theta. 199 00:12:22,896 --> 00:12:25,808 So it turns out that the cosine of theta 200 00:12:25,808 --> 00:12:32,490 quantity squared is equal to one half plus one half cosine of 2 times theta. 201 00:12:32,490 --> 00:12:33,320 So you might not have been able to 202 00:12:33,320 --> 00:12:36,450 remember the trigonometric identity but converting it into these 203 00:12:36,450 --> 00:12:38,190 exponential terms and doing it a little bit of 204 00:12:38,190 --> 00:12:40,635 algebra allows you to derive them on your own. 205 00:12:40,635 --> 00:12:43,550 An, and some exercises to go back and look at trigonometric 206 00:12:43,550 --> 00:12:47,030 identities and see if you can derive them using this complex calculation. 207 00:12:48,390 --> 00:12:51,640 So this shows another example of why complex numbers can be useful. 208 00:12:51,640 --> 00:12:54,180 In summary, we demonstrated arithmetic operations with complex 209 00:12:54,180 --> 00:12:56,990 numbers and even provided a couple of useful identities. 210 00:12:56,990 --> 00:12:59,290 Hopefully the material covered here on complex 211 00:12:59,290 --> 00:13:01,750 numbers is a useful reference for you. 212 00:13:01,750 --> 00:13:05,190 You will be using it extensively in the other modules in the 213 00:13:05,190 --> 00:13:09,870 course, since complex numbers are a very important part of electrical engineering. 214 00:13:09,870 --> 00:13:12,800 As always, if you have any questions on the material that's covered here, 215 00:13:12,800 --> 00:13:14,480 go to the forums and good luck 216 00:13:14,480 --> 00:13:16,780 using complex numbers in your calculations, farewell.