Given two points, the line through them is fixed. The two-point form writes it in one step: the slope from the points, times how far x is from the first point.
Swap the sides, so that what you are solving for stands on the left.
y=y₁+y₂−y₁x₂−x₁(x−x₁)
y=10
y equals 2 plus (((6 minus 2) divided by (3 minus 1)) times (5 minus 1)), equals 2 plus ((4 divided by 2) times 4), equals 2 plus (2 times 4), equals 2 plus 8, equals 10
Check with the second point: 2 · 3 = 6. ✓ The result is the same if you start from (3, 6) instead: y − 6 = 2(x − 3) gives y = 2x.
At x = 5 the line has y = 2 + 2 · 4 = 10, which is also what the card gives.
When x₂ = x₁
The two points then lie directly above each other, on a vertical line. The slope would need a division by
zero, and the form does not apply. The line is simply x = x₁, which the general form writes as x − x₁ = 0.
Common mistakes
Subtracting in different orders. If y₂ − y₁ is on top, x₂ − x₁ must be underneath. Mixing the two
gives the wrong sign for the slope.
Writing y + y₁. The left side is y − y₁, and a negative y₁ needs brackets: y − (−3) = y + 3.
Forgetting the point. After finding the slope, the line still has to be pinned to one of the points.
Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.