- x₁ (first point)
- 0
- y₁ (first point)
- 0
- x₂ (second point)
- 3
- y₂ (second point)
- 4
5.000000
Open with these values5.000000
Result: 5.000000Subtract the coordinates, square both gaps, add them and take the square root. From (0, 0) to (3, 4) that is √(9 + 16) = 5. The order of the two points does not matter, because squaring removes the sign, and identical points give zero.
Held fixed: x₁ (first point) 0.0000, y₁ (first point) 0.0000, x₂ (second point) 3.0000.
| y₂ (second point) | Result |
|---|---|
| 0.0000 | 3.000000 |
| 1.0000 | 3.162278 |
| 2.0000 | 3.605551 |
| 3.0000 | 4.242641 |
| 4.0000Your value | 5.000000 |
| 5.0000 | 5.830952 |
| 6.0000 | 6.708204 |
| 7.0000 | 7.615773 |
| 8.0000 | 8.544004 |
5.000000
Open with these values5.000000
Open with these values5.000000
Open with these valuesd = √((x₂ − x₁)² + (y₂ − y₁)²)
| x₁, y₁, x₂, y₂ | Δx, Δy | Distance |
|---|---|---|
| 2, 2, 2, 2 | 0, 0 | 0.000000 |
| 0, 0, 3, 4 | 3, 4 | 5.000000 |
| 1, 1, 4, 5 | 3, 4 | 5.000000 |
| -2, -3, 1, 1 | 3, 4 | 5.000000 |
| 0, 0, 0, 7 | 0, 7 | 7.000000 |
Use the distance formula: d = √((x₂ − x₁)² + (y₂ − y₁)²). Subtract the x-coordinates and the y-coordinates, square each difference, add them and take the square root. For (0, 0) and (3, 4) that is √(9 + 16) = √25 = 5.
The horizontal gap Δx and the vertical gap Δy are the two legs of a right triangle, and the distance is its hypotenuse. Pythagoras says hypotenuse² = leg² + leg², which is exactly the distance formula.
No. Swapping the points flips the sign of Δx and Δy, but each difference is squared and squaring removes the sign. The distance stays identical.
Yes, in any quadrant. For (−2, −3) and (1, 1) the gaps are Δx = 3 and Δy = 4, giving a distance of 5. Two identical points give a distance of zero.
Anywhere a straight-line gap on a flat plane matters: distances on a map or screen, collision and proximity checks in games, hit-testing in graphics, and nearest-neighbour work in data.
Information, not professional advice.
Diese Seite gibt es auch auf Deutsch.
Zu Deutsch wechseln