Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Euclidean distance
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Two dimensions === In the [[Euclidean plane]], let point <math>p</math> have [[Cartesian coordinates]] <math>(p_1,p_2)</math> and let point <math>q</math> have coordinates <math>(q_1,q_2)</math>. Then the distance between <math>p</math> and <math>q</math> is given by:<ref name=cohen>{{citation|title=Precalculus: A Problems-Oriented Approach|first=David|last=Cohen|edition=6th|publisher=Cengage Learning|year=2004|isbn=978-0-534-40212-9|page=698|url=https://books.google.com/books?id=_6ukev29gmgC&pg=PA698}}</ref> <math display=block>d(p,q) = \sqrt{(p_1-q_1)^2 + (p_2-q_2)^2}.</math> This can be seen by applying the [[Pythagorean theorem]] to a [[right triangle]] with horizontal and vertical sides, having the line segment from <math>p</math> to <math>q</math> as its [[hypotenuse]]. The two squared formulas inside the square root give the areas of squares on the horizontal and vertical sides, and the outer square root converts the area of the square on the hypotenuse into the length of the hypotenuse.<ref>{{citation|title=College Trigonometry|first1=Richard N.|last1=Aufmann|first2=Vernon C.|last2=Barker|first3=Richard D.|last3=Nation|edition=6th|publisher=Cengage Learning|year=2007|isbn=978-1-111-80864-8|page=17|url=https://books.google.com/books?id=kZ8HAAAAQBAJ&pg=PA17}}</ref> In terms of the [[Pythagorean addition]] operation <math>\oplus</math>, available in many [[software library|software libraries]] as <code>hypot</code>, the same formula can be expressed as:<ref>{{citation|title=Java Script Notes for Professionals|first=Rohit|last=Manglik|publisher=EduGorilla|year=2024|isbn=9789367840320|contribution=Section 14.22: Math.hypot|page=144|contribution-url=https://books.google.com/books?id=jwU6EQAAQBAJ&pg=PA144}}</ref> <math display=block>d(p,q) = (p_1-q_1) \oplus (p_2-q_2) = \mathsf{hypot}(p_1-q_1,p_2-q_2).</math> It is also possible to compute the distance for points given by [[Polar coordinate system|polar coordinates]]. If the polar coordinates of <math>p</math> are <math>(r,\theta)</math> and the polar coordinates of <math>q</math> are <math>(s,\psi)</math>, then their distance is<ref name=cohen /> given by the [[law of cosines]]: <math display=block>d(p,q)=\sqrt{r^2 + s^2 - 2rs\cos(\theta-\psi)}.</math> When <math>p</math> and <math>q</math> are expressed as [[complex number]]s in the [[complex plane]], the same formula for one-dimensional points expressed as real numbers can be used, although here the absolute value sign indicates the [[complex norm]]:<ref>{{citation|title=Complex Numbers from A to ... Z|first1=Titu|last1=Andreescu|first2=Dorin|last2=Andrica|publisher=Birkhäuser|year=2014|edition=2nd|isbn=978-0-8176-8415-0|contribution=3.1.1 The Distance Between Two Points|pages=57–58}}</ref> <math display=block>d(p,q)=|p-q|.</math>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Euclidean distance
(section)
Add topic