Distance Calculator
Calculate the distance between two points in 2D or 3D coordinate space and find their midpoint with detailed step-by-step solutions.
Distance Calculator
Point A
Point B
About Distance Calculation
Distance calculation between points is fundamental in coordinate geometry and has numerous applications in mathematics, physics, engineering, and computer graphics.
Distance Formulas
- 2D Distance: d = √[(x₂-x₁)² + (y₂-y₁)²]
- 3D Distance: d = √[(x₂-x₁)² + (y₂-y₁)² + (z₂-z₁)²]
- n-D Distance: d = √[Σ(xᵢ₂-xᵢ₁)²] for i=1 to n
Midpoint Formulas
- 2D Midpoint: M = ((x₁+x₂)/2, (y₁+y₂)/2)
- 3D Midpoint: M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2)
Applications
- Navigation: GPS coordinates, route planning
- Computer Graphics: 3D modeling, collision detection
- Physics: Motion analysis, force calculations
- Engineering: Structural analysis, surveying
- Machine Learning: Clustering algorithms, nearest neighbor
Special Cases
- Same Point: Distance = 0
- Horizontal Line: Distance = |x₂ - x₁|
- Vertical Line: Distance = |y₂ - y₁|
- Unit Circle: Distance from origin = 1
Related Concepts
- Manhattan Distance: |x₂-x₁| + |y₂-y₁| (city block distance)
- Chebyshev Distance: max(|x₂-x₁|, |y₂-y₁|)
- Minkowski Distance: Generalization of Euclidean distance
- Hamming Distance: For strings and binary data