Two Distances Between Numeric Vectors

Different norms summarize coordinate differences in different ways. Choose the one matching what the error or distance is meant to measure.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Compute two scales
  2. Match the tolerance to the requirement
  3. Find cases where metric choice changes the ordering
  4. State the interpretation and coordinate scales

Compute two scales

For differences \(3,4\), the maximum-coordinate norm is four and the Euclidean norm is five. A sum of absolute differences would give seven. A scaled Euclidean computation avoids oversized intermediate squares.

Match the tolerance to the requirement

If every field must be within one unit, a max error is convenient. A combined directional distance may use Euclidean error. See numerical test tolerance.[1][2]

Find cases where metric choice changes the ordering

Relative to the origin, point A at \((3,3)\) has maximum-coordinate distance three and Euclidean distance \(\sqrt{18}\). Point B at \((4,0)\) has distance four under both. A is closer in maximum distance, while B is closer in Euclidean distance. See absolute and relative error.

A: max norm 3, Euclidean ≈ 4.243
B: max norm 4, Euclidean 4
Nearest point changes by metric

State the interpretation and coordinate scales

Maximum distance bounds every coordinate separately. Euclidean distance combines squared displacements. If coordinates use different units, convert or scale them under a justified model before comparing.

References

  1. Tobin A. Driscoll and Richard J. Braun, Fundamentals of Numerical Computation ↩
  2. Nicholas J. Higham, Accuracy and Stability of Numerical Algorithms ↩