Distance Between Two Points Notes
These Distance Between Two Points Notes explain how to find the straight-line distance between two points on a coordinate plane, with the working shown line by line. The horizontal gap and the vertical gap between the points are the two shorter sides of a right triangle, so each difference is squared, the squares are added, and the square root of that total is the distance. Following the same pattern every time is what makes the distance formula easy to check and repeat.
Enter the coordinates for \((x_{1}, y_{1})\) and \((x_{2}, y_{2})\).
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute the two pairs of coordinates into the formula.
- Work out the distance.
Formula: Distance Formula
This formula gives the straight-line distance d between two points. Subtract the x values and the y values, square both, add, then take the square root.
Useful Tips to Remember
The distance formula is \(d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\), which is Pythagoras' theorem on a grid. Subtract the coordinates in the same order for both \(x\) and \(y\). Squaring makes any negative differences positive, so the order of the points does not change the answer. Add the squares before taking the square root, and remember that a distance can never be negative.
Required knowledge
- How to subtract numbers, including negatives, covered in the Subtraction of Small Numbers Calculator.
- How to take a square root like √52, covered in the Simplifying Radicals Calculator.
- Where the formula comes from, covered in the Pythagoras Theorem Calculator.
Where Is the Distance Between Two Points Used?
The distance formula finds the straight-line length between two points from their coordinates, using Pythagoras' theorem on the horizontal and vertical gaps. It is the maths behind measuring distances on maps and in apps, such as how far a delivery is or which shop is closest. Video games use it to check when characters collide, and robots and drones use it to plan routes. In data science, the same formula measures how similar two data points are, which powers recommendation systems and machine learning.
- Measuring straight-line distances on maps and grid plans
- Finding the nearest shop, station or driver in apps
- Detecting collisions between objects in video games
- Planning paths for robots and drones
- Comparing data points in machine learning
Distance Between Two Points Practice Problems
Example 1 finds the distance from \((2, 3)\) to \((14, 11)\), and Example 2 uses \((-5, 2)\) and \((15, 9)\) with a negative coordinate. Examples 3 and 4 give you two more problems of the same kind to try. Try the distance formula yourself, then compare.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. Try each problem on paper first, then open the example and check your working one step at a time, so you can see exactly which step went wrong if your answer does not match. Use them to check your answers and to understand why each step works.
See Example 1 Hide Example 1
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute the two pairs of coordinates into the formula.
- Work out the distance.
Formula
Formula: Distance Formula
This formula gives the straight-line distance d between two points. Subtract the x values and the y values, square both, add, then take the square root.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the distance between the points \((2, 3)\) and \((14, 11)\).
Step 2
Step 2 - Write the formula.
In this problem: The horizontal gap and the vertical gap between the points are the two shorter sides of a right triangle, and the straight line joining the points is its hypotenuse.
Step 3
Step 3 - Substitute the two pairs of coordinates into the formula.
In this problem: Replacing each coordinate in \(d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}\) gives \(d = \sqrt{\left(14 - 2\right)^{2} + \left(11 - 3\right)^{2}}\).
Step 4
Step 4 - Work out the distance.
In this problem: Subtracting the x-coordinates gives the horizontal difference: \(14 - 2 = 12\). Subtracting the y-coordinates gives the vertical difference: \(11 - 3 = 8\). Squaring the horizontal difference gives \(12^{2} = 144\). Squaring the vertical difference gives \(8^{2} = 64\). Adding the two squares gives \(144 + 64 = 208\). Taking the square root undoes the squaring and gives \(\sqrt{208} \approx 14.42\).
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute the two pairs of coordinates into the formula.
- Work out the distance.
Formula
Formula: Distance Formula
This formula gives the straight-line distance d between two points. Subtract the x values and the y values, square both, add, then take the square root.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the distance between the points \((-5, 2)\) and \((15, 9)\).
Step 2
Step 2 - Write the formula.
In this problem: The horizontal gap and the vertical gap between the points are the two shorter sides of a right triangle, and the straight line joining the points is its hypotenuse.
Step 3
Step 3 - Substitute the two pairs of coordinates into the formula.
In this problem: Replacing each coordinate in \(d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}\) gives \(d = \sqrt{\left(15 - \left(-5\right)\right)^{2} + \left(9 - 2\right)^{2}}\).
Step 4
Step 4 - Work out the distance.
In this problem: Subtracting the x-coordinates gives the horizontal difference: \(15 - \left(-5\right) = 20\). Subtracting the y-coordinates gives the vertical difference: \(9 - 2 = 7\). Squaring the horizontal difference gives \(20^{2} = 400\). Squaring the vertical difference gives \(7^{2} = 49\). Adding the two squares gives \(400 + 49 = 449\). Taking the square root undoes the squaring and gives \(\sqrt{449} \approx 21.19\).
Final Answer
See Example 3 Hide Example 3
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute the two pairs of coordinates into the formula.
- Work out the distance.
Formula
Formula: Distance Formula
This formula gives the straight-line distance d between two points. Subtract the x values and the y values, square both, add, then take the square root.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the distance between the points \((1, 1)\) and \((4, 5)\).
Step 2
Step 2 - Write the formula.
In this problem: The horizontal gap and the vertical gap between the points are the two shorter sides of a right triangle, and the straight line joining the points is its hypotenuse.
Step 3
Step 3 - Substitute the two pairs of coordinates into the formula.
In this problem: Replacing each coordinate in \(d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}\) gives \(d = \sqrt{\left(4 - 1\right)^{2} + \left(5 - 1\right)^{2}}\).
Step 4
Step 4 - Work out the distance.
In this problem: Subtracting the x-coordinates gives the horizontal difference: \(4 - 1 = 3\). Subtracting the y-coordinates gives the vertical difference: \(5 - 1 = 4\). Squaring the horizontal difference gives \(3^{2} = 9\). Squaring the vertical difference gives \(4^{2} = 16\). Adding the two squares gives \(9 + 16 = 25\). Taking the square root undoes the squaring and gives \(\sqrt{25} = 5\).
Final Answer
See Example 4 Hide Example 4
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute the two pairs of coordinates into the formula.
- Work out the distance.
Formula
Formula: Distance Formula
This formula gives the straight-line distance d between two points. Subtract the x values and the y values, square both, add, then take the square root.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the distance between the points \((-2, -3)\) and \((4, 5)\).
Step 2
Step 2 - Write the formula.
In this problem: The horizontal gap and the vertical gap between the points are the two shorter sides of a right triangle, and the straight line joining the points is its hypotenuse.
Step 3
Step 3 - Substitute the two pairs of coordinates into the formula.
In this problem: Replacing each coordinate in \(d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}\) gives \(d = \sqrt{\left(4 - \left(-2\right)\right)^{2} + \left(5 - \left(-3\right)\right)^{2}}\).
Step 4
Step 4 - Work out the distance.
In this problem: Subtracting the x-coordinates gives the horizontal difference: \(4 - \left(-2\right) = 6\). Subtracting the y-coordinates gives the vertical difference: \(5 - \left(-3\right) = 8\). Squaring the horizontal difference gives \(6^{2} = 36\). Squaring the vertical difference gives \(8^{2} = 64\). Adding the two squares gives \(36 + 64 = 100\). Taking the square root undoes the squaring and gives \(\sqrt{100} = 10\).
Final Answer
Calculator and Practice Mode
Want to check your own working? The Distance Between Two Points Calculator solves any problem you type in and shows every step, so you can compare it line by line with your answer and find exactly where a mistake crept in. When you are ready to test yourself, Distance Between Two Points Practice gives you a new problem at Easy, Medium or Hard level, checks your answer and shows the full working whenever you get one wrong. Practice Mode is available on the Plus and Pro plans.