Formula: Slope & Midpoint Mathematical Identity
- x1: X1 (numeric parameter)
- y1: Y1 (numeric parameter)
- x2: X2 (numeric parameter)
- y2: Y2 (numeric parameter)
Find distance √(Δx² + Δy²), midpoint ((x₁+x₂)/2, (y₁+y₂)/2), and slope Δy/Δx.
It has no slope. Enter (2, 3) and (2, 9) and the card drops the slope and intercept lines, while the sentence reports the slope as undefined and the line as x = 2. The distance of 6, midpoint (2, 6) and inclination of 90 degrees are still shown, so you get everything a vertical line actually has.
No. Distance, slope, intercept and midpoint are symmetric, so swapping the default points still gives 10, 0.75, 1.5 and (6, 6). The inclination angle is also unchanged at 36.87 degrees, because it describes the line rather than a direction of travel. Only a bearing from one point to the other would depend on the order.
It is y₁ minus the slope times x₁. With the default slope 0.75 and point (2, 3), that gives 3 minus 1.5, so b is 1.5 and the line is y = 0.75x + 1.5. The Lower preset shows 2.182 and the Higher preset 0.429. For a vertical line there is no intercept, so the line is left off.
The page reports inclination, measured anticlockwise from the positive x-axis and kept between 0 and 180 degrees. A line falling to the right leans back past the vertical, so its inclination is more than 90. From (-4, 5) to (2, -3) the slope is -1.333, and the inclination is -53.13 degrees plus a half turn.
No. The page takes only x and y. In three dimensions the distance adds a third squared difference under the square root, and the midpoint averages the z values too. Slope and inclination angle do not carry over directly, since a line in space needs a direction vector instead of a single slope.
Start from point one and add the fraction times each difference. A quarter of the way from (2, 3) to (10, 9) is 2 plus 2 and 3 plus 1.5, giving (4, 4.5). The midpoint shown on the page is the special case of one half, which lands on (6, 6).
It is the length of the straight segment joining the two points. A line in geometry has no ends and no length. Here 10 units is the segment from (2, 3) to (10, 9). For a walking or driving route between two places, the real path is usually longer than this straight distance.
Multiply the slope by a hundred. The default slope of 0.75 is a 75 percent grade, which means 75 units of rise for every hundred of run. It describes the same line as the 36.87 degree angle on the card, but grade and angle are different scales, so a 75 percent grade is nowhere near 75 degrees.
Moving x₁ to 1.2 makes Δx 8.8 instead of 8, and 8.8 squared plus 36 is not a perfect square. The result, 10.651, is the rounded square root. Only special combinations like the default's 8, 6, 10 come out exact.
The page refuses to calculate and explains that the two points are the same, so there is no line, slope or direction. A distance of zero and a midpoint equal to the point would be true but unhelpful, and the slope would be zero divided by zero. Change either coordinate of point two to get a line.
Yes, if they are on a flat grid such as projected metres or plan units. Distance comes out in those same units. Latitude and longitude are angles on a sphere, so plugging them in directly gives a distorted result except over very short distances; convert them to a projected grid first.
Run the calculator for points one and two, then for points one and three. If both runs give the same slope and intercept, the points are collinear. With the default line, (14, 12) gives 0.75 and 1.5 again and lies on it. If the runs report a vertical line, compare the x value the sentence names instead.
The default pair of points was chosen so the arithmetic comes out clean. Point one is (2, 3) and point two is (10, 9). The calculator returns a distance of 10 units, a slope of 0.75, a y-intercept of 1.5, a midpoint at (6, 6) and an inclination angle of 36.87 degrees.
Each figure comes from two differences. Going from the first point to the second, x rises by 8 and y rises by 6. Those two numbers, usually written Δx and Δy, are all the page really needs. Distance, slope and angle are three ways of describing the same step of 8 across and 6 up, and the midpoint is simply where you stand halfway along it.
An 8, 6, 10 triangle is a scaled copy of the classic 3, 4, 5 right triangle, doubled. That is why the distance is a whole number here. Move either point slightly and it stops being one: the Lower preset with x₁ of 1.2 gives 10.651, and the Higher preset with x₁ of 3 gives 9.22.
Distance is Pythagoras on the two differences. Square 8 to get 64 and 6 to get 36. Their sum is exactly a hundred, and its square root is 10. The order of the points does not matter, because squaring removes any minus sign.
Slope is rise over run, Δy divided by Δx. Six divided by 8 is 0.75. This one also survives swapping the points: going from (10, 9) back to (2, 3), both differences turn negative, and -6 divided by -8 is still 0.75.
The midpoint averages the coordinates. Two plus 10 is 12, halved to 6. Three plus 9 is 12, halved to 6. So the midpoint is (6, 6).
Try the Lower preset the same way. Δx is 10 minus 1.2, or 8.8. Δy is still 6. Its square is 77.44; add 36 and take the square root, and the distance is 10.651. The slope is 6 divided by 8.8, or 0.682, and the midpoint moves left to (5.6, 6). Every line on the card agrees with this working.
The card shows the y-intercept b, the height where the line crosses the y-axis. It comes from the slope and either point in one step: b = y₁ minus m times x₁.
For the default, that is 3 minus 0.75 times 2, which is 3 minus 1.5, giving b = 1.5, the figure on the card. The line through both points is y = 0.75x + 1.5. Check it with the second point: 0.75 times 10 is 7.5, plus 1.5 is 9. It passes through (10, 9) as it should, and through the midpoint too: 0.75 times 6 plus 1.5 is 6.
For the Higher preset, with the first point at (3, 3), the slope is 0.857 and the card shows b as 0.429. Using the full slope of six sevenths gives b of exactly 3/7, which the sentence prints as 0.4286. The Lower preset gives b = 2.182, or 2.1818 in the sentence. If you recompute b from the three-decimal slope instead of the exact one, expect the last digit to differ.
If you need the line in general form, multiply through to clear decimals. For the default, y = 0.75x + 1.5 becomes 3x minus 4y plus 6 = 0.
Enter two points with the same x, for example (2, 3) and (2, 9), and the slope line and the y-intercept line disappear from the card. The sentence underneath says the slope is undefined and names the line: vertical line x = 2. That is correct. Δx is zero, so rise over run would mean dividing by zero, and a vertical line never crosses the y-axis unless it is the axis itself.
The other outputs for this vertical pair are still there. The distance is 6, the midpoint is (2, 6), and the inclination angle is 90 degrees, straight up from the x-axis.
A horizontal pair is the opposite case. Points (2, 3) and (10, 3) give slope 0, y-intercept 3, angle 0 and distance 8. A slope of 0 always means horizontal; an undefined slope always means vertical. Students mix the two up often, and the page now keeps them apart.
If both points are identical, the page returns an error explaining that the two points are the same, so there is no line, slope or direction. A single point has a position but nothing else this calculator measures.
The angle line measures the inclination of the line: the angle from the positive x-axis, turning anticlockwise, to the line itself. It always falls between 0 and 180 degrees. For the default it is 36.87 degrees, the arctangent of 0.75.
Because a line has no direction, the order of the points does not matter. Swap them so that point one is (10, 9) and point two is (2, 3), and the card still shows slope 0.75, intercept 1.5 and an angle of 36.87 degrees.
Downhill lines land in the upper half of the range. From (-4, 5) to (2, -3) the slope is -1.333, the intercept is -0.333, and the inclination is a little under one hundred and twenty-seven degrees. The arctangent of -1.333 on a calculator gives -53.13 degrees; adding a half turn gives the inclination the page shows. That is the textbook convention, so the figure can go straight into a homework answer.
If you want a direction of travel, such as a bearing from one survey point to another, inclination is not enough on its own, since it cannot tell north-east from south-west. Look at the signs of Δx and Δy to decide which way along the line you are heading.
Two lines are perpendicular when their slopes multiply to -1. With the default slope of 0.75, a perpendicular line has slope -1 divided by 0.75, which is -4/3 or about -1.333.
The perpendicular bisector of the segment passes through the midpoint with that slope. Through (6, 6), it is y minus 6 = -4/3 times (x minus 6), or y = -4/3 x + 14. Every point on it is the same distance from (2, 3) as from (10, 9). It is the line you would draw to find the centre of a circle through both points, or to place something equally far from two fixed positions.
For a vertical segment the bisector is horizontal, and for a horizontal segment it is vertical. The vertical case is easy to spot on this page, because the slope line is missing and the sentence names the line as x = something.
Two outputs together describe a circle. If the segment from (2, 3) to (10, 9) is a diameter, the centre is the midpoint (6, 6) and the radius is half the distance, 5. The circle's equation is (x minus 6) squared plus (y minus 6) squared equals 25. Any point on that circle forms a right angle with the two endpoints, which is a neat way to construct a right triangle on a given hypotenuse.
The slope also lets you test whether a third point lies on the same line. Run the page once with point one and the third point. If the slope and intercept match 0.75 and 1.5, all three are collinear. For example (6, 6) passes, as it must, and (14, 12) passes too: from (2, 3) it is 12 across and 9 up, a slope of 0.75.
Distance from a point to the line is a different quantity the page does not compute. Use the general form 3x minus 4y plus 6 = 0: plug in the point, take the absolute value, and divide by 5, the square root of 3 squared plus 4 squared.
The result card shows up to three decimals, so the Lower preset's distance reads 10.651 and its slope 0.682. The interpretation sentence underneath keeps four: 10.6508 and 0.6818. The midpoint in that sentence is rounded to two decimals.
For homework, quote what the question asks, often three significant figures or an exact surd. The exact Lower preset distance is an irrational square root, which no decimal display can show in full. The default's exact answer is simply 10.
The angle is shown to three decimals in degrees, for example 34.287 for the Lower preset and 40.601 for the Higher one. If you need radians, divide the degrees by about 57.3; the default 36.87 degrees is roughly 0.644 radians. Be careful copying a rounded slope into another formula: using 0.682 instead of the full 6/8.8 shifts later results in the third decimal.
The fields are labelled X1, Y1, X2 and Y2. The most common mistake is entering a point as (y, x), especially when copying from a table with columns in an unexpected order. The distance and midpoint will still look plausible, but the slope becomes its reciprocal: 1.333 instead of 0.75 for the default.
Mixing points is the second. Entering x₁ and y₂ from one point and the rest from another gives a wrong but perfectly valid-looking answer. Read the interpretation sentence, which prints both points back as pairs, to catch this.
Negative coordinates need the minus sign in the field. The units label on every output is just units, so if your coordinates are metres on a site plan, the distance is in metres and the slope is a pure ratio, despite what the label says.