Exercise 1.2

One of the most familiar examples of a metric space is the plane $$\mathbb{R}^2$$ with a metric given by the distance formula $$d((x_1,y_1),(x_2,y_2)) = \sqrt{(x_1-x_2)^2 + (y_1-y_2)^2}$$. Check that $$d$$ statisfies the definition of a metric. This is sometimes called the euclidean or standard metric on the plane.

Olomana
$$(ab - cd)^2 \ge 0$$

$$a^2b^2 - 2abcd + c^2d^2 \ge 0$$

$$a^2b^2 + c^2d^2 \ge 2abcd$$

$$a^2c^2 + a^2b^2 + c^2d^2 + b^2d^2 \ge a^2c^2 + 2abcd + b^2d^2$$

$$(a^2 + d^2)(c^2 + b^2) \ge (ac +bd)^2$$

Both terms on the left-hand side are positive, so we can take square roots and multiply by 2:

$$2\sqrt{a^2 + d^2}\sqrt{c^2 + b^2} \ge 2ac + 2bd$$

$$(a^2 + d^2) + (c^2 + b^2) +2\sqrt{a^2 + d^2}\sqrt{c^2 + b^2} \ge a^2 + 2ac + c^2 + b^2 + 2bd + d^2$$

$$(\sqrt{a^2 + d^2} + \sqrt{c^2 + b^2})^2 \ge (a + c)^2 + (b + d)^2$$

The right-hand side is positive, so we can take square roots again:

$$\sqrt{a^2 + d^2} + \sqrt{c^2 + b^2} \ge \sqrt{(a + c)^2 + (b + d)^2}$$

Now substitute $$a = x_1 - x_2, b = y_2 - y_3, c = x_2 - x_3, d = y_1 - y_2$$:

$$\sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2} + \sqrt{(x_2 - x_3)^2 + (y_2 - y_3)^2} \ge \sqrt{(x_1 - x_3)^2 + (y_1 - y_3)^2}$$

Or:

$$d((x_1, y_1), (x_2, y_2)) + d((x_2, y_2), (x_3, y_3)) \ge d((x_1, y_1), (x_3, y_3))$$

Which is property 3 for our metric for any real $$x_1, y_1, x_2, y_2, x_3, y_3$$.

Olomana 07:21, March 2, 2011 (UTC)

'''Slick. --Steven.clontz 07:24, March 2, 2011 (UTC)'''

hiroki
I think this is too similar to Olomana's solution. I figured this out by squaring both sides of the inequality.

$$(y_0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_1)^2+(z_0-z_1)^2}$$ and not $$-(\sqrt{(x_0-x_1)^2+(y_0-y_1)^2}+\sqrt{(y_0-y_1)^2+(z_0-z_1)^2})$$

'''This is more straightforward than mine. I got bogged down in the details, so I set the 2nd point to (0,0) to simplify things, then made a substitution at the end to bring it back in. --Olomana 03:11, March 5, 2011 (UTC)'''

'''Very nice. It took me a moment to see how you started, but once I realized the LHS of the equation was all positive, and you used $$(x_0,x_1),(y_0,y_1),(z_0,z_1)$$ instead of $$(x_1,y_1),(x_2,y_2),(x_3,y_3),$$ I followed from there. I (think?) that every step you made was "if and only if", so you could have actually started with the sentence you wanted to prove and worked backwards to the true statement you had at the beginning, but this way clear that we don't have a misdirected implication. --Steven.clontz 17:10, March 8, 2011 (UTC)'''

Vardhan
Property 1 is trivially true, as $$x^2 > 0 \text{ for all $x \ne 0$ and $=0$ if $x=0$}$$.

Property 2 is true as $$x^2 = (-x)^2$$

Property 3 is the same as the triangle inequality - which can be proven by considering that any side is the sum of the projections of the other two sides on it, and every such projection is less than the side being projected due to pythagoras' theorem and that the square of a number is always positive - thus the square of each perpendicular side of the projection triangle (one of which is the projected side) is less than that of the diagonal (which is the side of the original triangle being projected). Note that in the case of a right or an obtuse triangle, the above is not true, but the only exceptinal case is when we are considering one of the sides of the right/obtuse angle, and it is readily seen that the diagnoally opposite side is always greater than this side.

''' It's true, but we really need a more analytical proof. --Steven.clontz 17:01, March 8, 2011 (UTC)'''

Tony bruguier
Items 1 and 2 are basic linear agebra results. Item 3 is more challenging.

If I define the vector $$v_1$$ as the vector joining the point $$x$$ to the point $$y$$ and the vector $$v_2$$ as the vector joining the point $$y$$ to the point $$z$$, then math needs to be proven is:

$$||v_1 + v_2|| \le ||v_1|| + ||-v_2||$$

$$||v_1+ v_2|| \le ||v_1|| + ||v_2||$$

Since all the quatities are positive, this is the same as:

$$||v_1 + v_2||^2 \le (||v_1|| + ||v_2||)^2$$

If I use the dot to signify the vector dot product, I get:

$$||v_1||^2 + ||v_2||^2 + 2 v_1. v_2 \le ||v_1||^2 + ||v_2||^2 + 2 ||v_1||. ||v_2||$$

$$v_1. v_2 \le ||v_1||. ||v_2||$$

So if I can prove the inequality above, I am done.

To do that, let's obseve that for any $$\lambda$$, we have:

$$||v_1 - \lambda v_2||^2 \ge 0$$

$$||v_1||^2 + \lambda ^2 ||v_2||^2 - 2 \lambda v_1. v_2 \ge 0$$

But that is a second order equation in $$\lambda$$ with $$a=||v_2||^2$$, $$b=- 2 v_1. v_2$$, and $$c=||v_1||^2$$, and so we have $$\Delta = (v_1 . v_2)^2 - ||v_1||^2. ||v_2||^2$$.

But since the equation is always positive for any $$\lambda$$, we have $$\Delta \ge 0$$. And so we are done (I hope).

Tony bruguier 19:40, February 25, 2011 (UTC)

'''Problem: Uses material not prerequisite for the course. (Not necessarily invalid, but not in the spirit.) --Steven.clontz 06:08, March 1, 2011 (UTC)'''

Ian mi
Let $$x = (x_1, \ldots, x_n)$$ be an element of $$\mathbb{C}^n$$. Let

$$||x|| = \sqrt{\sum_{i=1}^n |x_i|^2}$$

The terms $$|x_i|^2$$ are nonnegative real numbers so the sum is nonnegative and real, therefore $$||x||$$ is a nonnegative real number. In addition, $$||x|| = 0$$ if and only if each $$x_i = 0$$, i.e. if $$x = 0$$.

Let $$c \in \mathbb{R}$$ and define the product $$cx$$ by

$$cx = (cx_1, \ldots, cx_n)$$ Then $$||cx|| = \sqrt{\sum_{i=1}^n |cx_i|^2} = \sqrt{|c|^2\sum_{i=1}^n |x_i|^2} = |c| \sqrt{\sum_{i=1}^n|x_i|^2} = |c| ||x||$$

Let $$y = (y_1, \ldots, y_n)$$ be another element of $$\mathbb{C}^n$$. Let $$X = \sum_{i=1}^n |x_i|^2 = ||x||^2$$, let Y = $$\sum_{i=1}^n |y_i|^2 = ||y||^2$$, and let $$Z = \sum_{i=1}^n x_i \overline{y_i}$$. Then

$$0 \le \sum_{i=1}^n | y_i Z - x_i Y|^2 = \sum_{i=1}^n ((y_i Z - x_i Y)(\overline{y_i} \overline{Z} - \overline{x_i} Y)) = \sum_{i=1}^n (|y_i|^2 |Z|^2 - x_i \overline{y_i} \overline{Z} Y - \overline{x_i} y_i Z Y + |x_i|^2 Y^2)$$ $$ = |Z|^2 \sum_{i=1}^n |y_i|^2 - \overline{Z} Y \sum_{i=1}^n x_i \overline{y_i} - Z Y \sum_{i=1}^n \overline{x_i}y_i + Y^2 \sum_{i=1}^n |x_i|^2 = |Z|^2 Y - \overline{Z} Y Z - Z Y \overline{\sum_{i=1}^n x_i \overline{y_i}} + Y^2 X$$ $$ = Y(|Z|^2 - |Z|^2 - Z \overline{Z} + Y X) = Y (X Y - |Z|^2) $$

therefore $$ ||x||^2||y||^2 = XY \ge |Z|^2 $$ and hence $$ ||x|| \cdot ||y|| \ge |Z|$$. Thus we have $$||x+y||^2 = \sum_{i=1}^n |x_i + y_i|^2 =\sum_{i=1}^n (|x_i|^2 + x_i \overline{y_i} + \overline{x_i} y_i + |y_i|^2) = ||x||^2 + 2 Re\left(\sum_{i=1}^n x_i \overline{y_i}\right) + ||y||^2 \le ||x||^2 + 2 |Z| + ||y||^2 \le ||x||^2 + 2 ||x|| \cdot ||y|| + ||y||^2 = (||x|| + ||y||)^2$$

so $$||x+y|| \le ||x|| + ||y||$$. Define $$d$$ by $$d(x,y) = ||x - y||$$. Then $$d(x,y) \ge 0$$ and $$d(x,y) = 0$$ if and only if $$ x - y = 0 $$, i.e. if $$ x = y$$. In addition, $$d(y,x) = ||y-x|| = ||(-1)(x-y)|| = |-1|||x-y|| = d(x,y)$$. Finally if $$z \in \mathbb{C}^n$$ then

$$ d(x,z) = ||x - z|| = ||x - y + y - z|| \le ||x-y|| + ||y - z|| = d(x,y) + d(y,z) $$

Thus $$d$$ is a metric. If $$n = 2$$ then euclidean distance on the plane is given by the restriction of $$b$$ to $$\mathbb{R}^2 \times \mathbb{R}^2$$. If $$n = 1$$ then $$d$$ is euclidean distance on the complex plane. Either case shows that euclidean distance is a metric.

Ian mi 00:08, February 28, 2011 (UTC)ian_mi

'''Like Tony's solution, this is a nice approach, but it uses prerequisites not required for the course. What if you didn't know about the algebra of complex numbers? --Steven.clontz 06:14, March 1, 2011 (UTC)'''

Ziltoid23
Property 3: We know from the triangle inequality that $$ |a + b| \le |a| + |b| $$. Let $$ a = x_1 - x_2 $$, $$b=y_1 - y_2$$, and $$c=z_1 - z_2$$ Then $$d((x_1,y_1),(x_2,y_2)) + d((y_1,z_1),(y_2,z_2)) = \sqrt{a^2 + b^2} + \sqrt{b^2 + c^2} = |a-b| + |b-c| \ge |a-b + b-c| = |a-c| = \sqrt{a^2 + c^2} = d((x_1,z_1),(x_2,z_2))$$

Not true as $$\sqrt{a^2+b^2} \not= |a-b|$$--Steven.clontz 06:17, March 1, 2011 (UTC)

Olomana
High School solution

Note that the metric d(X, Y) can be obtained by drawing a right triangle with segment XY as the hypotenuse and using Pythagoras' theorem to get the length of the hypotenuse. Since the metric is the same as the length used in Euclidean geometry, we can use Euclid's proof of the triangle inequality to establish property 3.

Olomana 01:37, February 28, 2011 (UTC)

'''A good start, but could use a lot more detail on how the triangle inequality for Euclidean space applies specifically to our metric $$d((x_1,y_1),(x_2,y_2)) = \sqrt{(x_1-x_2)^2 + (y_1-y_2)^2}$$. --Steven.clontz 15:11, March 1, 2011 (UTC)'''

AddemF
I'm confused. Since we're using $$(x_{0}, x_{1}), ...,$$ (in hiroki's solution above), then wouldn't the statement of the third property be $$\sqrt{(x_{0} - y_{0})^{2} + (x_{1} - y_{1})^{2}} + ...$$?'''--AddemF184.32.143.29 01:37, March 23, 2011 (UTC)

'''He's proving $$d((x_0,x_1),(y_0,y_1))+d((y_0,y_1),(z_0,z_1))\leq d((x_0,x_1),(y_0,y_1))$$, which is equivalent. --Steven.clontz 02:22, March 23, 2011 (UTC)'''