So, this is lecture what? Lecture 10 and the last thing we saw on the previous lecture I want to remind you real quick what it was, what did we see? We said the finite field with q elements f q is going to be what?  Where do a come from? If q is p power m, a should come from f p. This is a nice way of thinking about the finite field with q elements. And how do you do addition? Addition is very simple. If you have 2 polynomials a of x and b of x, how do you add a of x and b of x? Simple polynomial addition. You add the coefficients and you would add the coefficients modulo p like this. So, addition is very easy, b of x plus b of x is simple polynomial addition. For multiplication you needed a what? Irreducible polynomial of degree m irreducible over which field?  So, the definition of the field includes all these 3 things. It should also include the pi of x. That defines one of the operations. Definition of the field includes the set and the definition of the 2 operations. So, obviously pi of x should also be included because that defines how multiplication is done in this field. So, pi of x is say some pi 0 plus pi m. So, let me rewrite this I am sorry. Pi 0 plus pi 1 x plus so on till.  So, this is an irreducible polynomial. Where do the pi i's come from? f p and this guy has to be irreducible. Can I always do this? Can I always write the coefficient of x power m as 1? Yeah, I can. If it is not 1 what would you do? What would you do? Divide by that coefficient or multiply by the inverse of that coefficient modulo p. So, you know you can always do that. So, what do I know that the coefficient is not 0? Choose it to be degree m. So, I can always make it more nickets now. One degree the leading coefficient can have can be made 1. It is not a problem. What about pi 0? Can pi 0 be 0? It cannot be 0. Yeah, if pi 0 is 0 what happens to this polynomial? It is reducible. You can pull x out. So, pi 0 is not 0. So, even that you know. So, in the binary case if p is 2 what will pi 0 be? 1. Something that is not 0 and binary has to be 1. There is no other choice. So, that is how pi of x would look. So, how do you multiply? Multiplication is done like I pointed out a of x times b of x. This is regular polynomial multiplication and then you would do modulo pi of x. So, what is modulo pi of x? This whole thing will result in r of x where r of x is the reminder when what? a of x times b of x is divided by pi of x. So, how do I know this r of x will belong to f q? So, it will be a polynomial in f p x that is clear and then its degree will be strictly less than m. So, obviously, it will be in f q. So, I will get closer. So, I did not really prove it. I simply said it is very easy is the similar proof as the f p case for what is the proof I am talking about the inverse. How do I know that a x has an inverse? How do I know for every a x there is some other polynomial in f q which when multiplied modulo p this r of x will be what? 1. So, how do I know that? Let us just prove by that argument the same argument I am not going to write that proof down, but the same argument as for why inverse exists in it. So, you multiply by all those things and figure it out. So, what we will begin doing in this class is look at a few examples of these fields then just to get used to how arithmetic is done in this field. So, these are like new numbers you are learning. So, you remember you have been learning about natural numbers, integers, real numbers, rational numbers for how many years now? For your past so many years, you have to use all that experience and learn to use these numbers within a few weeks hopefully. So, for many people it takes more than a few weeks, but hopefully with constant work you can be better than that. So, these are new numbers you have to get used to how to manipulate them, but they are like numbers. You can add, multiply, subtract, divide, you can do everything they are like numbers. You can think of polynomials with them, you can think of matrices with them, you can think of anything else you want with it. It is not a problem. All right. The first example I want to provide is F4. It is one of the simplest example. Can I have the field F4? Yeah, it is a power of a prime. What power is it? 2 power 2. So, I know its characteristic is 2 and the dimension M is 2 again. All those things you can figure out just because I said F4. So, that is the first observation you can make. So, what will it contain now? So, it will contain the polynomial 0, then it will contain the polynomial 1, then it will contain x and 1 plus x. These are its four entries. You can think of its four entries as 0, 1, x, 1 plus x. So, all the polynomials with binary coefficients of degree less than or equal to 1. So, all those polynomials have exhausted. So, you can write it down. Just writing them down is okay. I could have written anything else I want there also. What is crucial in a field? The operations. The operations. What happens when I add any two elements? What element do I get next? That is what is crucial.  I can call it apple, orange, banana if I want. All I have to say is how I add any two things. That is what is crucial. What I call it is just a name. It does not matter. It does not make any difference. So, how do I add? Is addition very clear? I do not have to explain addition at all. I add any two things, it is fine. What about additive inverse? What is the additive inverse of x? What is the additive inverse of x? x itself. You add x to x, you get 0. So, I will simply show a couple of those examples. For instance, if you do x plus 1 plus x, what do you get? 1, okay. So, is that the inverse? It is not the inverse. Remember, the additive identity is what? 0. It is not 1, okay. So, you have to add something to x to get 0. So, you will see that only thing is x. x plus x for instance is 0. In fact, in any field with characteristic 2, what will be the additive inverse of any element? It will be itself. So, characteristic 2 will immediately make that. Characteristic is not 2, then you will have other elements being inverse of each other. Characteristic 2 additive inverse is always the same element, okay. So, okay. So, let us get into multiplication. For multiplication, we need what? What do we need? Okay. So, what is pi of x? So, what degree should pi of x be? 2, okay. So, it should have an x square term. Then it should have a plus 1. And then what can be, what can the remaining 1 be? Okay. x, why does it have to be x? What will happen if it is 0? Yeah, x square plus 1 is not irreducible, right. In fact, x square plus x plus 1 is the only irreducible polynomial of degree 2 with binary coefficient, okay. I think I made that statement even in last class, maybe last class or maybe the previous one, okay. So, you can exhaust all the degree 2 polynomials if you want. And then you will see that x square plus x plus 1 is the only irreducible polynomial. So, there is no other choice, okay. Typically, you will have choice. You will see in the other constructions, see you will have one or two choices. You have to pick one, but in this case, yeah, it is not a big deal. It is not a real choice, but this, yeah. Just feel like you have a choice, like between choosing between Pepsi and Coke, okay. All right. So, okay. So, now that I have pi of x, what should I be able to do? Should be able to add and multiply or now I can multiply, right, right. So, what multiplication do you want me to show first? Pick some element. I am sorry. 1 plus x times x, okay. So, some people want that multiplication, okay. Tell me what is this, okay. So, how do I do this multiplication in this field? I have to multiply and then divide by, divide by what? x square plus x plus 1, okay. If I do the division, what will I get here? What is the quotient? 1. Then there would be x square plus x plus 1. And then when you subtract, this becomes 1. So, what is the reminder? 1. So, x times, 1 plus x times x is 1 in this field, okay. Remember, this is only in this field. Of course, if you say, this is the argument for that. Say 1 plus x times x is 1, people will might laugh at you in other fields, okay. But in this field, 1 plus x times x is 1, okay. So, that is how it works, okay. So, what is the multiplicative inverse of x? 1 plus x. What is the multiplicative inverse of 1 plus x? x, okay. So, you can find all those things. Any other non-trivial multiplication people might be interested in? Yeah. Don't keep thinking of one element times another element. You might have to multiply one element with itself, right. It is an important multiplication. So, you might be interested in x multiplied with itself or 1 plus x multiplied with itself, okay. So, what is x multiplied with itself? x times x is x square. You can do this long division and then you will see this will be x plus 1 or 1 plus x again, okay. Okay, suppose I do 1 plus x times 1 plus x, okay. You will see at the end of the day you will get x, okay. So, there is a shortcut to doing all this without doing the long division. If you remember some rules about that, that might be a little bit tricky. Suppose I give you x power 10, what will you do? You know, suppose I say, what is x power 10? What will you do? What is this? Yeah. So, it seems like you have to do some work, okay. So, or you divide x power 10 by x square plus x plus 1. Do a long division. Ultimately, you will get a reminder. This is not a big deal. You can do one of those two things, okay. But this is a smarter way to do this in this field. This field has more structure than you can imagine, okay. So, for that, let us do x power 3, okay. So, you will see x power 3 will be very surprising. What is x power 3? Okay. What is x power 3? You already know? x square. Let us not jump the gun yet, okay. I am going to ask you to be a little bit more patient, okay. I like the enthusiasm, but please be a little bit more patient. Otherwise, it will steal the thunder from me. I want to be the one saying, okay. So, x power 3, as you have seen immediately, is going to be 1, okay. Okay. All right. That is the, that is one relationship which can be very, very useful in computation. Why is this very useful in computation? If you know, x power 3 is 1. What is x power 6? 1, right. You agree, right? So, you see, I mean, these are new numbers that you are playing around with, but the old rules, many of the old rules you can exploit. You know, if x power 3 is 1, and you know your multiplication is commutative and all that, right. So, all those properties play in. If you do x power 6, you always get 1, because you can write x power 6 as x power 3 times x power 3, okay. What about x power 9? 1 again. So, what will x power 10 be? x, okay. So, you see, if you use that, once you use this, you immediately see x power 10 is x again. You are not really scared at all about writing down x power. Is that clear? Okay. So, what about 1 plus x power 10? What will you do now? So, what do you know? 1 plus x whole power 3 is 1. Oh, so you are using. Okay. So, what he is suggesting is, you know, any element in a group, finite group, raised to the order of the group, size of the group is going to be 1, right. That is something we, I claim. So, any element here raised to the power 3 is going to be 1, okay. So, you can use that and nicely reduce it to 1 plus x, okay. So, maybe that is something you want to do. Okay. So, you can see that will also be true. Okay. There is another thing which I want you to think about, which is again curious here. Okay. So, pi of x, right, I started with pi of x being x squared plus x plus 1. Okay. And I am doing everything modulo x squared plus x plus 1. So, if I take this field elements and evaluate x squared plus x plus 1, what will I get? Okay. If I evaluate x power x squared plus x plus 1, am I allowed to do this? Is that a, is that a legal operation? Can I take x, take x squared? Yeah, I can compute x squared. I know what x is. I can compute x. Then I add 1. What will this be? In a 4, this would be 0.  You know, everything you are doing modulo pi of x. So, pi of x itself should evaluate to 0. Okay. So, this gives you an equation. Okay. It gives you several equations. It gives you, for instance, it tells you x squared in terms of lesser power terms. Okay. So, what is x squared now? Minus 1 minus x. But what is minus 1 in characteristic 2? Plus 1 again. So, this tells me x squared is 1 plus x. Okay. Okay. Is that clear? Okay. And then what is x power 3? 1. Okay. No, I mean x power 3 is 1 independently. You can multiply x squared by x if you want. You would get x plus x squared. Okay. So, what is x power 3? 1 plus x times x. Do you agree? Right. x squared times x. x plus x squared. What is x plus x squared? 1. Okay. So, you will see in my field F4, if I want to write it again and if I want to have easy rules for multiplication, addition and all that, I might as well write my field as 0 1 x x squared and say x power 3 will be 1 and x squared is 1 plus x. Suddenly, you see the field is starting to look better. Somebody might say 0 1 x x squared with these rules looks better than 0 1 x 1 plus x. This field is anyway so small. All these tricks will not make a big difference. Maybe it does not look very different but you will see eventually this kind of tricks will be very, very useful. Okay. So, now these two relations are enough. You can do any computation you want with just these two relations. Okay. So, that is F4 for you. Okay. It is also very common as we go along to use alpha instead of x. Why would you want to do that? Why would you use alpha instead of x? Just to make it sound more mathematical. You know, when you have Greek letters, everything becomes mathematical. It is only Latin letters. You think, okay, it is just English literature. Once you have alphas and betas, you think, okay, I have to pay attention. No. It is not very easy. Okay. So, it is very typical to write everything with Greek letters and alphas are very good choice. People usually use that and then square is 1 plus alpha. Now, do I get a starkingly different field? Obviously, do not. I have just replaced everything with alpha. I am doing everything else in the exact same way. Right. Like I said, I do not even have to say all this. I can simply say instead of 1, I can use any other name I want. Okay. So, that is the abstractness here. My numbers, there are just 4 numbers I have in F4, 0, 1, alpha, alpha square and those are the rules for addition and multiplication. I know I have a field. I can do all these things. Okay. Another reason why you might want to use alpha instead of x is in future, you will want to think of polynomials with F4 as the coefficient. It is a field, right. You can have coefficients as from the field. At that point, if this is also x and then your polynomial is also x, just run into confusion. Okay. So, it is good to move to something else which is nice. So, then you can think of polynomials with F4 as coefficients. So, that is always something good to do. Okay. Alright. So, the next example we will see. What do you want next? What is the next non-trivial F8, right? Everything else would be Fp otherwise. Okay. F8 is the next thing. It is to F8. Okay. Okay. If you were to just list out all the elements of F8, what would you list out? You would have to list out all. So, what, how do you start first? Once you see 8, write it as a prime power, right? 2 power 3. Okay. So, you know characteristic is 2. Okay. And my F8 will actually have all polynomials of degree less than or equal to 2 with coefficients from F2, binary coefficients. Okay. So, it is just a question of enumerating all those polynomials. You simply write all the 3 bit, 3 bit letters and put x and x square in suitable places and you will get that, right? So, how do I do that? Write down all the 3 bit vectors. Okay. And then associate this with the constant term, associate this with the x term or alpha term and associate this with the alpha squared term. Okay. And then you can write down all the polynomials.  Okay. So, that is the quick way of writing down all these polynomials. Okay. Simply write down all the, how many were 3, all the 3 bit vectors. Okay. All the 3 bit numbers and then associate each position with the power of alpha and simply multiply and then write out the things. That is a F8. Okay. All right. So, next I need the primitive, the irreducible polynomial. I am sorry. The irreducible polynomial pi of alpha. Okay. So, I need a polynomial of degree what? Degree 3 irreducible and coefficients coming from F2, binary coefficients, right? That all came from 8 being 2 power 3. Okay. The degree 3 came from that 3. This guy, this is the degree. Okay. So, this tells me the coefficients are binary. Okay. So, you can play around a little bit and you will see there are 2 choices here. I am sorry, alpha power 3 plus alpha plus 1. Okay. Or you can also choose alpha power 3 plus alpha squared plus 1. Okay. You can also choose that. Okay. Okay. We will pick alpha power 3 plus alpha plus 1. Okay. So, as I have been saying all along eventually we will see any 2 fields of the same size are essentially the same. They are isomorphic. So, it should not really matter which pi of alpha I pick here. So, you can just pick the first one you get. Okay. You will see later on if you make an intelligent choice, your arithmetic will get simpler, much simpler. Okay. So, you might want to make that intelligent choice later on. But for now we will just pick this. This is a good enough choice. I know that this is a good choice. Yes. That is not irreducible. If you put alpha equals 0, what do you get? Alpha equals 1, what do you get? 0. So, alpha plus 1 divides that. Okay. Alpha power 3 plus alpha plus 1 is the only, it is an interesting choice. Yeah. There are a lot of them. So, you keep trying randomly one after the other eventually you will quickly find. Okay. No, that is I think that is a pretty good algorithm. It is not a bad algorithm. Converge quite fast. Okay. All right. So, doing computation in large fields is also tough. So, people usually do not try those things. But this is easy. Okay. So, what should we do next? We should try to do some computations. Right. Now, computations here are going to get trickier. Okay. So, you can see already. So, you might say if, for instance, if I say alpha power 9, okay, maybe you are not so upset. Why? Alpha power what? Alpha power 7 you know is 1. So, you can use some easy ideas and get out with alpha power 9. But what about alpha power 6? You cannot do anything with it. Right. You have to go through and actually divide. Right. Okay. So, or maybe 1 plus alpha plus alpha square. Okay. So, maybe raise to the power 6. Okay. How do you, how do you compute this? Okay. What is the brute force way of computing this? Okay. So, if you were to do it directly, you have to actually evaluate this whole thing and then divide by alpha power 3 plus alpha plus 1 and it is getting painful. Right. So, you can see even in F8, doing multiplications is not going to be easy. What about doing additions? Additions is trivial. Right. It is just addition. Keep on adding. There is no problem. Multiplication is going to be tough. Okay. So, the first thing we need to simplify is the following idea. Okay. So, I will show you this one, this one structure that is hidden here which is not immediately visible that will come out if you try this computation. Okay. And that structure is true for all fields. We will see later on. But for now, let us try this computation. Okay. So, I can deal with 0. There is no problem. I can deal with 1. I can deal with alpha. The moment I have till alpha square, there is really no problem. The moment I have alpha power 3, I am running into difficulty. Right. Why? Alpha power 3 is what? Alpha power 3 is not in the field. Right. The way I have written it down, alpha power 3 is not in the field directly. So, I have to divide by alpha power 3 plus alpha plus 1. Right. Of course, I have to do it. It is all degree less. And then what would you get if you divide? This will become alpha plus 1. Right. Do you see that? Okay. So, here you can come to this directly by using simply the identity that pi of alpha will be what? 0 in what? In F8. Right. What is pi of alpha? Alpha power 3 plus alpha plus 1 is 0. You move the other two guys on that side. So, you immediately get alpha power 3 is alpha plus 1. Okay. All you can divide.  If you want alpha power 4, what would I do? What is the best way of doing it? Multiply alpha power 3 by alpha. Okay. I have already done the work to find alpha power 3. I do not want to forget it. Okay. So, I will simply multiply this with alpha. I would get alpha squared plus alpha.  What would you get? Okay. So, you get alpha power 3 plus alpha squared. Okay. Then what would you do for alpha power 3? Okay. I know it is already 1 plus alpha. I have already done the computation. So, I get alpha squared plus alpha plus 1. Okay. Then alpha power 6. What do I do? I multiply alpha power 5 by alpha. Okay. So, alpha power 3 plus alpha squared plus alpha. Then what would I do with alpha power 3? Replace with alpha plus 1. So, I get alpha squared plus 1. Okay. The alpha would cancel. What should happen if I try to compute alpha power 7? I should get 1 because the multiplicative group has size 7. Okay. So, I should get 1, but you can check that. You get 1. Multiply this with alpha. You get alpha power 3 plus alpha, which is 1. Alpha has order. Yeah, yeah. Eventually we will show that. Okay. All right. So, now once you do this computation, I am going to claim that you can do any multiplication very, very easily. Okay. Okay. Once I did this computation once and remember this computation, put it up in some table, I can do any other multiplication very, very easily. The precise reason is what he said. The reason is alpha has order 7 in the multiplicative group. Okay. So, suppose I have to do 1 plus alpha plus alpha squared raised to the power 6. What will I do? My first step is to go here and figure out what power of alpha is equal to 1 plus alpha plus alpha squared. Okay. So, what power of alpha is equal to that? Alpha power 5. So, I know alpha power 5 is the same as that. So, once I do that here, I would get this. Now, I am not scared. Okay. Alpha plus alpha power 5 whole thing raised to the power 6 would be what? Alpha to the power 30. But why am I not scared of alpha to the power 30? I know alpha power 7 is 1. Okay. So, I can immediately reduce it to what? Alpha squared. Right. 28 is going to give me that. And that is in the field. Okay. We won't show it but it can be shown. Okay. Do you see this? Understood? Okay. So, what does this remind you of? This should remind you of something. You have done this long back in your high school, a similar trick to simplify multiplication. What have you done? Okay. In our days, we had to use something called clock stables. What would we do? To find logarithm, right? So, if you have to multiply two nasty numbers, what do I do? I find the power of 10 which is equal to that number, like the two powers of 10. Then once I know what powers of 10 is equal to that number, what can I do? I can simply add the powers and then how do I go back to numbers again? I do the antilog. This is the same thing except that instead of 10, you have alpha. Right? So, even in this numbers, this small set of numbers, this logarithm table mode with base alpha is going to help me. Right? So, it's clear for real numbers that 10, 10 to the power, right? The only problem is with when the numbers become negative, right? 10 power something can never be negative. So, what do you do when it's negative? This one fancy trick your high school teacher might have taught you but you can do it in so many ways. Just forget about the minus and then happily deal with it. Right? So, it's possible to do it. Okay? There are so many other problems with 10 power also. Okay? So, if you want more granularity, you have to do some various tricks. Then you have mantissa, etc. All those problems you don't have here. Okay? So, all those things you don't have. Simple, this base alpha everything is fine. Okay? So, this table is very, very useful. Okay? So, this table to convert elements of f8 into powers of alpha or the log table if you want to call it base alpha is very, very useful in multiplication. I have demonstrated that. Okay? So, let me write down that table formally. Okay? Okay? So, what I have here are two notations for elements of f8. Okay? So, one I will call the polynomial notation. The other I will call power notation. Okay? So, the polynomial notation is what we've been using so far. Okay?  What's the power notation for the same elements? For 0, you don't really have anything. Right? Alpha power nothing will be 0. Alpha is a non-zero element. You can only get 1. Okay? So, 0 many people in for instance, if you had to write a C program for this table, you would denote 0 with some negative number for instance. You would say minus infinity or something. Okay? So, I can say minus infinity. Okay? For 0. Okay? So, it's just notation. Don't think of it as a negative large number. Okay? Alpha power minus infinity, I'll take it to be 0. Okay? Just just notation. I can call it anything else I want. 1 would be 0. Okay? What about alpha? 1. What is 1 plus alpha? 3. What is alpha squared? Alpha squared is 2. Okay? It's already in that form. Okay? Don't keep searching for anything else. Okay? Alpha squared plus 1 is 6. Alpha squared plus alpha is 4, 5. Okay? Okay? So, when people implement finite fields in programs, okay? In computer programs in MATLAB or C or something, they always have this table stored. Table that converts from polynomial notation to power notation. Maybe you think polynomial is not the easiest thing to store in a computer. What would you do then? How would you store these polynomials? Yeah, just the coefficients in what's called a vector notation. Okay? So, what would 0 be? 0 0 1, 0 1 0, 0 1 1, 1 0 0, 1 0 1, 1 1 0, 1 1 1. Okay? So, the vector and the power notation will be stored in the computer or the program that you in which you want to do finite field computations. Computations for F8. Which notation is easy for addition? The vector notation is easy, right? The power notation you would never do logarithms to do addition. Okay? Unless, right? Addition you already know how to do. Okay? So, you do not want to do logarithms for addition. Okay? So, vector notation is easy and simple and direct for addition. You do not want to fool around with it too much. The moment you want to multiply, you are always better off in the power notation. Okay? So, what is 7 in the power notation? Same as 0. Okay? So, since that is there, you can easily do anything you want. Okay? So, that is something. Okay? So far, I have shown this only for F8. Okay? So, you might say, how do I know it holds for F16, F32, F64, right? You never know. Okay? It can be proved. We will maybe see some kind of a proof for that also. Okay? Any questions on this? Because this is very, very essential bread and butter. Okay? So, this is like the addition you learnt in your second standard.  That kind of thing it is. Okay? So, it should be really, really inside your head, right? This notion, how we said that this F8 suddenly becomes power notation, vector notation. This is very basic. Okay? So, I have not shown the real power of this, but at least for F8, you know this is true. Any questions? It is fine. So, okay. So, in this course, we will never really do anything other than characteristic 2. Okay? Characteristic 3 and 5 and all that we will not do. Okay? So, I am going to resist from giving examples from characteristic 3, but if you look at the, look at the assignments, maybe there will be one or two problems on characteristic 3. You can, you can play around with it. It is the same thing. There is nothing, nothing that will change. Okay? It is the exact same thing. We will get very similar ideas, but we will just do characteristic 2 just so that it is, it is simple. Okay? So, I want to do one more example. Third example I want to do is F16. Okay? F16. If I have to write down all the elements of F16, it is going to take some time. Right? So, I have to write down all the 16 elements, 0, 1, alpha, 1 plus alpha. Right?  Right? All polynomials in alpha with binary coefficients of degree less than or equal to 3. All of them will be in F16. Okay? So, how did I get that? I got that because this is 2 power 4. I will come to it. I will come to it. Okay? All right? So, the next thing is how do I select my pi of alpha? Right? What should my pi of alpha be? It should have binary coefficients. And then it should have degree 4. Okay? So, there are 3 choices actually in this case. Okay? The choice that I will pick will be alpha power 4 plus alpha plus 1. Okay? There are 2 other choices both of which are irreducible. The other choices are alpha power 4 plus alpha power 3 plus 1. Okay? What is the relationship between these 2 choices? Are they related? Can you see any relationship? That's too complicated.  Have you seen that trick before with polynomials? With f of x, if you replace f of x inverse and multiply by x part degree, what do you get? What's the effect of that? You must have seen this in Z transform or someplace. What's the effect of that? What does it do to your coefficients? It will do a flip left right. Okay? And you can see easily if one f of x is irreducible, x power degree f of x inverse will also be irreducible. Okay? If this has a root, that will also have a root. Okay? Inverse of that will be the root. Right? You would have done this in your DSP somewhere. Okay? Okay? So, that's there. So, anytime you have irreducible polynomial, its coefficients inverted will also have, flipped around will also have, will also be irreducible. So, they'll come in pairs. Right? There's also one more choice. Okay? So, one more choice, which is a little bit unobvious maybe. Okay? Okay? So, this is also irreducible in f2. Okay? So, you have to, this requires proof.  Is it, is it enough to say, for instance, alpha, alpha equals 0 is not a root and alpha equals 1 is not a root. Therefore, this is irreducible. Is that enough? Why is it not enough? Yeah, you have to also check for degree 2 factors. You can have 2 degree 2 factors for this. So, how will I check for degree 2 factors? You know, there's only one irreducible polynomial of degree 2 and binary coefficients. So, you divide by that and check that it has no degree 2 factors and then you know it is irreducible. It's no problem. Okay? So, you can do that. Now, all these 3 will be irreducible. Of these 2, of these 3, these 2 choices are okay and simple for computation. This choice is a little bit questionable. Okay? So, I'll, it's also, as I said, all the, none of these 3 choices will make any difference to the field. The field you get is actually exactly the same up to isomorphism. But these 2 of the first 2 choices will give you an obvious simplification in the way you do your computation. The third choice, that simplification is slightly unobvious. That's all. Okay? It's not impossible. It's not very direct. Okay? I'll show you why. We'll start with alpha power 4 plus alpha plus 1. Okay? So, what is, what do you, what do you think we should do first to try and simplify our calculations? We should try to come up with the, that table. Okay? So, let me go through and do that. If I do that, let's see what we do. It's a little bit laborious, but, but I want to do it. Okay? Just to, just to show in one case. Okay? 0, 1, alpha, alpha, alpha squared, alpha power 3, there's really nothing to do. Right? I already get that. Then what do we have to do? Alpha power 4, what will that be? Okay? So, that directly comes from here. Right? This tells me alpha power 4 is alpha plus 1. So, you notice, instead of thinking about the, this reducible polynomial, as some polynomial which tells you how to see, how did we think of pi of alpha so far? We said pi of alpha is something which, which you have to divide by, right? You take a of x and b of x, b of alpha, b of alpha, you multiply and then you divide by pi of alpha, take the reminder. Another way to think of pi of alpha is what? It tells you what's alpha power m in terms of lower powers of alpha. Okay? So, look at this form. Okay? This is an interesting way to think about pi of alpha. It tells you what's alpha power 4 is in terms of lower powers of alpha. Okay? Anytime I get, multiply, right? I can get powers higher than 3. Anytime I get powers higher than 3, I will go to pi of alpha and simplify. Okay? It's the same thing as doing long division. It's not any different from doing long division, but except that you can think of it this way. Okay? So, alpha power 4 is 1 plus alpha. Okay? I want you to do this. Okay? Try it. I don't think you have to really see how I am doing it. You can do this on your own. Very simple. The only rule you have is alpha power 4 is 1 plus alpha. Okay? Try to take your time and do this on your own. Just teach you to be careful. Okay? So, you see the miracle, right? So, the order of alpha, multiplicative order of alpha turns out to be 15 once again. So, that is what enables the possibility of having a meaningful table. Okay? Okay? Are you happy? So, you notice immediately why this other third guy would be a bad choice. Okay?  Why would it be a bad choice? Maybe it's not the immediate thing to notice. So, let's try to do this computation with this guy as a choice. Okay? This is just a rough computation. You'll see it will go wrong very quickly. Okay? So, maybe you don't like it too much. Okay? So, you have 0, 1, alpha, alpha square, alpha power 3. There's no problem. What would be alpha power 4? Okay? Alpha power 3 plus alpha square plus alpha plus 1. Okay? What would be alpha power 5? You'll get 1. Okay? So, the order of alpha, if you had chosen the other polynomial, it becomes 5. Okay? So, maybe it's not, maybe you can conclude something very dangerous. Okay? So, this polynomial is a little bit more dangerous. Okay? So, you'll have to look for some other element to find an element of order 15. Of course, it should have an element of order 15. Okay? Why I said, I just told you all fields are isomorphic. So, it should have a element of order 15. So, out of these, out of all these 16 or 15 polynomials, well, there is only 14 really to try. There will be one element of order 15 and you have to find that element. Okay? So, in this case, you'll see 1 plus alpha is such an element for this polynomial. Okay? Okay? But if you had chosen this polynomial in the first place, you would have immediately got alpha itself to have order 15 and you don't have to go on this leather hunt of looking at what other element would be, would have order 15. Okay? There are easier ways of finding this element also. There are smarter ways of doing it, but anyway. Okay? So, there is some, there is some care you have to exercise in choosing this irreducible polynomial also. While it really doesn't matter, your complication, your computations can be really simple if you choose one of them. Okay? Could be. One can argue really there's no difference, but it can be directly simple. Yeah, you have to prove that. Is that clear? Okay? So, now, let's just forget about this guy for a while. Okay? So, we won't make such bad choices in the future also. We'll always choose a polynomial such that order of alpha is 15. In fact, you can show that's always possible. Okay? You can pick a pi of alpha so that order of alpha is 15. Okay? So, selection of pi of alpha such that order of alpha is 2 power m minus 1 is possible. Okay? So, let me even say p power m is always possible. Okay? We'll again accept this result without proof. Maybe we'll see a proof of what he mentioned a little later. We'll see a proof of the fact that every field has an element of order p power m minus 1. Maybe we'll see it if we have time in the future. Okay? But you can always accept this. You can say I can always find the pi of alpha for which order of alpha itself will happen to be p power m minus 1. So, that's enough. So, I'll simply do my computations multiplication with log base alpha. I know I can always do it. Okay? Why is this order being p power m minus 1 very important? Then every element has a representation as an alpha power. Okay? Then you can go back and forth. That's why this order being 15 was important. Okay? Hopefully that was clear. Okay? All right. So, let's try a few computations. Okay? So, I want to keep this table in mind. So, what I'll do is I'll do my, I know it's possible to do some copy and paste. I'm wondering how to do that. Okay? So, I'm going to copy this. That's great now because I can paste it in whichever page I want. So, it's a nice thing about doing it in computer. So, if I say paste, there you go. I have my table. Okay? All right. So, that's my table for F16. So, this is F16. So, that's all you need, right? You don't need anything else for doing computations in F16. Okay? If you want, you can write it in a neat form in vector and power. That's only for the computer. If you're doing it by hand, this is good enough. So, small enough field. Okay? So, I'm going to ask you to do a few computations just to get practice. I think it's useful to do it.  Okay? There's nothing really you see to be scared about. It's a very simple computation at the end of the day. You can also give the answer in your favorite notation. Usually, writing down the power notation is much shorter than the polynomial notation. Eight. Okay? One answer I'm getting is that it's alpha power 8. 9? 9? Okay. People are disagreeing. You may want to check what you got. Okay? So, the popular answer seems to be 9. If you got alpha power 39, that's actually alpha power 9. Okay? 30 is 1. Okay.  Right? So, only thing I'll point out is inverse. Okay?  This is also very easy to do in which notation. The power notation again, if you want to do it in the polynomial notation, it's very difficult. The power notation is very easy. Right? What is this? This is alpha power 13. No? So, 13 inverse would be alpha power minus 13. So, how do you convert back? You can add alpha power 15 if you want and then you would get alpha power. Right? Do you see that? This is minus 1. This is alpha power minus 13. I can obviously add any multiple of 15 to it to make it a nice whole number. So, I would get alpha square. Okay? So, all these things you can do very easily in terms of computation. Okay? So, in general, what do we have now? In general, if q equals p power m, okay? If q equals p power m, fq will have this wonderful structure. It will be 0, 1, alpha, alpha square. So, until alpha to the power p to the power m minus 2, okay?  So, this would be something like fm minus 1 alpha power m minus 1 plus so on till f1 alpha plus 1. Okay? How did I get this? This would come from my pi of alpha, right? Okay? Basically from pi of alpha equals 0. Okay? So, I did not really prove this, but I will give you a couple of ways to think about this result and then maybe I will not prove it. I do not know. It is not something really critical. There is no real great secret behind that proof. So, this structure really simplifies the way you multiply, okay? But this is an extremely useful structure. We will kind of accept it without proof. It simplifies your multiplication, okay? So, the idea behind the proof is, it is actually a little bit different. Actually, what is easy to prove is what he said. Every field like this will have a primitive element. That is an easier proof, but that is also involves some technicalities. I am not going to go into it. So, the idea I will give you another way of thinking about it. Sorry? Yeah, yeah, several books which have the proof. Another way to think about it is, see how we went about the computation of alpha, right? The powers of alpha. We went about saying 0, 1, alpha, alpha squared, right? So, on we were finding a general alpha power i, we were finding what way we are actually doing. We were trying to reduce alpha power i modulo pi of alpha. Okay? So, we were checking when will alpha power i be equal to 1 modulo pi of alpha? When will that happen? That will give you the order of alpha, the multiplicative order of alpha, right? The smallest such i, right, gives you the multiplicative order of alpha. Do you see what I am saying? It is the exact same thing. Alpha power i will become 1. When will that become 1? Okay? Another way of reading this is, this will happen if and only if pi of alpha divides alpha power i minus 1 in what? In fpx, alpha, fp alpha, right? I can move 1 to this side. Alpha power i minus 1 equals 0 modulo pi of alpha. What does it mean? Pi of alpha has to divide alpha power i minus 1. It is the same thing. There is no, these two are exactly the same. Okay? So, the question is, is there an irreducible polynomial, pi of alpha of degree m such that the smallest i for which pi of alpha divides alpha power i minus 1 is what? p power m minus 1. If I can always guarantee that such a polynomial will exist, then I know definitely alpha itself will be a irreducible, it will be a, will be this primitive element, this element which gives me all the order p power m minus 1 in this field. Okay? Right? That I know. Okay? So, that such a choice of pi of alpha is called a primitive polynomial. Okay? So, pi of alpha is always irreducible. It becomes primitive if the smallest i for which pi of alpha divides alpha power i minus 1 is i equals p power m minus 1. Okay? So, that is the definition of primitive. Pi of alpha is primitive if smallest i for which pi of alpha divides alpha power i minus 1 is i, I will say i min, i min equals p power m minus 1. Okay? Okay? So, such a choice is always possible. One can show for every m, for every p, a primitive polynomial will exist of degree m over fp. Okay? You can show that. Once you show that, you can immediately claim alpha will always have order. Okay? With such a choice if pi of alpha is primitive, that implies order of alpha equals p power m minus 1 in fq. Okay? Okay? So, such an element is called primitive. Okay? In fq, an element of order q minus 1 is called primitive. Okay? So, this is also q minus 1, right? Okay? So, such an alpha is called primitive. Ah, yeah, fq star, primitive in fq. Okay? An element of order q minus 1 or p power m minus 1 in fq multiplicative order is said to be primitive. Okay? So, primitive as in it is the only thing you pretty much need. Okay? You also need this relationship. Okay? So, this do not underestimate this relationship. This is very, very important. Okay? Very important. Okay? Well, that comes from the pi of alpha and the primitive element gives you the whole thing. Okay? Right? So, when you see this, you should conclude that finite fields are much simpler than even rational numbers or real numbers or anything. Okay? So, there are only a finite number of elements and all of them can be written as a power of one element exactly. There is no approximation or anything here. Okay? Exactly. Right? It is just a discrete set. There can be exactly written as a power of one element and that element satisfies very simple relationships which you can easily do to do your computation. Okay? So, finite fields are really, really very simple. Okay? Okay? So, one question that somebody asked me, maybe you are not reminded of that when you see this. Okay? One of the properties I showed was what? Fq contains what? Fp. Okay? So, the way I wrote it down here, where is the Fp? You can see on your screens. Fq have written as 0, 1, alpha, alpha squared, so on. Okay? Explicitly, it seems like there is no Fp. Okay? But remember, each of these is actually equal to what? In the polynomial notation. Okay? You go back to the polynomial notation, each of these powers is actually equal to some polynomial. And in the polynomial, you will get Fp. Right? In the polynomial notation, will you get Fp or not? Look at all the constant polynomials. Right? You are including all the polynomials of degree less than or equal to m. Right? So, that would specifically be, all the constant polynomials would also be included. Of course, one of these alpha powers is equal to 1, 2, 3, 4 like that. Okay? All those things will also be there. Okay? So, Fp is already here. Okay? Just to illustrate that, I will pick one example. See, in the binary case, you won't really see it. Right? Because 0 and 1 are already explicitly there. Okay? The non-binary case, you have to really see it. So, I will just take one example to show why, how that works out. Okay? I think that example is very useful is to understand these properties. We will look at F9. It is a simple enough example and it is not that terrible. Okay? So, F9 exists. We know F9 exists. Why do we know F9 exists? 9 can be written as 3 squared. Okay? So, characteristic is 3 and the dimension is 2. Right? Okay? So, I can write, I know F9 can be written. I will start with the polynomial notation. Okay? Just to drive home the point. Okay? So, if I have to write down F9, it is good to start with the table. Okay? So, all possibilities would be 0, 0, 0, 0, 0, 1, 0, 0, 2. Right? How many would you have? You would have a lot, but let me write down at least a few. 0. Am I writing it correctly? 0. Yeah. So, 0, 1, 0, 0, 1, 1, 0, 1, 2. And then what? Oh, it is only two digits. I am sorry. I am sorry. That is why I thought, I mean, I am making some mistake here. It is fun. 0 is not there. You are right. It is only polynomials of degree less than or equal to 1. Okay? Less than 2. Okay? So, polynomials of degree less than or equal to 1. Right? M minus 1. Okay? I got carried away there. 2, 0, 2, 1, 2, 2. Okay? So, those are the possibilities. I am going to associate this with 1 and this with alpha. Okay? So, I would get 0, 1, 2 as it is. Then I would get alpha, alpha plus 1, alpha plus 2. Then I would get 2 alpha, 2 alpha plus 1, 2 alpha plus 2. Right? All my coefficients have to be interpreted in module O3 and I can add and subtract very easily. No problem. For multiplication, I would need a pi of alpha. Okay? And this needs to have degree 2 and it needs to be irreducible over F3, F3. Okay? Okay? You will have two possibilities once again here. Okay? One case, which is a good case, I believe is alpha square plus alpha plus 2. Okay? The other choice is alpha square plus 1. Okay? So, you will say alpha square plus 1 is a slightly dangerous choice. Okay? We will not make that. We will simply take alpha square plus alpha plus 2. Okay? Okay? I know that this is a primitive polynomial. Okay? You can check it is irreducible very quick. For primitive, you need more checks. Okay? We divide by larger things but I know it is primitive. So, we can do that. Okay? Let us spend a few minutes trying to do the table for this. Okay? If you do the table, you will see some power of alpha will actually be equal to 2. Okay? So, you can see that. It is not very difficult to do that. Okay? So, each of these polynomials is equal to some power of alpha. I know that for sure because order of alpha is what? Seven, right? So, I know that that will happen. Seven or eight, I am sorry. Eight. Eight. Okay? So, spend some time and do it. I think it is an interesting thing. Okay? 0, 1. So, you have to try and do powers of alpha. Alpha square would be what? Yeah, you have to be careful about the minus. Okay? Do not do this. You are doing F3 now. Okay? You cannot say it is alpha plus 2. It is actually minus alpha minus 2 which in F3 is actually 2 alpha plus 1. Okay? So, you have to be very careful. Okay? Alpha power 3 would be 2 alpha squared plus alpha. Okay? Be very careful with the computation. So, you get 4 alpha plus 2 which is actually 2 alpha plus 2. Okay? Okay? Check my computations. This is all very quite dangerous. Did I make any mistakes? Okay? So, let me do maybe let me do one or two cases in detail so that I get some confidence and we will go. 2 alpha plus 1 plus alpha. Right?  Right? Right? That is fine. So, if you want to do alpha power 4, you have to do 2 alpha squared plus 2 alpha which should be again 4 alpha 6 alpha which should be 2. Okay? So, alpha power 4 be 2 alpha power 5 is slightly easier 2 alpha alpha 6 is 2 alpha squared which becomes alpha plus 2. Okay? So, then alpha power 7 would be alpha squared plus 2 alpha which would be alpha plus 1. Okay? And then alpha power 8 you can check would be alpha squared plus alpha which is 1. Okay? You can check that just to be one. Okay? So, that is your table. Okay? So, if you want in this, this you can write the power. This does not really make sense. 1 is 0. 2 is 4. 1 0 is what? 1 itself. 1 1 is 7. 1 2 is 1 2 is what? 6.  So, that is your table. Okay? So, once you have that you can do anything you want very very easily. Okay? So, again as I said this is just to show you how this feels. The feels are the same in any characteristic, but we will only do characteristic 2. We will not do anything other than characteristic. Okay? So, we do not care beyond characteristic 2. And then characteristic 2 you can easily see that the binary field 0 1 will be there everywhere. Okay? And the 1 also behaves in the very simple question. Why does 64 QAM come into the picture? No, see any constellation is just a finite set of points. I can always map a bit sequence to that to each point. Then I can do my coding over bits. Nothing stops me from doing it. So, you do not have to think in terms of constellation and all. So, in fact the most popular field happens to be f 256. Okay? Okay? I think there is one VLSI person at least here. You would imagine why 256 is very attractive. Okay? In the vector notation, how many bits would it take for f 256? 8 bits, right? And why is 8 bits good for these VLSI people? Again they cannot think in terms of anything other than 8, right? They always point bytes and 8 anything to say 7 multiples or 7 they get scared immediately. So, that is why 256 is very popular. In fact, most of the read Solomon codes that are in your hard drive, it is in your CD drives and outer space, most of them are over f 256. Okay? So, another notation for f Q, you will see people also use the notation g f Q. Okay?  This g stands for Galois. Okay? That is how you pronounce his name. It is a French name. So, in French the last consonant is never pronounced. Okay? So, it is just there for style. Okay? So, this guy's name is Galois. O I is Wa. Okay? Galois. So, he is, he was, I mean you should read a story. It is a fascinating story. He died when he was 32. I think if he had not died, several things in algebra would have been solved. Okay? So, anyway, that is another story. I think he died 32, maybe younger than that. I am not sure. 21. Is that the right way? Okay? I am sorry. Some crazy guy. Okay? All right. So, that is about fields. Okay? So, at this point, you should be very comfortable when I write down a general field. At least when I write down f 2 power m. Okay? So, let me reiterate what it is. How would I write down f 2 power m? Okay? I will always use this notation because it is very convenient.  Okay? So, it is a very nice convenient short way of writing the whole field. Okay? So, you can write the whole field in one way. Okay? This is the way, this is the general idea. Okay? So, I think at this point, we are pretty much ready to see the reason why finite fields are so nice. Okay? So, why did we, why did I say we,


Personal finance practice problem using OneNote. Mutual fund gained loss, dividend income, and capital gain distribution calculation. Prepare to get financially fit by practicing personal finance. You're not required to, but if you have access to OneNote, would like to follow along. We're in the icon left hand side practice problems tab in the 13111 mutual fund gained loss dividend income and capital gain distribution tab. Also take a look at the immersive reader. The practice problems typically in the text area too with the same name, same number, but with transcripts. Transcripts that can be translated into multiple languages either listened to or read in them. We're imagining we're investing in mutual funds remembering that as individual investors we could invest in individual stocks, individual bonds, but oftentimes utilize the tool of mutual funds, ETFs, allowing us to pool our investments with other investments and then the fund then allocating over a broader array of securities such as stocks and bonds, usually allowing us more diversification. Also remember that if you have your money under a retirement kind of benefit program, a tax benefit program such as the 401k or an IRA, usually you could think of those as basically a mutual fund that's under the umbrella of a 401k plan or an IRA giving you tax benefits but also restricting the money as well. So now we're imagining that we're selling the mutual fund, buying and selling the mutual fund and we're also thinking about other kinds of income that we get from the mutual fund. As we do this, some of these calculations will look similar to when we buy and sell individual stocks but we also have to consider the other kinds of income that could be involved with the mutual fund. Remember that when you buy and sell individual stocks you're buying a share ownership interest in a corporation, corporations being separate legal entities which have their ownership broken out into standardized units of shares or stocks that are traded if they're publicly traded on the stock exchange whereas mutual funds means that we have a fund that has securities within it which could include typically bonds and stocks and that we own a share of that fund in the mutual fund. So we're going to think about the types of income which could include buying and selling the mutual fund itself where we could have a similar calculation as buying and selling the stocks but we could also have the securities within the mutual fund such as the stocks earning dividends and so those dividends if not under the umbrella of an IRA because you could have different tax consequences if it was an IRA or 401K plan then they would be typically distributed through the mutual fund to us as the shareholders with a 1099 so we can report it on the taxes that mutual fund itself could buy and sell securities such as stocks within the mutual fund meaning we're not buying and selling them the mutual fund is buying and selling them and therefore resulting in possibly gains when that happens and those could flow through from the mutual fund to us capital gains even though we didn't really sell the thing in order to get the capital gains it was the fund manager that's doing it inside of the mutual fund you could also have interest income if you're holding on to bonds within the mutual fund so let's first do our first calculation which we saw in a prior problem where we're going to purchase and sell the mutual fund itself so if we say that the the shares purchase were 400 when we bought them the cost was $20 we're going to say that the dividend per share is 60 cents we'll calculate that later capital gain distribution is 70 cents we'll take a look at that later and then a year later we sell the all 400 shares at a price of $28 we could see the gain on a per share basis of the $8 so we'll do this calculation a couple different ways we saw it last time so we'll do it a bit quicker we got the shares purchased 400 shares the cost per share $20 so that means we spent $8,000 to purchase the mutual fund similar to us calculating if they were individual stocks but now we're investing in the mutual fund we then sold it a year later imagining a year has passed and we have 400 shares the price is now $28 and so that means that we've received at this time of sale $11,200 the difference between the cost and the sales price is of course our gain the $11,200 the total cost $8,000 gives us a gain of $3,200 which may be subject to taxation like capital gains tax if you're what we won't get into the taxes and in more detail than that here now note you could calculate this a little bit quicker if you want to get right down to the profit doing it thusly and this is quite useful calculation we got the per share profit price 28 and then the cost is $20 that means we got $8 of profit per share and then we can multiply that times the shares that we sold the reason this is a nice convenient calculation is that it's a little bit easier if the data changes for example if we bought 400 shares and we only sold like 200 or 100 shares for example if I do this calculation up top we'd have the 400 shares I'd have to figure out how much we we actually sold which was the 100 here to figure it out correctly whereas down here we're just going to calculate these the amount of the shares that we sold and that'll give us directly to our profit and loss notice that if you if you have some expenses with the gain or sale usually those expenses hopefully are kind of in material for the for the processing the gain of the sale the commissions for example so so it won't have a big difference on your decision-making process but it can muddy up the calculation a little bit okay so then we got dividend income now the dividend income note that we're not getting dividend income you can think of you might think of it well we got dividend income on the mutual fund in a similar way as we got dividend income on the individual stocks which would be comparable or similar to up here where we calculated the profit and loss in a similar way as if we bought and sold an individual stock but remember remember that the dividends here are not the dividends of like one mutual fund the mutual fund is invested in things like stocks so you might have multiple stocks within the mutual fund that the mutual fund is just holding on to those stocks are the things that generated the dividends to the mutual fund meaning the corporation is then paying part of their earnings to the owners of the corporation which the mutual fund that we are in owns shares which represent ownership interest in the mutual fund and they are then receiving the dividends which is income to the mutual fund which of course then needs to be passed through because someone has to pay taxes on that generally and so if it's if it's going to be some outside of an IRA and those are dividends to us or a 401k plan or a retirement plan then we will typically get like a 1099 so that we'll have to report the dividends that are flowing through so if we got dividends per share of 60 then the straightforward calculation once we have that if we had 400 shares times the 60 dollars in dividends we get the 240 dollars now those two kind of make sense if you're kind of your mindset is in the mindset of this is just like if i owned a stock right i would expect that i would get some dividends and i would expect that i have to calculate the calculate capital gains in a similar way and it's similar but you you want to kind of understand the mutual fund a little bit more depth in depth because it's not exactly the same holding as a stock but this one down here kind of throws people off usually you're like capital gain distribution didn't i just calculate my capital gains up here wouldn't i only have capital gains when i sell the stock that's what happens with stock wouldn't i only have capital gains when i sell the mutual fund and that's when it's like well not necessarily because although you could have capital gains when you sell the mutual fund because now you had a gain on the sale of the fund itself subject possibly to taxation but the fund manager within the fund is going to be buying and selling stocks and bonds to keep up with ever whatever goals or they have within the mutual fund even an each even an index fund is going to have to buy and sell shares to keep the the ratio of the investments correct so when they sell shares they might end up with a capital gain within the fund without us having had taken any action at all we didn't sell anything the fund that we're invested in sold something they incurred the capital gains like with the income on the dividends that's going to have to flow through to somebody that's going to pay the taxes on it which of course will be the owners of the mutual fund the shareholders of the mutual fund so this one is actually going to be reported to us in the form typically of a 1099 unless it's under the umbrella of a retirement plan because then that you get a tax deferral on it so you still might not have to recognize it till you pull it out in that case but if not if it's outside then you'll typically get a 1099 saying it's a capital gain distribution that could be a little bit confusing because when you data input that into tax software for example like it's going to show up as if you sold the stock because it's a capital gain like you sold the stock but you didn't actually aren't the one that sold it so that's why it gets a little bit confusing but it's not too bad share price 400 so we're going to have that distribution was 70 cents per share once we know that we just calculated out we got the 280 so we can then see the total gains or returns that we had for the holdings here are are the 3200 that's the amount we got from buying and selling at the capital gains similar to the stock we also got the dividends of 240 which is kind of similar to what you would expect with stocks but remember it flows through the mutual fund from multiple stocks not just one company the mutual fund isn't you know the one company kind of and then we got the capital gains plus 280 that gives us our types of income 3270 also note that you could have interest income if you had some investments in say bonds for example also just realize that the different kinds of income that we had here could be subject to different kinds of taxation meaning the capital gains might have a different rate if you're in the united states then then the dividend income for example and if it's short term versus long term you could have different rates as well but in terms of just overall return remember you could have multiple types of returns from the mutual fund you could have dividends coming through the mutual fund interest coming through the mutual fund capital gains coming through the mutual fund and then capital gains from buying and selling the mutual fund and whether or not you're going to have the reporting of some of this information to you may be dependent upon whether it be under the umbrella of a retirement account like a 401k plan or ira in which case you might not have to report the income until you sell until you're in retirement and so on you defer the income so therefore you might not have the same kind of reporting 1099 stuff that you would have if it were outside of a retirement type account