Welcome back, everyone. In the last video, we saw the idea of a finite set. We saw two videos where we saw examples of finite sets. In this video, we'll see our first example of an infinite set. And it's going to be one that really permeates all of data science, the idea of the real number line. In this video, we're going to first tell you what is the real number line, this funny symbol blackboard R. We're going to go over simple concepts you've undoubtedly seen before but we want to put into a rigorous framework. Like positive numbers, negative numbers, nonnegative numbers, nonpositive numbers, and we'll talk about a little thing called absolute value. Should be a short day. Okay, so first let's meet the real number line. What we do is we draw a line. And I refuse to ever draw it straight. Suppose this is the real number line. It goes all the way on the extreme right to positive infinity, and the extreme left to negative infinity. And you want to think of this as representing an infinite set. That infinite set is going to be called R, which we usually write this sort of blackboard R symbol. This is equal to the real numbers. So, now the idea is that every single dot along this line represents a real number. There's a ridiculously large, infinite number of them. And we're going to think about what some of those are. First, let's mark some we know. So usually, somewhere in the middle we put 0, and then we sort of make tick marks for whole numbers. So here's 1, here's 2, here's 3, here's 4, here's 5, on forever. Here's -1, here's -2. Here's -3 on forever. If we're being careful, we try to make the length of each of these little sticks the same. Okay. So what I just wrote down are whole numbers, who are often called integers. So a subset, if you called z consists of just the integers. This is dot, dot, dot, -3, -2, -1, 0, 1, on forever. Okay, not every single number on the real number line is an integer. In fact, most of them aren't. Suppose we blew up this little stick between one and two. Let's just take it out here and blow it up, just so we can see it better. Here's one at one end, here's two at the other end. Let's just draw that. The only thing you really need to know here, without getting into any details Is that every single thing between one and two is also a real number. Same between two and three, same between three and four, and that there's a ridiculously large infinite numbers between one and two, how do you make them all? So here's a recipe, take one put a dot, put any string of whole numbers you want afterwards So, for example, 1.1 is in there. There it is, about there. 1.1, about a tenth of the way. So is 1.4, there it is. So is 1.1538, which might be about there. And in fact, anything that you do whether you continue on finally or really infinitely is a real number. That's the case for any subinterval in here. So if I take this subinterval and I'd blow it up out here, here's -3, here's -2 right about there, might be minus 2.5. So really, a real number is any integer dot any string of integers you might possibly want. It's a little bit of a nicety, which we won't get into, which is that some of these strings of integers terminate, some of them don't. You've probably heard of real numbers like pi. Pi, somehow you've probably seen is approximately 3.14128, so on so forth, one of the things that goes bump in the night. There are real numbers which are represented as streams of decimals which continue on forever, don't repeat don't have any pattern. Those are called irrational numbers. We’re not going to think about those here. Really here the take home message is just a real number is a number along this line and there are a whole bunch of them. Okay, one of the things we often do as mathematicians is we compartmentalize big sets into smaller and smaller sets and give different categories for what things are. So the first very big division of the real numbers is into positives and negatives. So here's our friend, the real number line again. Here's zero. Anything to this side of zero will be called positive reals. Positive real numbers. Anything to this side, if we have a negative real numbers. So an example of a positive real number might be 5.3 might be 0.001. For example the negative real number right here might be negative 11.7 if we include zero, So the positive reals but including zero we often write the non negative reals- and if we include 0 on the other side we go from right, non positive reals. Okay, fine, let's draw that real number line again. Let's try to get straighter each time. An important thing to realize so that in some sense numbers come in pairs, positive and negative versions of the same number. So here's 0. Suppose I take the number over here 7.1. It has a friend on the other side called negative 7.1. Just like here you have 10, here you have negative 10. Now notice 7.1 is not equal to -7.1. 10 is not equal to -10. However, 7.1 and -7.1 have one important thing in common, which that they have the same distance to zero. The distance from here to here is about 7.1, is exactly 7.1. And the distance from here to here is 7.1. There's a concept called absolute value. Let's define that. The absolute value- Of a real number and let's say the real number is X for the definition, which we denote like this, X with a little symbol around it. Notice that it looks exactly like the definition of cardinality of a set, which is unfortunate. Is the distance- From X to 0, so you want to start at x, you want to walk to 0 and let's figure out how many units you've walked. We'll notice over here that the absolute value of 7.1 is 7.1 and the absolute value of minus 7.1 Is 7.1, which by the way is the same thing has negative, -7.1. That's not just a huge little formula. We all know that negative times negative equals positive. But it allows us to make a general definition. So let's write that down in here, through the general rule For any real number, for any x in R, the following is true. The absolute value of an x can be one of two things. What I'm going to do here is give you what's called a definition by cases. Part of the point of teaching this is not just to give you the formula for the absolute value. But also you're going to see this definition by cases throughout data science. Death of value of x is equal to plain old x if x is non negative. But it's equal to negative x if x is negative. Let's check if that's true, and while we check this, this'll sort of show us how to parse the definition by cases. So let's compute the absolute value of 8.7. So according to this definition, 8.7 is our It's either going to be 8.7 or negative 8.7. But which case happens? 8.7 is non-negative so i'm in this case up here. So this is just equal to 8.7. And that's true. Right, I draw my real number line. Here's zero. Here's 8.7. That distance is 8.7. Let's check a different one. This shouldn't surprise you, let's check a -1. So let's say let's check -10, the absolute value of -10. What should this be by the way? If here is -10, it should be this distance. Which is 10. So I go through my definition. -10, okay, 10 is negative. Therefore, this formula tells me to take the negative of -10. Is equal to negative -10, which lo and behold is equal to 10, which is what I wanted. Okay, that concludes this video where we've learned what the real number line looks like, what it means to be positive, negative, non-negative and non-positive, and also about absolute values. In the next video, we're going to jump into the idea of inequalities. What it means for one number to be less than another number, less than or equal to another number, and so on. And we'll connect that back to absolute value.