The distance formula
The distance between two points (x₁, y₁) and (x₂, y₂) in 2D is d = √((x₂ − x₁)² + (y₂ − y₁)²). This extends to 3D by adding a z-component: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²).
The midpoint between the two points is found by averaging each coordinate: M = ((x₁ + x₂)/2, (y₁ + y₂)/2).
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Euclidean distance in 2D.
M = ((x₁ + x₂)/2, (y₁ + y₂)/2)
Midpoint formula.