- Forward


Metrics in 2D Analytic Geometry
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

Definition
Back SMYC Forward
  • A metric is a function, \(d\) that assigns a real number to each pair of points, and that satisfies:
    • \(d(\bs{p}, \bs{q}) \geq 0\)
    • \(d(\bs{p}, \bs{q}) = 0 \mbox{ iff } \bs{p} = \bs{q}\)
    • \(d(\bs{p}, \bs{q}) = d(\bs{q}, \bs{p})\)
    • \(d(\bs{p}, \bs{q}) \leq d(\bs{p}, \bs{r}) + d(\bs{r}, \bs{q})\) (the triangle inequality)
  • A Metric Generated by the Euclidean Norm:
    • \(d(\bs{p}, \bs{q}) = ||\bs{p} - \bs{q}|| = \sqrt{(p_1 - q_1)^2 + (p_2 - q_2)^2}\)
The Triangle Inequality
Back SMYC Forward

Two Cases for the Euclidean Distance

images/triangle-inequality.png
Other Norms
Back SMYC Forward
  • The Rectilinear/Manhattan Norm on \(\mathbb{R}^{2}\):
    • \(||\bs{a}|| _{1} = |a_{1}| + |a_{2}|\)
    • So: \(d_1(\bs{p} - \bs{q}) = |p_{1} - q_{1}| + |p_{2} - q_{2}|\)
  • The Supremum Norm on \(\mathbb{R}^{2}\):
    • \(||\bs{a}||_{\infty} = \max \{|a_{1}| , |a_{2}| \}\)
    • So: \(d_{\infty}(\bs{p} - \bs{q}) = \max \{|p_{1} - q_{1}| , |p_{2} - q_{2}| \}\)
Metrics for Different Norms
Back SMYC Forward

Distance Between Two Points

images/metrics.png
The Unit Ball
Back SMYC Forward

For Different Norms

images/unit-balls.gif
Some Unusual Metrics
Back SMYC Forward
  • The Post Office Metric:
    • \(d_{P}(\bs{p}, \bs{q}) = ||\bs{p}|| + ||\bs{q}|| \mbox{ if } \bs{p} \neq \bs{q}\) (and 0 otherwise)
  • The Radar Screen Metric:
    • \(d_{R}(\bs{p}, \bs{q}) = \min \{1, ||\bs{p}-\bs{q}|| \}\)
Some Unusual Metrics
Back SMYC Forward
images/metric_post-office.png
There's Always More to Learn
Back -