digplanet beta 1: Athena
Share digplanet:

Agriculture

Applied sciences

Arts

Belief

Chronology

Culture

Education

Environment

Geography

Health

History

Humanities

Language

Law

Life

Mathematics

Nature

People

Politics

Science

Society

Technology

In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula. By using this formula as distance, Euclidean space (or even any inner product space) becomes a metric space. The associated norm is called the Euclidean norm. Older literature refers to the metric as Pythagorean metric.

## Definition

The Euclidean distance between points p and q is the length of the line segment connecting them ($\overline{\mathbf{p}\mathbf{q}}$).

In Cartesian coordinates, if p = (p1p2,..., pn) and q = (q1q2,..., qn) are two points in Euclidean n-space, then the distance from p to q, or from q to p is given by:

$\mathrm{d}(\mathbf{p},\mathbf{q}) = \mathrm{d}(\mathbf{q},\mathbf{p}) = \sqrt{(q_1-p_1)^2 + (q_2-p_2)^2 + \cdots + (q_n-p_n)^2} = \sqrt{\sum_{i=1}^n (q_i-p_i)^2}.$

(1)

The position of a point in a Euclidean n-space is a Euclidean vector. So, p and q are Euclidean vectors, starting from the origin of the space, and their tips indicate two points. The Euclidean norm, or Euclidean length, or magnitude of a vector measures the length of the vector:

$\|\mathbf{p}\| = \sqrt{p_1^2+p_2^2+\cdots +p_n^2} = \sqrt{\mathbf{p}\cdot\mathbf{p}}$

where the last equation involves the dot product.

A vector can be described as a directed line segment from the origin of the Euclidean space (vector tail), to a point in that space (vector tip). If we consider that its length is actually the distance from its tail to its tip, it becomes clear that the Euclidean norm of a vector is just a special case of Euclidean distance: the Euclidean distance between its tail and its tip.

The distance between points p and q may have a direction (e.g. from p to q), so it may be represented by another vector, given by

$\mathbf{q} - \mathbf{p} = (q_1-p_1, q_2-p_2, \cdots, q_n-p_n)$

In a three-dimensional space (n=3), this is an arrow from p to q, which can be also regarded as the position of q relative to p. It may be also called a displacement vector if p and q represent two positions of the same point at two successive instants of time.

The Euclidean distance between p and q is just the Euclidean length of this distance (or displacement) vector:

$\|\mathbf{q} - \mathbf{p}\| = \sqrt{(\mathbf{q}-\mathbf{p})\cdot(\mathbf{q}-\mathbf{p})}.$

(2)

which is equivalent to equation 1, and also to:

$\|\mathbf{q} - \mathbf{p}\| = \sqrt{\|\mathbf{p}\|^2 + \|\mathbf{q}\|^2 - 2\mathbf{p}\cdot\mathbf{q}}.$

### One dimension

In one dimension, the distance between two points on the real line is the absolute value of their numerical difference. Thus if x and y are two points on the real line, then the distance between them is given by:

$\sqrt{(x-y)^2} = |x-y|.$

In one dimension, there is a single homogeneous, translation-invariant metric (in other words, a distance that is induced by a norm), up to a scale factor of length, which is the Euclidean distance. In higher dimensions there are other possible norms.

### Two dimensions

In the Euclidean plane, if p = (p1p2) and q = (q1q2) then the distance is given by

$\mathrm{d}(\mathbf{p},\mathbf{q})=\sqrt{(p_1-q_1)^2 + (p_2-q_2)^2}.$

This is equivalent to the Pythagorean theorem.

Alternatively, it follows from (2) that if the polar coordinates of the point p are (r1, θ1) and those of q are (r2, θ2), then the distance between the points is

$\sqrt{r_1^2 + r_2^2 - 2 r_1 r_2 \cos(\theta_1 - \theta_2)}.$

### Three dimensions

In three-dimensional Euclidean space, the distance is

$d(p, q) = \sqrt{(p_1 - q_1)^2 + (p_2 - q_2)^2+(p_3 - q_3)^2}.$

### N dimensions

In general, for an n-dimensional space, the distance is

$d(p, q) = \sqrt{(p_1 - q_1)^2 + (p_2 - q_2)^2+...+(p_i - q_i)^2+...+(p_n - q_n)^2}.$

### Squared Euclidean distance

The standard Euclidean distance can be squared in order to place progressively greater weight on objects that are farther apart. In this case, the equation becomes

$d^2(p, q) = (p_1 - q_1)^2 + (p_2 - q_2)^2+...+(p_i - q_i)^2+...+(p_n - q_n)^2.$

Squared Euclidean Distance is not a metric as it does not satisfy the triangle inequality, however it is frequently used in optimization problems in which distances only have to be compared.

It is also referred to as quadrance within the field of rational trigonometry.

## References

Original courtesy of Wikipedia: http://en.wikipedia.org/wiki/Euclidean_distance — Please support Wikipedia.
A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia.
 1111 videos foundNext >
 Euclidean Spaces Lecture 1 Part 3: Length and DistanceWe produce a formula for computing the length of a line segment (magnitude of a vector) in spaces of arbitrary dimension. Euclidean Metric.wmvDefines the Euclidean metric or Euclidean distance. 413-I EUCLIDEAN DISTANCE and RECLASSIFYCalculating a distance raster from a vector file in ArcGIS and then reclassifying as a Boolean raster. shortest distance between two sets of coordinatesCalculation of shortest path (minimum Euclidean distance) between two sets of coordinates at http://shortdistance.imagejs.googlecode.com/git/shortdistance.ht... Simple Euclidean-Distance Based TrackingOutput of tracking based on nearest neighbour method. Assumes the object will not move far from its previous position. Manhattan Distance Calculation & Euclidean Distance Compare TutorialTime elapsed video of me doing an assignment in XNA. It was to calculate the Manhattan distance and then the Euclidean distance in different graphs to then c... 13C Norm and Distance in Euclidean n SpaceNorm and distance in Euclidean n-Space. ModelBuilder IntroductionA brief introduction to creating a new ArcGIS model using ModelBuilder. The raster tools Euclidean Distance and Zonal Statistics are used. OBJECT RECOGNITION USING EUCLIDEAN DISTANCE WITH KNN ALGORITHM.wmvOBJECT RECOGNITION USING EUCLIDEAN DISTANCE WITH KNN ALGORITHM. Real-Time Human Gesture Recognition SystemThe task of this system is to track a person's arms under the camera view and to identify the various gestures performed in real time. Also, decisions made b...
 1111 videos foundNext >
 3 news items
 How We Analyzed Medicare's Drug Data ProPublica Sat, 11 May 2013 18:16:40 -0700 The comparison applies a measure called Euclidean distance to each prescriber's drug preferences and volume. It compares providers to each of their peers and then calculates an average for each provider. So on the chart, when a provider appears far to ... GISuser Expert Feature - Low-Tech Field? Think Again GISuser.com (press release) Mon, 13 May 2013 07:48:38 -0700 Based on this study, Williamson built density models to allow DLC Resources to make accurate water budgeting projections for its properties. She used Esri ArcMap to calculate the average distance between plants and used Euclidean distance (the distance ... Pathfinding concepts, the basics GameDev.net Tue, 07 May 2013 10:32:28 -0700 For example, for levels that don't have overlapping floors, the euclidean distance (distance between two points) will do the job (like in the above diagram). The heuristic is a game changer in pathfinding, without it, performance would drop since the ...
 Limit to books that you can completely read online Include partial books (book previews) .gsc-branding { display:block; }

Oops, we seem to be having trouble contacting Twitter