So, so let's talk about complex numbers. I cannot emphasize enough how important complex numbers are in electrical engineering, It's really important, it's really fundamental, and we're going to exploit the properties of complex numbers in ways I think you're very surprised to see. So, as always we're going to define what a complex number is. We'll then learn how to add, subtract, multiply and divide them, and then we're going to go into the important topic of the two different ways of writing complex numbers. It's called Cartesian and Polar forms. Okay, so let's define a complex number, and this definition, I think, is a little different than you may be used to. A complex number is an ordered pair of numbers. So, a and b, an ordered pair. Now, what the ordered term means is that a, b does not equal b, a. The order matters. They're not the same thing. And similarly, if you have two complex numbers that equal each other, what that means is that a equals c and b equals d. So that's the, what the ordering has to do with things. And now we need to figure out how to do arithmetic with these numbers, what the rules of algebra are for, for them. And lets start with multiplying a complex number by a scalar. And so, when you do that, what you do is you multiply each component, the a and b component by the same scalar. Okay. I think that makes a lot of sense. If you add them, it's the same as adding the components of the 2 complex numbers. Again, keeping them separate. I think that follows. What isn't so obvious is where, where the multiplication and reciprocal formulas come from. Well it turns that these are absolutely the right algebraic rules to use when multiplying and dividing and we'll see what that is in just a second. But first, I want to point out something. This notation a comma b you should have seen before in analytic geometry. That's how you put notation you use to represent the location of a point in the plane. So here we have a point and this is its location in the plane. Its x component is a, its y component is b and this is just standard notation and this also helps explain why the 2 components are kept separately in this geometric interpretation. We're going to call the x component the real part, we're going to call the y component the imaginary. Okay, and that's just terminology, but where it comes from, is the following interpretation of the complex number. We're going to write a complex number in the following way. a plus jb. J is an indicator of which one is the Y component, which one is up. So, this a plus jb means I can get to this point in the plane by going out a along the real part axis, the x axis, if you will, and then going up b units in the y direction, the imaginary part direction. And so, this j simply represents which way is the vertical, the y component direction. Okay, so this is an interesting way of writing a vector sum, that's all it is. The fun comes when you define that indicator j to be the square root of minus 1. That's where things get interesting, and this helps us figure out where those multiplication and division rules came from Before I get into that, I have to point out, and you should be a little curious, why is j used to represent the square root of mnus 1. You, you probably learned it as i was the square root of minus 1. And it's true for world other than electrical engineers use i for the square root of minus 1. But not electrical engineers. We're special, we use j and there's a historical reason for that. It turns out at the beginning of the 19th century, the French physicist Ampere wrote a fundamental paper on the mathematical physics of electricity and he referred to current as [FOREIGN], for expressing how much current was flowing. And so he used the symbol i for current. So, according to him, i is the same as current. Well, it was toward the end of the 19th century that the importance of complex numbers came up, and so we can't use i because electrical engineers throughout the 19th century were using i for current, so we use the next letter in the alphabet. So, it's only electrical engineers that use j for the square root of minus 1. So, since you're in this course, you're going to use j over the square root of minus 1. And all I can say is, welcome to the electrical engineering club. You are now, an electrical engineering, if you use j for the square root of minus 1. Fun to be in this exclusive group, of really cool people. Okay, so, lets go back and, look at our, arithmetic rules before, in the light of thinking about this a plus jb, a vector sum. So, now multiplication by a scalar. Well, things still make sense. If you have a scaler multiplying a sum, well, the scalar multiplies each term in the sum. When you have a sum of sums, you just add them all up, and then we're going to group them by their x, and y components, there a real part, and they're measuring for our components. That makes perfect sense. Now the multiplication rule is going to come up and make a whole lot more sense. So, you have a product of 2 sums. Well just use your normal algebraic rules, that you already know. So, A1 times A2, That's A1A2, of course, and then you get A1 times jB2. Well, that's this, that's fine. So, now let's say jB1 times A2 There's that term. That's fine, and the interesting one is jb1 times jb2. Now, rearranging that multiplication a little bit, that's got to be j squared times b1, b2 of j squared is the square, the square root of minus 1, that's minus 1, which means that's where this term comes from, so in order to use the regular rules of algebra, when you represent complex numbers in this kind of vector form, this has to be the multiplication So now where this reciprocal rule comes from, you're going to have to wait a little bit. I'll get to that in just a second. Well, now we come to one of the most important results mathematical results for this course called Euler's Formula. Euler was an 18th century mathematician, the best and most famous mathematician after Newton. And he noticed the following formula. So take an exponential, e to the cx, and write it in Taylor series. And what Euler wondered was, what is, what happens when c is the square root of minus 1, it is, j. Well, he didn't know what e to the jx was, but one way of looking at it is to use the Taylor series formula and see what you get. So here are the calculations that he made. So he just plugged in j for ce, everywhere in the formula, and just did the usual rules that we just talked about. So let's look at the even powered terms. 1 is 1, okay. This term, that's j squared times x squared. Well j squared is minus 1, so that's where this term comes from. j to the 4, that's j squared times j squared, so that's plus 1. So that's where that term comes from. Okay, let's look at the odd powered terms. j x, okay, there's j x. j cubed is j times j squared. So that's j times minus 1. So we get a minus x cubed term here. So, I think you can continue this on and what the Taylor series says is that the real part, the part with the x component consist of all of the Even powered terms, with an alternating sign. The imaginary part, consists of the odd powered terms, with an alternating sign. Well, low and behold Euler noticed, right away, because he's a smart mathemetician That it has to be true, that e to the jx is cosine x plus j sine x. Because that is the Taylor series for cosine. And that is the Taylor series for sine. It has to be true of all, everything is going to work together and hang together, and be a coherent mathematical formulation. So, and say another way, he showed that re to the j theta, has to be r cosine theta times jr sine theta. Well that should be very strike a familiar note, cause this looks like polar form. Remember this is a plus jb. Hmm, that sure looks like a polar form, and sure enough, you go back to geometry, that's exactly what it is. So, here's our representation of a point in a plane, using the regular ordered pair notation, which you can also think about a point in the plane in polar form. so there is a distance from the origin, the point is some distance from the origin, and at some angle. Well we know how to convert between the two. We know that the a component, the x component, is r cosine theta, and that the vertical component, the y component, the imaginary component here is r sine theta. So that's where the rule I derived on the previous slide, is all consistent with this. All consistent with this geometric picture of representing something Cartesian coordinates or polar form. It turns out to hop between the two, Euler's formula had better be true or else something is very very wrong. So, you know, from your geometry that you find the radius, just by using the Pythagorean theorem, and the angle is just the arc tangent of the ratio of the y and x components. Okay, so, we now have 2 ways of representing the same complex number. One is Cartesian form, a plus jb. One is Polar form, re to the j-theta and these rules are how you would go from one to another. Go from Polar form back to Cartesian using these rules, go from Cartesian form to Polar form using these rules. And we're going to do that a lot. It turns out that certain calculations are better done in one form than another, and you need to be able to go back and forth, and these are the rules that they come from. But these aren't just arbitrary rules, they have to do with the geometry of the 2 d point, Okay, well now this might help explain how some of these weird and [INAUDIBLE] multiplication and reciprocal rules come from. Well let's check multiplication rule when things are written in polar form. So we have two polar form complex numbers, and a little bit of rearrangement gives us this. And note that you're multiplying 2 exponentials together, their exponents add. So that's where this comes from. Okay, well. This is just a special, form. I'm going to convert it to Cartesian form using our rules. Okay, that's where that comes from. And now I'm going to use the cosine of a sum of angles, and the sine of a sum of our angles, formulas that you'd learn in trigonometry. So, that's where this is. This term corresponds to the cosine of the sum of angles, and this turn, comes from the sine of of a sum of angles, and we're using the J to keep us, straight about which one goes where. And I've rearranged things a little bit to put the r1 with theta 1, and the r2 with the theta 2. Well, identifying terms, that is just a 1, that's just a 2, etc., and sure enough we come up with the same application that we derived for Cartesian form. So that's, that works fine. Now the reciprocal rule can be derived rather easily. So we're writing Z in, in polar form, that's going to be that whole reciprocal of an, this is 1 over r times e to the minus j theta, because, e to the x, and then take the reciprocal of that, why is e to the minus x. So, that, this has to be true. Well, now convert that to Cartesian form. So, e to the j theta is just cosine of theta, I'm sorry, cosine of minus theta is cosine of theta That's where that comes from. The sine of minus theta is minus the sine of theta, and that's where this comes from. So, that's really quite nice, and now you see where this comes from, because if I multiply top and bottom of this expression by r, we see that R cosine theta, well that's A, and R sine theta is E, and R squared is just A squared plus B squared. So that's where that reciprocal rule comes from. It's most easily derived in polar form, and now everything hangs together. We now understand all the algebra that there is. Now there's one special thing that comes up in complex numbers, which is a new thing, and that's the complex conjugate. It's a very easy operation, but it's not algebraic. So, the complex conjugate of z, which we denote by z star, what it does is it flips the sign of the imaginary part. So, z is equal to a plus jb and z conjugate is a minus jb. In Cartesian form, and in polar form, what that does is it changes the sign of the angel, flips it, and that's what the conjugate is. And the conjugate, it turns out, is mathematically important because of following reasons. You can now use, say that z times e conjugate is equal to the radius squared. So, that was e times e conjugate, well that's just squared. So you can derive, if you will, from R, just from looking at Z. And also, we can define what's called the magnitude of a complex number, is equal to r. So, another word for the radius is called the magnitude, and the magnitude squared is just r squared is z times. Z conjugate. It's this formula that's going to be very, very important for us, in talking about, complex numbers mathematically. You can also express the real part and imaginary parts, of a complex number using the com, the complex conjugate. So, the real part of z, which we'll denote by this, the x component, if you will, is equal to z plus z, conjugate. So, that's a pretty easy thing to see. So you have a plus jb. I'm going to add to that a minus jb. Well, when you do that, these, these parts cancel, and you're left with 2 times a, so you divide by 2. And a similar thing happens when you subtract. Now what happens, is that the real parts cancel, and you're left with the two imaginary parts adding, and you have to divide by 2J to get back to B. So this equals a and this equals b. So now we can derive the Cartesian components just by referring to the original complex number, by simply saying real part, and the imaginary part, by saying the imaginary part and get them by using this formula. And that's going to be very useful for us in doing some operations on complex numbers. So, how do you use all this, to do calculations? What I tend to do is add and subtract in Cartesian form, and I multiply and divide in either form. It depends on the details of what I do. I tend to use Polar form especially for division, and you'll see that in a second. And then I convert between the, between Polar and Cartesian form, depending on what's going to be needed. So here's a little example. Suppose we want to divide these two complex numbers. the easiest way to see this, I could use the reciprocal formal, but the easier thing to do, is to notice you can play a little, play a little mathematical trick. So a plus jb divided by c plus jd, I can multiply top and bottom by the conjugate of the denominator. I keep writing v, I don't know why, that's a d. Okay, I'm multiplying by 1. I'm writing 1 in a fancy way. Well, the denominator, is the magnitude squared of that complex number, and then I just have to multiply the two top things together, where you can see where it comes from. Because 5, is 1 squared plus 2 squared, and there's the, conjugate part. And I just multiply them together, and when the smoke clears, you get 3-J. So, that's a, easy way to do a division. In this case in Cartesian form. If it's in Polar form, it's, if these original numbers were in Polar form, I would have stayed in Polar form and just done it kind of like, because it's very, very easy. Now another thing that comes up is the magnitude of a ratio. And what I want to point out is that the magnitude of a ratio is equal to the ratio of the magnitudes. And, I think this is pretty easy to see if you think about this in polar form, you can derive this yourself. So the magnitude of the, numerator is square root of 1 squared plus 1 squared. So you get, 2, square root of 2. And as we've already seen, the square root of 1 squared plus 2 squared is the square root of 5. And so, a magnitude of this come, the number is the square root of 2 over 5, and if you take, you apply, you find the magnitude of this number, which I asked you to do, I think you will get the square root of 2 over 5. And just do better. Alright, so complex numbers, it turns out, are going to simplify our calculations immensely. I cannot stress that enough. It is extremely important for signal and system theory in electrical engineering. Why that is is not obvious yet. Just stay tuned, and we'll get to it very very quickly.