Okay, welcome back everyone, the point of today's video is to understand what we mean by sigma notation. And we often use for sigma this big Greek letter, sigma, which kind of looks like a big pointy S. And as always in these lectures, the point is not necessarily to bombard you with computations or to judge you on right or wrong answers. But simply to demystify and explain notation, which would otherwise be mystifying. So what we're going to do in this lecture is work through three examples. Each one of them an 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 of 2i + 3 and the sum from j = 3 to 7 of j over 2. These are all just fancy ways of writing numbers. In fact, tell you the answers in advance, this first number equals 30, the second number equals 45 and this last number equals 25 halves. How on Earth did I know that? Point of this lecture is to learn why that's true. Let's dive in to do the first one. We're going to compute the sum from i = 1 to 4 of i squared. What I'm going to do is just do this myself first, and then walk you through and unpack, how I did that. Okay, so the sum from i = 1 to 4 of i squared is equal to 1 squared + 2 squared + 3 squared + 4 squared. Okay, so suppose someone paid me to do this problem, I'd consider myself done. I've worked it out, I've translated it from sigma notation to something someone who knows arithmetic could do. A person that is really a stickler for details, they're going to say well keep going, but I'm going to say, maybe you need to pay me more money. After we're done with that negotiation, we'll say, okay, from here, it's arithmetic, that's just equal to dot dot dot. The dots covering up the fact that I've done this in advance. This is equal to 30, the answer we saw before. But the real point of today's lecture is to understand this first equals sign. How on Earth did I know that this funny symbol, the sum from i = 1 to 4 of i squared is equal to 1 squared + 2 squared + 3 squared + 4 squared? Okay, so 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 out to me on the street is pretty annoying by now 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. Okay, so let's do some scratch work and 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'll 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 i's we do what this thing in the middle tells us to do. In this case, this thing in the middle, very bossy, tells us to square i. So if i = 1 then i squared = 1 squared. If i = 2, then i squared = 2 squared. If i = 3, then i squared = 3 squared. I think you get the hang of it. i = 4, and i squared = 4 squared. Okay, we've done the scratch work on the side. What do we do next? Well sigma, What you ought 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 1i = 1i squared = 1 squared and so on, and then we add them all up and get our answer. For those of you who are sort of business minded you can think of this as a process. Which can be broken up into parallel processes undertaken by different workers. So one worker can compute what 1i = 1. One worker can do 1i = 2. One might i = 3. One might i = 4, doesn't really matter when they do them. They do them at the same time in parallel. The end of the day, they compare their answers. The last worker adds them all up, and we get the answer we get over here, or over here. Okay, fine, let's do another example, very much like the same a little bit of a twist. So the second promised example is the sum from i = 1 to 5 of 2i + 3. Only thing that changed from last time, is 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. Then go from i = 1, i = 2, i = 3, i = 4, and i = 5. What do I do to i = 1? I do what I'm told to do to any i by the symbol. So in this case, I take it and I multiply it by 2 then I add 3. Here, I get 2 times1 +3. Here, I get 2 times 2 + 3. Here, I get 2 times 3 + 3. Here I get 2 times 4 + 3 and here I get 2 times 5 + 3. End of the day, take them all up, add them up. Just like we did before. So we do that up here, this is = 2 times 1 + 3 + 2 times 2 + 3. And you notice this is getting a little tedious, that's sort of the point, adding up long strings of numbers is tedious. Really the added value here is that the sigma notation give you a compact way of representing the work order. This is what you're going to have to do should you choose to do it, but you won't choose to do it. Then we have 2 times 5 + 3 and agin, we're really done. I consider myself done, if you really want an answer, want to pay me a little more money, maybe I've done this work in advance. Turns out, this is equal to 45, which you already knew because I told you in the beginning. But maybe you believed me and maybe you didn't. Okay fine, let's do one more example. This case, we're going to break the idea that you have to start from 1 with a 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 big kids about this now and not even do our little scratch work, because I think we get the idea. Just tell this to do something to j. What do we do to j? We divided it by 2. Okay, boss, but which j do we do that to? We do it from j = 3 incrementing 1 up to j7, okay? So this is = 3 over 2 + 4 over 2 + 5 over 2 + 6 over 2 + 7 over 2. We work all that out, I really don't like arithmetic and I really don't like fractions. So here, I'm going to be upfront and say I did this myself at home, actually at 5 in the morning. This is equal to 25 divided by 2. Okay, so those were three easy examples. Now I'm going 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, and I want you the pause the video and think about this. Okay, so there's two way we've done this. One is to do it directly just so we did before, the other is to be little bit clever and say, nah, it's a trick question, it's really 25 over 2. How come? Well the only differences between these two is one's above the j, One's got an R, otherwise it's the same range of j and the same range of R and the same thing that's being done to j and R. There's something special about j and R. In fact, j and R are examples of something we call, Dummy indices. And we mean to be super disrespectful as dummy makes it sound. J and R, you dummies are not real variables, their not real unknowns like in algebra when you solve 2x plus 1 equals a. And you have to solve for x in order 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 equals 3, increment that something up to 7, do the following to something. To really drive that point home, note that the sum from smiley face equals 3 to 7 of smiley face over 2, what do you think that is? Well it's just 25 halves 2, there's nothing special about it. That said, let's not get too wild, there 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 could use a b smiley face, maybe try to draw a little doggy. Really very, very poorly because that’s not what I do. People will look at you funny, but you'll be just as perfectly right.