Distance Between Two Points
Coordinate Geometry · Class X
Drag two points A(x1,y1) and B(x2,y2) and watch the distance update.
- Distance AB5
- Slope of AB1.3333
- Midpoint x2.5
- Midpoint y4
- Line through A and B
Formulas in this lab
- Distance AB
- Slope of AB
- Midpoint x
- Midpoint y
Frequently asked questions
▶What is the distance formula?
The distance between $A(x_1, y_1)$ and $B(x_2, y_2)$ is $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$. It is just Pythagoras applied to the right triangle formed by the two points and the horizontal and vertical gaps.
▶How do I use this lab?
Slide the four coordinates and the lab draws the segment AB and shows the distance live. Try $A(1, 2)$ and $B(4, 6)$ to see the classic 3-4-5 triangle producing distance 5.
▶Common mistake on this topic
Students forget to square the differences or forget the final square root. Order of subtraction does not matter since we square it, but always write the formula first to avoid sign mix-ups.
▶Where do we use distance in real life?
GPS apps compute the straight-line distance between two locations using the same formula (adapted for spheres). When two friends mark their houses on graph paper, the distance formula gives the bird's-eye gap between them.