 Hi, I'm Zor. Welcome to a new Zor education. Let's talk about how can we measure the distance in the space where Cartesian coordinates are established. Now, the simplest case is the case on the line, and that's what we're going to do right now. So we have a line and we have Cartesian system of coordinates on this line, which means we have one particular point called the origin or beginning of coordinates, and we have some kind of a unit of measurement, and we have the positive direction of this line. Now, any point now can be identified by its distance from the origin with a negative sign if this is on this side where we are establishing the positive direction of the line, or with a negative sign in case the point is positioned on the opposite, on the negative side of the line. Now, distance means that we have two points, right? So we have to measure the distance from one to another. Can that be done using the coordinates? Well, the formula is extremely simple and obviously it can be derived very easily, which I'm going to do right now. So let's consider the point A has coordinate x and point B has coordinate, let's call it xA and point B has coordinate xB so letter X would generally signify the coordinate. By the way, origin has coordinate which is equal to 0 throughout this instance, because it's on the distance of 0 throughout itself. Okay, so how can we measure the distance between A and B? Well, let's consider two different cases. Case number one when both points are on one side of the origin. Let's say both positive or both negative. So let's talk about the positive, it doesn't really matter. So let's say this is point B. Now, we need to know this distance. Now distance is always a positive number. So regardless of whether A is here and B is there or B is here and A is there, the distance must be exactly the same. It's a positive number. Alright, now A has a coordinate and B has a coordinate. So let's think about what is a coordinate. Coordinate is a distance. This is called xA, right? From the distance from the origin. And this is xB. So for obvious reasons to get the distance of this particular segment, we have to subtract the lengths of this segment. And I'm using the absolute value here, because in case both are on the positive side, they are positive, but in case both are on the negative side, both are negative. In any case, let me actually just demonstrate it here. So if this is A with a coordinate xA, this particular segment has a length of this, which is xA coordinate, but since it's negative, that's why I took the absolute value, minus this which is again negative and I have to take the lengths. So let me just demonstrate it this way. And then I have to take an absolute value of this. So if both are, both points are on either negative or both are on a positive side, this is the formula for the distance between these points. I have to take one length from the origin, another from the origin, subtract one from another, but since I don't know which one is further, I use again another absolute value. Okay, this is, or this is the distance, right? Now, what's interesting is that if both xB and xA are on the positive side, I can just drop this particular absolute value because for the positive number, absolute value is equal to itself. Now, if both are on a negative side, so both xB and xA are negative. So in this case, so let me just do it two cases, both are positive. Then I can rewrite it as xB minus xA absolutely. Now, if both are on the negative side then xB is negative, which means absolute value is minus xB. xA is also negative, so the absolute value is minus xA and then I have another minus here so it will be plus. Now, as very easily can be observed, these two values are not different from each other. They are exactly the same thing and they are equal to either this one or that one because they are different by the sign. So if you multiply this by minus one, you will get this. But since we have absolute value, it doesn't really matter. The result will be the same positive number. So I can very easily say that in case when these two points, A and B, are either both negative or either or both positive, this is the formula and I will wipe out everything else. This is the right formula for the distance between them. Now, let's consider that the points are on different sides. Let's say this is A and this is B. Now, in this case, xA is positive, xB is negative. Now, if they are otherwise around, then xA will be negative and xB will be positive. But what's the distance between two things? We just have to add this and this. So in this case, I will have xB absolute value plus xA absolute value. So this is same sign. This is different sign. Now, let's examine this. We know that they are on different sides from the origin. So either one is positive, another negative, or the first one is negative and the second one is positive. Well, again, let's consider these two cases. So xB is positive and xA is negative. Let's say this is. Now, if xB is positive, then it's equal to xB. Absolute value of xB is equal to xB. And xA is negative, so absolute value of xA is minus xA. Now, what if it's the other way around? So xB is negative and xA is positive. Well, if xB is negative, then I will have absolute value of xB is minus xB. xA is positive, so I will just retain it as is. Now, here I have exactly similar situation to the one before. Because this is xB minus xA. This is xA minus xB. So they are different by the sign. So you multiply this by minus one, you get this. But since absolute value is applied, no matter this or this, the result will be exactly the same. So, and we'll do the result. Well, let's take this one. As you see, the formula is exactly the same. So, no matter how our points are positioned on the line, the formula is exactly the same. The distance is an absolute value of the difference between their coordinates. Both positive, both negative. One is positive, another is negative. For one is negative, another is positive. All these cases result in exactly the same formula. And this is the formula. Basically, I'm sure those people who drive on the highways where exits are actually numbered, not just one, two, three, four, but based on some distance from, let's say, from the beginning of the highway, you know actually that this is exactly how you have to calculate the difference the distance between two points on this highway. Because if this is the highway, and it has a beginning, and these are exits. And every exit is marked by its distance from the beginning. So, this is exit A, and it has coordinate 100. This is exit B, and it has coordinate 130. This is exit C, it has coordinate 155. So, you know that the distance between B and C, how can you calculate it? You just have to take from one subtract another, right? From 155, you subtract 130, and you get distance 25. So, this is exactly the same type, except it's only the positive direction of all these numbers. It's not negative and positive. But generally speaking, if you have a line with coordinates, this is the formula for distance between two points. Now, another form of the same formula is D square is equal to XB minus XA square. Now, this is exactly the same as you understand. Sometimes people don't like absolute values and they prefer a little bit more functional kind of a representation of this. And this is actually a slightly better representation because when we will switch to two-dimensional case, the formula would be very similar to this one, not to this one. That's it. But these are absolutely equivalent formulas, obviously. So, D is always positive and its square is equal to square of the distance between coordinates. Well, that's a very short lecture and it's a very simple lecture. I will use the results of this in many different cases, obviously. For instance, the next lecture would be about distance on the plane where Cartesian coordinates are introduced. So, that's it for today. I would recommend you to read again the notes for this lecture. They are on unison.com. Well, thanks very much. Good luck.