Hello. Welcome again! In the second video of the series, we continue our discussion about complex numbers. In the previous video, we reviewed the different forms for representation of complex numbers. In this video, we are going to talk about the different arithmetic operations and how to execute them. Like real numbers, we can add, subtract, multiply, and divide complex numbers, and in this video we are going to revise how to do those arithmetic operations. So we start with addition and subtraction. To perform addition and subtraction, it is easiest for us to use the number representation in the rectangular form. To remind you, in the rectangular form, a complex number Z is represented as a real part X and an imaginary part Y. So now if I have two numbers I'd like to add or subtract them: Step number one, write each complex number into the rectangular format. In the previous video, we have learned how to go from polar and exponential forms back to the rectangular form. Once I have done so, to perform the addition or subtraction, you add or subtract the real parts together, and then add or subtract the imaginary parts together. And that's it. So for example, if I have these two numbers A + jB I'd like to add it to C + jD, what I need to do is add the real part together (so this is the real part of the output or the result) and add the imaginary parts together (so this gives you the imaginary part of the output result). So now this would be the result of adding these two numbers. Likewise, if you have subtraction, we do exactly the same. You deal with the real part (so I have the real part of the first number minus the real part of the second number) and do the same for the imaginary part (the imaginary part of the first number minus the imaginary part of the second number). Okay, so now you have the real part of the result and the imaginary part of the result. So let's do an example together. I'd like to add these two numbers. So as we do, we add the real parts. Real part is 11, from the other number I have an 8, and then I have a plus here. I'm done with the real part, so plus j (the imaginary part). So the imaginary part of the first number is 5, the imaginary part of the second number is -2. Add these together, we have 19 + j3. So this should be the result of adding these two numbers together. Okay. Let's have another example. I'd like to add these two numbers. Okay, even though they are not explicitly written in one of the popular formats, you can recognize that here I have square root of a negative number, and we know that the square root of a negative number is an imaginary number. So this number here is equal to j√5, and likewise this number here is equal to j√5. And please do not forget that j by definition is our imaginary unit, and this is equal to √-1. Okay. So now these two numbers are 10 + j√5 plus 21 minus (oops) minus j√5. Okay, now to do the addition, you add the real part together. So real part of the first number is 10, from the second number is 21. And then the imaginary part: imaginary part of the first is √5, imaginary part of the second number is -√5. So this cancels with that, so the result is 31. So yes, it may happen that when you add two complex numbers you end up having a real number. So this is what we have here. Okay, now let's go and explore multiplication and division. We start with multiplication. Multiplication is easiest if we use the polar form or the exponential form. So suppose that I have two numbers: Z1 has a magnitude R1 and a phase or angle θ1, and second number Z2 whose magnitude is R2 and angle is θ2. To do the multiplication of Z1 × Z2, you're going to get a new complex number whose magnitude is the multiplication of the magnitude of Z1 and Z2, and the phase of the resultant number as the addition of θ1 and θ2. So in English words: to multiply two complex numbers in the polar format, you multiply their magnitudes to get the magnitude of the result, and you add their angles to get the angle of the result. And by the way, this is also applicable for the exponential format. So if I have these two numbers, the representation of Z1 using the exponential form would be R1e^(jθ1) and Z2 as R2e^(jθ2). So if I like to multiply Z1 times Z2, when I do multiplication here I'm going to end up having R1R2 and then I have two exponentials multiplied together, and when you do multiplication of exponentials you simply add the exponents. So it would be e^(j(θ1+θ2)). So you can see that R1R2 as the magnitude of the result and θ1+θ2 as the angle of the result of multiplication. We can also do the multiplication in the rectangular format. It would be a little bit harder but still feasible. So to do so, we use the FOIL rule as we used to multiply any two entities or any two polynomials before. As a FOIL rule, we do the first, outer, inner, and last. Just a reminder here: to do the first, you're going to get A×C; to do the outer you have A×D; to do the inner you have B×C; and finally do the last which is B×D, and you add them together to get the result. So we can apply that to the case of multiplication of two complex numbers. When we do the first, we're going to get A×C, and then (sorry) we're going to do the first (this A×C), and then the outer we're going to get jA×D, when we do the inner we're going to get jB×C, and then when we do the last we're going to get j²B×D. So this is what we have here. Now remember that j is equal to the square root of -1, and as a result j² is equal to -1. So this term here corresponds to -BD. Okay, so we're going to replace the j² by -1. This is what we have, and now you can see that you have two imaginary components and you have two real components. Add the real together to get the new real part, add the imaginary together to get the resultant imaginary part. Okay. So this is what we're going to do: we combine the real parts together (this would be the resultant real part of the multiplication), add the imaginary parts together (you're going to get the resultant imaginary part of the multiplication). So let's practice that on this number. So I'd like to multiply these two numbers together. So we need to apply first, outer, inner, last. When you do the first, I have 5×4, and then we do the outer I have 5×j, and then when I do the inner I get -8j because 4×-2 gives me -8, and here I have a negative number. Okay, and then when I do the last I have -2×j, this will give me -2j². Okay, so this is what we get. Then we know that j is the square root of -1, so j² is equal to -1. So we replace this j² by -1. Okay, and also we have two imaginary numbers here you can add them together. So 5j - 8j would give you -3j, and when you do substitution of j² with -1, you're going to have a real number here. So you take this real number, add it or subtract it to the other real number, we end up having our result. Okay, you can see this is longer than the polar format or the exponential format, but still feasible to do multiplication in the rectangular form. Now it is worth to take a pause and introduce a definition of complex numbers because this will help us to proceed following. Okay, so one definition that we have in the complex number is the complex conjugate. If you have a number Z, there is a definition for a complex conjugate where the complex conjugate takes the symbol Z*. So when you see the star here, you know that I'm talking about a conjugate of the complex number Z. Given a number Z with a real part X and imaginary part Y, to take the conjugate you simply flip the sign of the imaginary part. So here the imaginary part was plus, you just flip the sign becomes minus, and this defines what we call the complex conjugate. If I have the same number represented in the polar format or the exponential format, to get the conjugate you simply flip the sign of the phase. The slide here gives us the number in the polar format, but we can have the same number in the exponential format Re^(jθ). To get the conjugate of Z, we simply flip or change the sign of the exponent or the phase. Okay, so this is just definition we're going to use this just in a second. Okay, now there is a nice property of a number and its conjugate. When you multiply a number by its conjugate, the result would be always a real number whose value is A² + B², where A is the real part (so we have the real part squared) and B is the imaginary part. So the result of multiplying a complex number by its conjugate would give us a real number whose value is the real part squared plus the imaginary part squared. We can verify that by applying the FOIL rule onto the number and its conjugate. So we need to do the first, you get A². Now when you do the outer and the inner, you're going to get the same exact number which is jAB, but one has a positive sign, the other has a negative sign, and therefore they cancel each other. And finally you do the last which would give you -j²B². Replace j² by -1, so the result would be A² + B². Okay, now if you'd like to do the multiplication using the polar form, you have a number times its conjugate (where is the conjugate here? You change the sign of the phase). When you multiply them together, you're going to get R² with a phase of θ - θ. This is equal to R² with a phase of zero, which is the same as R². So simply this is the magnitude squared. And in fact, if you look at the numbers, this actually matches because if the numbers there is a relationship between the polar and rectangular form: R is equal to √(A² + B²). So if the result here of multiplying a number by its conjugate is A² + B² compared to the definition of R, this result is equivalent to R². Okay, so let's do this example together. I have these two numbers I'd like to multiply. We realize that one number is the conjugate of the other, so you can simply propose the answer as the real part squared plus the imaginary part squared. So this gives you 25 + 4 which is equal to 29. Okay, so this is one easy way to perform the multiplication for a number and its conjugate. Okay, so those are the steps in more details, but you can simply use it now. Another example: if I have a number times its conjugate in the polar format, simply the result would be the magnitude squared. Now let's explore division. Division, like multiplication, would be the easiest if done in the polar format or the complex exponential format. So suppose that I have two numbers: Z1 whose magnitude is R1 and angle θ1, and the second number Z2 whose magnitude is R2 and θ2. To do the division Z1/Z2, you're going to get a new number (still complex number). The magnitude of the result is equal to the magnitude of the first number over the magnitude of the second number, and the phase of the result is the phase of the first number minus the phase of the second number. Same rule applies to the exponential form. So if I have Z1 in the exponential format is R1e^(jθ1) and the second number Z2 in the exponential form is R2e^(jθ2), I'd like to divide Z1/Z2. This is equal to R1e^(jθ1)/R2e^(jθ2). The result would be (okay, I can have number or magnitude) so is R1/R2, and then I have two exponentials one over another. We know that when you divide exponentials you subtract the exponent. So I have e^(j(θ1-θ2)). Let me write it here in more space: e^(j(θ1-θ2)). So in simple words: when you divide two complex numbers, you're going to get a new complex number. When done in the polar format, the magnitude of the result would be obtained by dividing the magnitudes of the two complex numbers that you have, and to get the phase of the result you subtract the angle of the two numbers you are dividing to get the angle of the result. Division is also feasible in the rectangular format, however it is more computationally demanding. So when we have a rational expression we'd like to divide (I have for example A + jB I'd like to divide it over C + jD), okay, so this is a rational number in the complex space. It is easier for us to try to manipulate the denominator such that I have a real number instead, so that I remove the headache or the complexity. One way to do so is to multiply by the conjugate of the denominator. So now this ratio here is one, so I don't affect the result of the division, but when I multiply by the conjugate of the denominator here, this multiplication will give me a real number. So now all I need to deal with is this multiplication problem in the numerator. So let's see that as a problem. I have two numbers I'd like to divide one over another. Of course you can convert them to the polar format and do the division in the easy way - this is one option. Another option is to say okay, let me simplify this fraction by multiplying both numerator and denominator by the conjugate of the denominator, and the benefit of that is that I'm going to simplify the denominator. Okay, so this is what we have here. Now the denominator has the multiplication of two numbers, one is the conjugate of the other, so this is an easy multiplication and this is equal simply to the real part squared plus the imaginary part squared. Then you apply the FOIL rule on the numerator, you do the multiplication. So you have 5×2 gives you 10 (this is the first), and then the outer you have 5×-j (so you get -5j), and then you do the inner (so you have 6j), and finally you do the last you're going to get -3j². So now we did just one multiplication using the FOIL rule. Then simplify that j² is equal to -1. Now you have real part (combine them together), you have the imaginary part (combine them together), and from there you can obtain the result and finally simplify it into this simple form. So you have 13/5 as your real part, you have j/5 as your imaginary part. So this is the result of the division. Okay, let just give you an example in the polar format to show you how easy it is to do the division in the polar format. So if I have a number in the polar format (first number I have), a second number in the polar format, I'd like to get the division. You would simply divide the magnitudes together to get the magnitude of the result, and then subtract the phases. So the new phase would be the phase of the numerator which is 26 minus the phase of denominator which is -18. The result is 45. So in the polar format, division becomes a simple division of magnitudes and a simple subtraction of phases. Okay. So you can do it in the rectangular form, you can do it in the polar form - whichever form you are comfortable with you go with it, but you should be careful with your steps. So in conclusion, in this video we reviewed the different operations that we can apply on complex numbers. Like real numbers, we can do addition, subtraction, division, and multiplication. Addition and subtraction are the easiest when done in the rectangular form, whereas multiplication and division are easiest when done in the polar form. However, we can still use the rectangular form to perform multiplication using the FOIL operation. We can also do division in the rectangular form by first multiplying the rational numbers they have by the complex conjugate of the denominator (both numerator and denominator). This will get us a simple denominator, and then we use the FOIL rule to solve for the multiplication in the numerator.