Home » Blog » Prove some properties of a given distance function

Prove some properties of a given distance function

Let A, B be points in \mathbb{R}^n and define the distance between A and B by

    \[ d(A,B) = \lVert A - B \rVert. \]

Prove the following:

  1. d(A,B) = d(B,A).
  2. d(A,B)= 0 if and only if A = B.
  3. d(A,B) \leq d(A,C) + d(C,B).

  1. Proof. We compute,

        \begin{align*}  d(A,B) &= \lVert A - B \rVert \\  &= \left( \sum_{k=1}^n (a_k - b_k)^2 \right)^{\frac{1}{2}} \\  &= \left( \sum_{k=1}^n (b_k - a_k)^2 \right)^{\frac{1}{2}} \\  &= \lVert B - A \rVert \\  &= d(B,A). \qquad \blacksquare \end{align*}

  2. Proof. Assume d(A,B) = 0, then

        \begin{align*}  && d(A,B) &= 0 \\  \implies && \left( \sum_{k=1}^n (a_k - b_k)^2 \right)^{\frac{1}{2}} &= 0 \\  \implies && a_k - b_k &= 0 & \text{for all } 1 \leq k \leq n \\  \implies && A &= B. \end{align*}

    Conversely, assume A = B. Then a_k - b_k = 0 for all 1 \leq k \leq n. Therefore,

        \[ d(A,B) = \left( \sum_{k=1}^n (a_k - b_k)^2 \right)^{\frac{1}{2}} = 0. \qquad \blacksquare \]

  3. Proof. We compute

        \begin{align*}  d(A,B) &= \lVert A - B \rVert \\  &= \lVert A-C + C - B \rVert \\  &= \lVert (A-C) + (C-B) \rVert \\  &\leq \lVert A- C \rVert + \lVert C-B \rVert &(\text{triangle inequality}) \\  &= \lVert A - C \rVert + \lVert B - C \rVert &(\text{part (b)}) \\  &= d(A,C) + d(B,C). \qquad \blacksquare \end{align*}

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):