Welcome back, everyone. The point of today's video is to understand what we mean by sigma notation and sigma is often used. We often use for sigma this big Greek letter. Sigma, which kind of looks like a big pointy S. It's always in these lectures, the point is not necessarily to bombard you with computations or to judge you on right or wrong answers. It's simply to demystify and explain notations, which otherwise be mystifying. So, what we're going to do in this lecture is just work through three examples. Each one of the example of sigma notation. Each one of these things here. The sum from i=1 to 4 of i squared. The sum from i=1 to 5 (2i+3) and the sum from j=3 to 7 and j over 2. These are all just fancy ways of writing numbers. In fact, tell you the answer in advance. This first number is equal 30. The second number is equal 45 and the last number is equal 25. How on Earth do I know that? The point of this lecture is to learn why that's true. Let's dive in to the first one. We will commute the sum from 1=1 to 4 of i squared. What I'm going to do is just do it myself first and then walked you through out on path how I did that. So the sum from i=1 to 4 of i squared is equal to 1 squared plus 2 squared plus 3 squared plus 4 squared. So suppose someone paid me to do this problem, I consider myself done. I've worked it out. I've translated it from sigma notation to something, someone who knows arithmetic could do. That person is really a stickler for detail, so I'm going to say, well, keep going. Then I'm going to say, maybe you need to pay me more money. Then after we're done with that negotiation, we'll say, okay, from here, it's arithmetic. This is just equal to dot, dot, dot, the dots covering up the fact that I've done this in advance. This is equal to 30 which is the answer we saw before, but the real point of today's lecture is to understand this first equal sign. How on Earth did I know that this funny symbol, the sum from i=1 to 4 of i squared, was equal to 1 squared plus 2 squared plus 3 squared plus 4 squared? Let's walk through that. The first thing to realize looking at this symbol is there's a bunch of things. First, there's a counter in here. There's a symbol in here, i squared that same person walking up to me on the street. The person's pretty annoying by now and says, I'll give you ten bucks if you tell me what i squared is. No deal, it's not really a fair question, I know what i is. But actually, I had some hints. Down here at the bottom, I know how to start my range of i. I know that I should start from i=1. And at the top, I know that I should finish when i is 4. So, it's just from scratch where I can work that out on the side. Here, I have i=1. Here, I have i-2. Here, I have i=3 and here I have i=4. So, you notice that starting range starting from 1 that finishing range ending at 4. And actually, there's something here that's a little unfair. Nothing in the symbol tells me that I count by one going from the bottom of my range to the top of my range. That's okay, that's sort of a cultural agreement. You start from the low i, you end at the top i and you count by one. Okay, fine. So, what do we do? To each one of these is, we do what this thing in the middle tells us to do. In this case, that thing in the middle. Way bossy, tells us to square i. Said i=1, then i squared equals 1 squared. If i=2, then i squared equals 2 squared. If i=3, then i squared equals 3 squared and you get the hang of it. I=4 and i squared equals 4 squared. We've done the scratch work on the side, what do we do next? Well, sigma. What you want to think about this is equal to sum. Meaning, we take all of these answers here and we add them up and that's how we get what we get up here. We've computed on the side, that one i=1, i squared equals 1 squared and so on and then we add them and then we got answer. For those of you who are business minded, you can make this as a process which can be broken up in to the parallel processes which can be taken by a different worker. So, one worker can compute what happens when i=1. One worker can do one i=2, one i=3, one i=4. It doesn't really matter when they do them. It's about the same time and parallel. At the end of the day, they compare their answers. The last worker adds them all up and we get the answer that we get over here. Okay, fine. Let's do another example. Very much like the same, a little bit of twist. So the second example is to sum from i=1 to 5 of 2i+3. Only thing we changed from last time was we changed the top of the range and we changed the thing inside. So just like before, let's do it one more time in full detail. I go from i=1, i=2, i=3, i=4 and i=5. What do I do with i=1? I do what I'm told to do to any i by this symbol. In this case, I take it and multiplied by 2 and I add 3. Here, I get 2(1)+3. Here, I get 2(2)+3. Here, I get 2(3)+ 3. Here, I get 2(4)+ 3. And here, I get 2(5)+3. End of the day, take them all up. Add them up, just like you did before. We'll do that up here, this is equal to (2(1)+3) + (2(2)+3), and you notice this is getting a little bit tedious. That's sort of the point, adding up longs strings of numbers is tedious. Really, the added value here is that sigma notation gives you a compact way of representing the work order. This is what you're going to have to do if you choose to do it, maybe you won't choose to do it and then we have (2(5)+3). And again, we're really done. I consider myself done. If you really want an answer, you want to pay me a little bit more money, maybe I've done this work in advance. Turns out, this is equal to 45, which we already knew, because I told you at the beginning, but maybe you believed me and maybe you didn't. Okay, fine. Let's do one more example. In this case, we're going to break the idea that you have to start from one at the counter. We're also going to break the idea that you have to use i. Let's take the sum from j=3 to 7, j over 2. You know what? We're going to be a big hits about this now and not even do level scratch for it, because I think we get the idea. This tells us to do something to j. What do we do to j? We divide it by 2. Okay, boss, but which j's do we do that to? We do it from j=3 incrementing 1 up to j=7. This is equal to 3 over 2 plus 4 over 2 plus 5 over 2 plus 6 over 2 plus 7 over 2. We work that all out. I really don't like arithmetic, and I really don't like fractions. So here I'm the upfront and I say, I did this myself at home. Actually, 5 in the morning. This is equal to 25/2. So, those are three easy examples. Now I want to give you the 100 gold coins, gold star problem which I want you to compute the sum from r=3 to 7 of r over 2. I want you to pause the video and think about this. So, there's two way to do this. One is to do it directly, just like what we did before. The other is to be a little bit clever in saying, nah, it's a trick question. It's really just 25 over 2. How come? Well, the only differences between these two is one's got a j. One's got an r. Otherwise, the same range of j, same range of r and the same thing is being done to j and r. There's nothing special about j and r. In fact, j and r are examples of something we called dummy indices and we mean to be a super disrespectful as dummy make its sound. J and r, new dummies are not real variables, are not real unknowns like in algebra when you solve 2x plus 1 equals 8. You have to solve for x to get points or not. They don't have any independent existence. There's no answer to what they are. They're just symbols for counters. They say, start at something equal 3, increment that something up to 7. Do the following to something. To really drive that point home note that the sum of smiley face equal 3 to 7, a smile face over 2. Do you know what that is? Well, just 25 divided by 2. Nothing special about them. That said, let's not get too wild. There's is generally a cultural agreement that when we use dummy indices, we tend to use symbols like i, j, k. Maybe l, maybe r. Sometimes m, sometimes n. In other words, we tend to use things from around the middle of the alphabet, but that's just an agreement. No particular reason you couldn't use a b, smiley face. Maybe try to draw a little doggy. Really very, very poorly, because that's now what I do. People will look at you funny, but you'd be just as perfectly right.