Collinear Points Checker

Are the three points on one line?

How it is calculated

For three points (x1, y1), (x2, y2), (x3, y3) the tool computes the area of the triangle they would form: A = |x1(y2 − y3) + x2(y3 − y1) + x3(y1 − y2)| ÷ 2. If A is below 0.000000001 the verdict is Collinear, otherwise Not collinear. The area is printed to 4 decimal places in squared coordinate units. The tolerance is absolute, not relative, so it does not scale with the size of your numbers. Because only 4 decimals are shown, a tiny non-zero area can print as 0.0000 while the verdict still says Not collinear. Repeated points always count as collinear. Any empty box gives no result.

Worked example

Check (1, 2), (3, 6) and (5, 10). Substitute into the expression: 1 × (6 − 10) = −4, 3 × (10 − 2) = 24, 5 × (2 − 6) = −20. The sum is −4 + 24 − 20 = 0, so the area is 0 ÷ 2 = 0,0000 in the printed form 0.0000. The verdict is Collinear (on one line). This agrees with the slopes: from the first to the second point the slope is (6 − 2) ÷ (3 − 1) = 2, and from the second to the third it is (10 − 6) ÷ (5 − 3) = 2.

Try this example →

Common mistakes

  • Expecting the area to be the answer. For this tool the useful output is the verdict; a zero area is just the test behind it.
  • Mixing coordinates, for instance typing (x, y) as (y, x) for only one point. Every point must use the same axis order or the points will not line up.
  • Rounding the input coordinates first. Points like 0.333 and 0.333333 are not the same, and a rounded value can turn a collinear set into a non-collinear one, with a very small area.
  • Reading 0.0000 as proof of collinearity. A small area is shown as 0.0000 while the verdict can still say Not collinear, so trust the verdict.
  • Checking only slopes by hand with a vertical line. Slope fails when x1 = x2 (division by zero), but the area test handles vertical lines without trouble.

About this calculator

Three points are collinear when they all lie on the same straight line. The standard test computes the signed area of the triangle they would form: for points (x₁,y₁), (x₂,y₂), (x₃,y₃), the expression x₁(y₂−y₃) + x₂(y₃−y₁) + x₃(y₁−y₂) equals zero exactly when the triangle collapses to a line — an equivalent way to say the slope between the first two points matches the slope between the last two.

This check matters in computational geometry and computer graphics, where a triangle with zero area is a degenerate triangle that breaks mesh rendering and collision detection algorithms. GIS software uses it to simplify routes and detect redundant vertices in a polyline, and structural engineers use the same logic to confirm that support points or survey markers actually align rather than deviating by a small but real amount.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators