How is distance between two points in ℝ^{n} defined?

This is called the distance formula. Thus

This is called an open ball of radius r centered at a. It gives all the points in ℝ^{n} which are closer to a than r.
First of all note this is a generalization of the notion of distance in ℝ. There the distance between two points x and y was given by the absolute value of their difference. Thus
There are two points in the plane whose Cartesian coordinates are

which is just the formula for the distance given above.
Now suppose n = 3 and let
By the Pythagorean theorem, the length of the dotted line joining

while the length of the line joining
^{1∕2}


= ^{1∕2}
, 
which is again just the distance formula above.
This completes the argument that the above definition is reasonable. Of course you cannot continue drawing pictures in ever higher dimensions but there is no problem with the formula for distance in any number of dimensions. Here is an example.
Example 2.5.2 Find the distance between the points in ℝ^{4},

Use the distance formula and write

Therefore,
All this amounts to defining the distance between two points as the length of a straight line joining these two points. However, there is nothing sacred about using straight lines. One could define the distance to be the length of some other sort of line joining these points. It won’t be done in this book but sometimes this sort of thing is done.
Another convention which is usually followed, especially in ℝ^{2} and ℝ^{3} is to denote the first component of a point in ℝ^{2} by x and the second component by y. In ℝ^{3} it is customary to denote the first and second components as just described while the third component is called z.
Example 2.5.3 Describe the points which are at the same distance between
Let

Squaring both sides

and so

which implies

hence
 (2.13) 
Since these steps are reversible, the set of points which is at the same distance from the two given points consists of the points
The following lemma is fundamental. It is a form of the Cauchy Schwarz inequality.
Proof: Let θ be either 1 or −1 such that

and consider p

and so

as claimed. This proves the inequality. ■
There are certain properties of the distance which are obvious. Two of them which follow directly from the definition are


The third fundamental property of distance is known as the triangle inequality. Recall that in any triangle the sum of the lengths of two sides is always at least as large as the third side. The following corollary is equivalent to this simple statement.
Proof: Using the Cauchy Schwarz inequality, Lemma 2.5.4,

■