![]() | Euclidean distance has been listed as one of the Mathematics good articles under the good article criteria. If you can improve it further, please do so. If it no longer meets these criteria, you can reassess it. | |||||||||
| ||||||||||
![]() | A
fact from this article appeared on Wikipedia's
Main Page in the "
Did you know?" column on
December 26, 2020. The text of the entry was: Did you know ... that although the
Euclidean distance and the
Pythagorean theorem are both ancient concepts, the Pythagorean formula for distance was not published until 1731? |
![]() | This article is rated GA-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
Is that formula for approximating the distance using only integers wrong? Surely if dx and dy are the same (eg, at a 45-degree angle) then dx + dy - 2×min(dx,dy) will always be 0, and the approximation will always be 100% error?
I think it is worth noting that the Euclidean metric used to be called Pythagorean metric. At least there should be a page title Pythagorean metric that redirects here. 127
Where it says "The technique has been rediscovered numerous times throughout history, as it is a logical extension of the Pythagorean theorem.", are they talking about repeated use of the pythagorean theorem to prove the pythagorean theorem? The statement seems disjointed. 80.2.17.86 ( talk) 23:15, 14 March 2008 (UTC)
A fast approximation of 2D distance based on an octagonal boundary can be computed as follows. Let ( absolute value) and . If , approximated distance is .
You inspired me to start a wikibooks page, please share and improve: http://en.wikibooks.org/wiki/Algorithms/Distance_approximations -- mcld ( talk) 09:20, 23 September 2012 (UTC)
If you want to know whether objects A and B are at distance c or less, you can compare ((Ax - Bx)^2 + (Ay - By)^2 + (Az - Bz)^2) with c^2, and similarly for other numbers of dimensions. This avoids the square root entirely. If c is a constant, then c^2 can be precomputed as well. -- Myria 06:18, 21 July 2006 (UTC)
Where is that section? I think it was accidentally removed with the approximations, put it back. Comparing distances without using the square root is a simple but very important fact in software/hardware development since the square root is a very expensive operation. Raising the awareness of such a simple fact has a positive contribution to technology and thus humanity which nowadays suffers from slow, overbloated and resource-hungry software. Wikipedia is not only about abstract mathematical concepts.-- PE ( talk) 11:27, 14 May 2008 (UTC)
I corrected the formula for the distance in circular coordinates. -- EarthJoker 12:25, 23 July 2007 (UTC)
Why is the approximation section here? Euclidean metrics are very simple concepts, and I don't think you'd find anything about approximation in 99% of the textbooks that cover the topic. It seems like the audience for that material is different from the audience for the rest of the article. At the very least, there should be a reference here, or some explanation as to why it works.
Also, I moved the approximation sections to the end of the page because it seems important to at least see the 3D version before this is discussed. Triathematician ( talk) 01:16, 20 December 2007 (UTC)
Does this have anything to do with Euclid? If so, should it be mentioned or at least 'See also'ed? Bitwiseb ( talk) 17:46, 4 April 2008 (UTC)
Yes, it's the same Euclid. 129.132.152.15 ( talk) 10:03, 13 November 2008 (UTC)
What's so unique about the Euclidean metric? What properties does the euclidian metric have that other metric spaces don't have, such as the other Minkowski metrics? What is a rotation in a metric space? Do other metric spaces not have the property that the composition of two rotations is always a rotation? Blackbombchu ( talk) 02:03, 29 August 2015 (UTC)
I removed the following section as it imho does really fits here for several reasons. First of all the triangle inequality has its own article, so the definition and various derivations should be handled there. Secondly imho scope and style of the section went a bit against the notion "wikipedia is not a textbook". While proofs or short derivation may on occasion be included or sketched in wikipedia articles, it is usually not desired to have longer technically detailed prrof or textbook derivations/proofs.
Maybe the section can be moved to a suitable project on Wikibooks or to the ProofWiki project.-- Kmhkmh ( talk) 23:53, 19 March 2019 (UTC)
For any points , and holds
with equality if and only if there is such that . To prove it, we need the following Lemma.
For any reals holds
(*)
with equality iff for all or there is a non-negative such that for all . It is easy to see that if holds for all , then equality holds in (*). Prove we the statement in the case that for at least one . Then .
Both sides of the inequality (*) are non-negative. For this reason, it is equivalent to it's square.
which is equivalent to
After cancelation, we obtain the equivalent inequality
(**)
To prove this inequality, consider we the inequality
which holds for all reals . It can be rewritten as
This is quadric inequality by because . Because this quadric inequality holds for all real , the discriminant is less or equal to zero.
(***):
Now, we can conclude that
and therefore inequality (**) holds.
If equality holds in (**), then the left side of (**) is non-negative and equality in (***) holds. Therefore, there is some real such that for all . The value can not be negative because the left side of (***) is non-negative.
Let , and . Use we notation
, .
Applying previous lemma, we have
or
where equality holds iff or there is such that
holds for all ,
which is equivalent to
for all
or
for some and for all .
Because is equivalent to
for and for all .
We can conclude that equality holds in the triangle inequality iff
for some and for all .
If we present the Euclidean distance as a l2 norm, the squared norm is
Then the gradient is
It follows
— Preceding unsigned comment added by Lantonov ( talk • contribs) 22:29, 9 November 2020 (UTC)
I don't like the categorical statement that "the squared Euclidean distance cannot be a metric because it does not satisfy the triangle ineqality" although this statement is properly sourced. Mathematically, the statement is OK if we understand the metric as metric (mathematics); however, in general relativity by metric is understood the metric tensor (general relativity) and then the statement is not true: squared Euclidean distance generates the metric of the flat 3-D (Euclidean) space. This is a source of confusion for readers with different backgrounds. Lantonov ( talk) 10:21, 10 November 2020 (UTC)
both are called "metric" in their respective fields: But we are not talking about the word "metric", we are talking about the phrase "metric space". Is that exact phrase ever used to mean something that cannot be viewed as a special case of the definition at the article metric space? — David Eppstein ( talk) 07:57, 11 November 2020 (UTC)
The result was: promoted by
Amkgp (
talk) 04:48, 14 December 2020 (UTC)
Improved to Good Article status by David Eppstein ( talk). Self-nominated at 07:43, 11 December 2020 (UTC).
General: Article is new enough and long enough |
---|
Policy: Article is sourced, neutral, and free of copyright problems |
---|
|
Hook: Hook has been verified by provided inline citation |
---|
|
QPQ: Done. |
The following edits were recently reverted.
1. Removal of reference to squared distance being called "quadrance" in rational trigonometry as WP:UNDUE. This seemed clear enough; if the article were trying to catalogue appearances and avatars of squared distance, things like quadratic forms, Hilbert space and Bregman divergence would have far higher priority but are not even mentioned. Rational trigonometry is a one-man show by its inventor, has not caught on whatsoever (as noted in its Wikipedia page), and is already being hyped at a number of other WP locations. No need to promote it where it is at best marginally related to the topic.
2. Reworking of the statements on non-Euclidean geometry. The problematic passage states:
This is wrong as a description of non-Euclidean geometry. It is anachronistic; the notion of "mathematical space" came later, and distance functions on such spaces. It is also misleading: it was a familiar everyday fact that travel distance differs from Euclidean distance (hence the phrase "as the crow flies"), and well known to cognoscenti that maps of the Earth distort distance and that spherical geometry/trigonometry differ from the Euclidean version.
My attempt to state this more correctly is the last paragraph of https://en.wikipedia.org/?title=Euclidean_distance&oldid=996504346#History . This has been reverted as "tendentious" by @ David Eppstein:, but I do not understand what he thinks is wrong with it or how it is inferior to the preceding. 73.89.25.252 ( talk) 07:13, 27 December 2020 (UTC)
(Moved from above. 73.89.25.252 ( talk) 20:22, 30 December 2020 (UTC))
FWIW, I saw that mention of "rational trigonometry" a while back and thought about cutting it per WP:DUE. Does including it here truly enrich anyone's understanding of Euclidean distance, or geometry in general? I'm doubtful. XOR'easter ( talk) 05:56, 28 December 2020 (UTC)
An editor has identified a potential problem with the redirect
Euclidean metric and has thus listed it
for discussion. This discussion will occur at
Wikipedia:Redirects for discussion/Log/2022 May 4#Euclidean metric until a consensus is reached, and readers of this page are welcome to contribute to the discussion.
fgnievinski (
talk) 17:05, 4 May 2022 (UTC)
Article Metric (mathematics) says:
...a metric or distance function is a function that gives a distance between each pair of point elements of a set.
Article Metric space says:
In fact, a "metric" is the generalization of the Euclidean metric arising from the four long-known properties of the Euclidean distance. The Euclidean metric defines the distance between two points as the length of the straight line segment connecting them.
I still don't get why folks seem upset with applying MOS:BOLDREDIRECT to "Euclidean metric"? Squared Euclidean distance already calls it a "function" -- what else does the WP-Math cabal need? fgnievinski ( talk) 22:35, 4 May 2022 (UTC)
In advanced mathematics, the concept of distance has been generalized to abstract metric spaces, and other distances than Euclidean have been studied.is perfectly enough. Anyone who knows what a "metric" is (a small subset of this article's intended audience!) can reasonably infer what the "Euclidean metric" is. In all likelihood, such a person will have already been introduced to the Euclidean metric on R^n as their first example. WP math articles already have a reputation for turning elementary concepts into turgid prose, and imo we should do as much as possible to fight that. Readers first! Ovinus ( talk) 00:33, 5 May 2022 (UTC)
I'm not sure where/how best to integrate a few subjects that seem worth mentioning here.
1. Loci of equidistant points. I think it's worth discussing how the locus of points equidistant from a point is a circle, the locus of points equidistant from a circle is a concentric circle, the locus of points equidistant from a straight line is a parallel line, and in general it's possible to draw the locus of points equidistant to some curve ( Parallel curve) or other point set. Also cf. Signed distance function.
2. Various measures of the "distance" between various kinds of shapes are based on Euclidean distance, and have useful applications. For example, the Fréchet distance between curves.
3. Chord length vs. arc length vs. other measurements between points on a curve or surface. In e.g. Greek spherics/astronomy, compasses were used to draw circles on solid spheres and transfer geometric objects between the sphere and an auxiliary plane. Hipparchus' foundation of trigonometry in relating circular chord length to arc length had to do with this "chordal" Euclidean distance inherited from the ambient Euclidean space.
4. Squared distance in pseudo-Euclidean space, and the comparison between "space-like" vs. "time-like" vs. "light-like" displacements in spacetime.
@ David Eppstein any thoughts? – jacobolus (t) 20:07, 18 November 2023 (UTC)
Aside from which additional here might be appropriate here, I'd like to emphasize there is no general need to turn every short or midsized article into long one. Many smaller articles serves the readers just fine and much of the suggested material above might be better in separate entries and/or the overview article for distance. -- Kmhkmh ( talk) 22:36, 18 November 2023 (UTC)
![]() | Euclidean distance has been listed as one of the Mathematics good articles under the good article criteria. If you can improve it further, please do so. If it no longer meets these criteria, you can reassess it. | |||||||||
| ||||||||||
![]() | A
fact from this article appeared on Wikipedia's
Main Page in the "
Did you know?" column on
December 26, 2020. The text of the entry was: Did you know ... that although the
Euclidean distance and the
Pythagorean theorem are both ancient concepts, the Pythagorean formula for distance was not published until 1731? |
![]() | This article is rated GA-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
Is that formula for approximating the distance using only integers wrong? Surely if dx and dy are the same (eg, at a 45-degree angle) then dx + dy - 2×min(dx,dy) will always be 0, and the approximation will always be 100% error?
I think it is worth noting that the Euclidean metric used to be called Pythagorean metric. At least there should be a page title Pythagorean metric that redirects here. 127
Where it says "The technique has been rediscovered numerous times throughout history, as it is a logical extension of the Pythagorean theorem.", are they talking about repeated use of the pythagorean theorem to prove the pythagorean theorem? The statement seems disjointed. 80.2.17.86 ( talk) 23:15, 14 March 2008 (UTC)
A fast approximation of 2D distance based on an octagonal boundary can be computed as follows. Let ( absolute value) and . If , approximated distance is .
You inspired me to start a wikibooks page, please share and improve: http://en.wikibooks.org/wiki/Algorithms/Distance_approximations -- mcld ( talk) 09:20, 23 September 2012 (UTC)
If you want to know whether objects A and B are at distance c or less, you can compare ((Ax - Bx)^2 + (Ay - By)^2 + (Az - Bz)^2) with c^2, and similarly for other numbers of dimensions. This avoids the square root entirely. If c is a constant, then c^2 can be precomputed as well. -- Myria 06:18, 21 July 2006 (UTC)
Where is that section? I think it was accidentally removed with the approximations, put it back. Comparing distances without using the square root is a simple but very important fact in software/hardware development since the square root is a very expensive operation. Raising the awareness of such a simple fact has a positive contribution to technology and thus humanity which nowadays suffers from slow, overbloated and resource-hungry software. Wikipedia is not only about abstract mathematical concepts.-- PE ( talk) 11:27, 14 May 2008 (UTC)
I corrected the formula for the distance in circular coordinates. -- EarthJoker 12:25, 23 July 2007 (UTC)
Why is the approximation section here? Euclidean metrics are very simple concepts, and I don't think you'd find anything about approximation in 99% of the textbooks that cover the topic. It seems like the audience for that material is different from the audience for the rest of the article. At the very least, there should be a reference here, or some explanation as to why it works.
Also, I moved the approximation sections to the end of the page because it seems important to at least see the 3D version before this is discussed. Triathematician ( talk) 01:16, 20 December 2007 (UTC)
Does this have anything to do with Euclid? If so, should it be mentioned or at least 'See also'ed? Bitwiseb ( talk) 17:46, 4 April 2008 (UTC)
Yes, it's the same Euclid. 129.132.152.15 ( talk) 10:03, 13 November 2008 (UTC)
What's so unique about the Euclidean metric? What properties does the euclidian metric have that other metric spaces don't have, such as the other Minkowski metrics? What is a rotation in a metric space? Do other metric spaces not have the property that the composition of two rotations is always a rotation? Blackbombchu ( talk) 02:03, 29 August 2015 (UTC)
I removed the following section as it imho does really fits here for several reasons. First of all the triangle inequality has its own article, so the definition and various derivations should be handled there. Secondly imho scope and style of the section went a bit against the notion "wikipedia is not a textbook". While proofs or short derivation may on occasion be included or sketched in wikipedia articles, it is usually not desired to have longer technically detailed prrof or textbook derivations/proofs.
Maybe the section can be moved to a suitable project on Wikibooks or to the ProofWiki project.-- Kmhkmh ( talk) 23:53, 19 March 2019 (UTC)
For any points , and holds
with equality if and only if there is such that . To prove it, we need the following Lemma.
For any reals holds
(*)
with equality iff for all or there is a non-negative such that for all . It is easy to see that if holds for all , then equality holds in (*). Prove we the statement in the case that for at least one . Then .
Both sides of the inequality (*) are non-negative. For this reason, it is equivalent to it's square.
which is equivalent to
After cancelation, we obtain the equivalent inequality
(**)
To prove this inequality, consider we the inequality
which holds for all reals . It can be rewritten as
This is quadric inequality by because . Because this quadric inequality holds for all real , the discriminant is less or equal to zero.
(***):
Now, we can conclude that
and therefore inequality (**) holds.
If equality holds in (**), then the left side of (**) is non-negative and equality in (***) holds. Therefore, there is some real such that for all . The value can not be negative because the left side of (***) is non-negative.
Let , and . Use we notation
, .
Applying previous lemma, we have
or
where equality holds iff or there is such that
holds for all ,
which is equivalent to
for all
or
for some and for all .
Because is equivalent to
for and for all .
We can conclude that equality holds in the triangle inequality iff
for some and for all .
If we present the Euclidean distance as a l2 norm, the squared norm is
Then the gradient is
It follows
— Preceding unsigned comment added by Lantonov ( talk • contribs) 22:29, 9 November 2020 (UTC)
I don't like the categorical statement that "the squared Euclidean distance cannot be a metric because it does not satisfy the triangle ineqality" although this statement is properly sourced. Mathematically, the statement is OK if we understand the metric as metric (mathematics); however, in general relativity by metric is understood the metric tensor (general relativity) and then the statement is not true: squared Euclidean distance generates the metric of the flat 3-D (Euclidean) space. This is a source of confusion for readers with different backgrounds. Lantonov ( talk) 10:21, 10 November 2020 (UTC)
both are called "metric" in their respective fields: But we are not talking about the word "metric", we are talking about the phrase "metric space". Is that exact phrase ever used to mean something that cannot be viewed as a special case of the definition at the article metric space? — David Eppstein ( talk) 07:57, 11 November 2020 (UTC)
The result was: promoted by
Amkgp (
talk) 04:48, 14 December 2020 (UTC)
Improved to Good Article status by David Eppstein ( talk). Self-nominated at 07:43, 11 December 2020 (UTC).
General: Article is new enough and long enough |
---|
Policy: Article is sourced, neutral, and free of copyright problems |
---|
|
Hook: Hook has been verified by provided inline citation |
---|
|
QPQ: Done. |
The following edits were recently reverted.
1. Removal of reference to squared distance being called "quadrance" in rational trigonometry as WP:UNDUE. This seemed clear enough; if the article were trying to catalogue appearances and avatars of squared distance, things like quadratic forms, Hilbert space and Bregman divergence would have far higher priority but are not even mentioned. Rational trigonometry is a one-man show by its inventor, has not caught on whatsoever (as noted in its Wikipedia page), and is already being hyped at a number of other WP locations. No need to promote it where it is at best marginally related to the topic.
2. Reworking of the statements on non-Euclidean geometry. The problematic passage states:
This is wrong as a description of non-Euclidean geometry. It is anachronistic; the notion of "mathematical space" came later, and distance functions on such spaces. It is also misleading: it was a familiar everyday fact that travel distance differs from Euclidean distance (hence the phrase "as the crow flies"), and well known to cognoscenti that maps of the Earth distort distance and that spherical geometry/trigonometry differ from the Euclidean version.
My attempt to state this more correctly is the last paragraph of https://en.wikipedia.org/?title=Euclidean_distance&oldid=996504346#History . This has been reverted as "tendentious" by @ David Eppstein:, but I do not understand what he thinks is wrong with it or how it is inferior to the preceding. 73.89.25.252 ( talk) 07:13, 27 December 2020 (UTC)
(Moved from above. 73.89.25.252 ( talk) 20:22, 30 December 2020 (UTC))
FWIW, I saw that mention of "rational trigonometry" a while back and thought about cutting it per WP:DUE. Does including it here truly enrich anyone's understanding of Euclidean distance, or geometry in general? I'm doubtful. XOR'easter ( talk) 05:56, 28 December 2020 (UTC)
An editor has identified a potential problem with the redirect
Euclidean metric and has thus listed it
for discussion. This discussion will occur at
Wikipedia:Redirects for discussion/Log/2022 May 4#Euclidean metric until a consensus is reached, and readers of this page are welcome to contribute to the discussion.
fgnievinski (
talk) 17:05, 4 May 2022 (UTC)
Article Metric (mathematics) says:
...a metric or distance function is a function that gives a distance between each pair of point elements of a set.
Article Metric space says:
In fact, a "metric" is the generalization of the Euclidean metric arising from the four long-known properties of the Euclidean distance. The Euclidean metric defines the distance between two points as the length of the straight line segment connecting them.
I still don't get why folks seem upset with applying MOS:BOLDREDIRECT to "Euclidean metric"? Squared Euclidean distance already calls it a "function" -- what else does the WP-Math cabal need? fgnievinski ( talk) 22:35, 4 May 2022 (UTC)
In advanced mathematics, the concept of distance has been generalized to abstract metric spaces, and other distances than Euclidean have been studied.is perfectly enough. Anyone who knows what a "metric" is (a small subset of this article's intended audience!) can reasonably infer what the "Euclidean metric" is. In all likelihood, such a person will have already been introduced to the Euclidean metric on R^n as their first example. WP math articles already have a reputation for turning elementary concepts into turgid prose, and imo we should do as much as possible to fight that. Readers first! Ovinus ( talk) 00:33, 5 May 2022 (UTC)
I'm not sure where/how best to integrate a few subjects that seem worth mentioning here.
1. Loci of equidistant points. I think it's worth discussing how the locus of points equidistant from a point is a circle, the locus of points equidistant from a circle is a concentric circle, the locus of points equidistant from a straight line is a parallel line, and in general it's possible to draw the locus of points equidistant to some curve ( Parallel curve) or other point set. Also cf. Signed distance function.
2. Various measures of the "distance" between various kinds of shapes are based on Euclidean distance, and have useful applications. For example, the Fréchet distance between curves.
3. Chord length vs. arc length vs. other measurements between points on a curve or surface. In e.g. Greek spherics/astronomy, compasses were used to draw circles on solid spheres and transfer geometric objects between the sphere and an auxiliary plane. Hipparchus' foundation of trigonometry in relating circular chord length to arc length had to do with this "chordal" Euclidean distance inherited from the ambient Euclidean space.
4. Squared distance in pseudo-Euclidean space, and the comparison between "space-like" vs. "time-like" vs. "light-like" displacements in spacetime.
@ David Eppstein any thoughts? – jacobolus (t) 20:07, 18 November 2023 (UTC)
Aside from which additional here might be appropriate here, I'd like to emphasize there is no general need to turn every short or midsized article into long one. Many smaller articles serves the readers just fine and much of the suggested material above might be better in separate entries and/or the overview article for distance. -- Kmhkmh ( talk) 22:36, 18 November 2023 (UTC)