Collinearity and area of a triangle
Three points are collinear if they lie on a single straight line. A clean coordinate test: the "triangle" they form has area zero.
For a triangle with vertices A = ( x 1 , y 1 ) , B = ( x 2 , y 2 ) , C = ( x 3 , y 3 ) A = (x_1, y_1), B = (x_2, y_2), C = (x_3, y_3) A = ( x 1 , y 1 ) , B = ( x 2 , y 2 ) , C = ( x 3 , y 3 ) , the area is
Area = 1 2 ∣ x 1 ( y 2 − y 3 ) + x 2 ( y 3 − y 1 ) + x 3 ( y 1 − y 2 ) ∣ . \text{Area} = \frac{1}{2} \left| x_1 (y_2 - y_3) + x_2 (y_3 - y_1) + x_3 (y_1 - y_2) \right|. Area = 2 1 ∣ x 1 ( y 2 − y 3 ) + x 2 ( y 3 − y 1 ) + x 3 ( y 1 − y 2 ) ∣ .
The absolute value keeps the area positive. Without it, the signed area is positive if the vertices go counter-clockwise and negative if clockwise.
Collinearity test
Three points are collinear if and only if the area of the triangle they form is zero:
x 1 ( y 2 − y 3 ) + x 2 ( y 3 − y 1 ) + x 3 ( y 1 − y 2 ) = 0. x_1 (y_2 - y_3) + x_2 (y_3 - y_1) + x_3 (y_1 - y_2) = 0. x 1 ( y 2 − y 3 ) + x 2 ( y 3 − y 1 ) + x 3 ( y 1 − y 2 ) = 0.
Equivalently, y 2 − y 1 x 2 − x 1 = y 3 − y 1 x 3 − x 1 \dfrac{y_2 - y_1}{x_2 - x_1} = \dfrac{y_3 - y_1}{x_3 - x_1} x 2 − x 1 y 2 − y 1 = x 3 − x 1 y 3 − y 1 (the slope is the same between any two pairs).
The area formula can be derived in a few ways. One: write the triangle as the sum/difference of trapezoids hanging off the x x x -axis. Another: use the shoelace formula (a special case of determinants from later linear algebra). Both produce the same boxed formula above.
The collinearity-from-area test is intuitive: if the three points are on one line, the "triangle" is degenerate and has no width , area zero.
Worked examples
Example 1. Area of the triangle with vertices ( 1 , 1 ) , ( 4 , 3 ) , ( 2 , 5 ) (1, 1), (4, 3), (2, 5) ( 1 , 1 ) , ( 4 , 3 ) , ( 2 , 5 ) .
Area = 1 2 ∣ 1 ( 3 − 5 ) + 4 ( 5 − 1 ) + 2 ( 1 − 3 ) ∣ = 1 2 ∣ − 2 + 16 − 4 ∣ = 1 2 ⋅ 10 = 5 \text{Area} = \frac{1}{2} |1(3 - 5) + 4(5 - 1) + 2(1 - 3)| = \frac{1}{2} | -2 + 16 - 4 | = \frac{1}{2} \cdot 10 = 5 Area = 2 1 ∣1 ( 3 − 5 ) + 4 ( 5 − 1 ) + 2 ( 1 − 3 ) ∣ = 2 1 ∣ − 2 + 16 − 4∣ = 2 1 ⋅ 10 = 5 .
Example 2. Are ( 1 , 4 ) , ( 3 , 1 ) , ( − 1 , 7 ) (1, 4), (3, 1), (-1, 7) ( 1 , 4 ) , ( 3 , 1 ) , ( − 1 , 7 ) collinear?
Compute area: 1 2 ∣ 1 ( 1 − 7 ) + 3 ( 7 − 4 ) + ( − 1 ) ( 4 − 1 ) ∣ = 1 2 ∣ − 6 + 9 − 3 ∣ = 0 \frac{1}{2}|1(1 - 7) + 3(7 - 4) + (-1)(4 - 1)| = \frac{1}{2}|-6 + 9 - 3| = 0 2 1 ∣1 ( 1 − 7 ) + 3 ( 7 − 4 ) + ( − 1 ) ( 4 − 1 ) ∣ = 2 1 ∣ − 6 + 9 − 3∣ = 0 .
Yes, collinear.
Example 3. Find k k k if the points ( k , 2 ) , ( 2 , k + 1 ) , ( 3 , 4 ) (k, 2), (2, k+1), (3, 4) ( k , 2 ) , ( 2 , k + 1 ) , ( 3 , 4 ) are collinear.
Set area = 0 = 0 = 0 : k ( k + 1 − 4 ) + 2 ( 4 − 2 ) + 3 ( 2 − ( k + 1 ) ) = 0 k(k + 1 - 4) + 2(4 - 2) + 3(2 - (k + 1)) = 0 k ( k + 1 − 4 ) + 2 ( 4 − 2 ) + 3 ( 2 − ( k + 1 )) = 0 .
k ( k − 3 ) + 4 + 3 ( 1 − k ) = 0 ⇒ k 2 − 3 k + 4 + 3 − 3 k = 0 ⇒ k 2 − 6 k + 7 = 0 k(k - 3) + 4 + 3(1 - k) = 0 \Rightarrow k^2 - 3 k + 4 + 3 - 3 k = 0 \Rightarrow k^2 - 6 k + 7 = 0 k ( k − 3 ) + 4 + 3 ( 1 − k ) = 0 ⇒ k 2 − 3 k + 4 + 3 − 3 k = 0 ⇒ k 2 − 6 k + 7 = 0 .
Discriminant = 36 − 28 = 8 = 36 - 28 = 8 = 36 − 28 = 8 . k = ( 6 ± 2 2 ) / 2 = 3 ± 2 k = (6 \pm 2 \sqrt{2})/2 = 3 \pm \sqrt{2} k = ( 6 ± 2 2 ) /2 = 3 ± 2 .
Example 4. Find the area of the quadrilateral with vertices ( − 4 , 2 ) , ( − 3 , − 5 ) , ( 3 , − 2 ) , ( 2 , 3 ) (-4, 2), (-3, -5), (3, -2), (2, 3) ( − 4 , 2 ) , ( − 3 , − 5 ) , ( 3 , − 2 ) , ( 2 , 3 ) .
Split into two triangles by a diagonal. Use diagonal A ( − 4 , 2 ) A(-4, 2) A ( − 4 , 2 ) to C ( 3 , − 2 ) C(3, -2) C ( 3 , − 2 ) .
△ A B C \triangle ABC △ A B C vertices ( − 4 , 2 ) , ( − 3 , − 5 ) , ( 3 , − 2 ) (-4, 2), (-3, -5), (3, -2) ( − 4 , 2 ) , ( − 3 , − 5 ) , ( 3 , − 2 ) :
Area = 1 2 ∣ − 4 ( − 5 − ( − 2 ) ) + ( − 3 ) ( ( − 2 ) − 2 ) + 3 ( 2 − ( − 5 ) ) ∣ = 1 2 ∣ − 4 ⋅ ( − 3 ) + ( − 3 ) ( − 4 ) + 3 ⋅ 7 ∣ = 1 2 ∣ 12 + 12 + 21 ∣ = 45 2 \text{Area} = \frac{1}{2}|-4(-5 - (-2)) + (-3)((-2) - 2) + 3(2 - (-5))| = \frac{1}{2}|-4 \cdot (-3) + (-3)(-4) + 3 \cdot 7| = \frac{1}{2}|12 + 12 + 21| = \frac{45}{2} Area = 2 1 ∣ − 4 ( − 5 − ( − 2 )) + ( − 3 ) (( − 2 ) − 2 ) + 3 ( 2 − ( − 5 )) ∣ = 2 1 ∣ − 4 ⋅ ( − 3 ) + ( − 3 ) ( − 4 ) + 3 ⋅ 7∣ = 2 1 ∣12 + 12 + 21∣ = 2 45 .
△ A C D \triangle ACD △ A C D vertices ( − 4 , 2 ) , ( 3 , − 2 ) , ( 2 , 3 ) (-4, 2), (3, -2), (2, 3) ( − 4 , 2 ) , ( 3 , − 2 ) , ( 2 , 3 ) :
Area = 1 2 ∣ − 4 ( − 2 − 3 ) + 3 ( 3 − 2 ) + 2 ( 2 − ( − 2 ) ) ∣ = 1 2 ∣ 20 + 3 + 8 ∣ = 31 2 \text{Area} = \frac{1}{2}|-4(-2 - 3) + 3(3 - 2) + 2(2 - (-2))| = \frac{1}{2}|20 + 3 + 8| = \frac{31}{2} Area = 2 1 ∣ − 4 ( − 2 − 3 ) + 3 ( 3 − 2 ) + 2 ( 2 − ( − 2 )) ∣ = 2 1 ∣20 + 3 + 8∣ = 2 31 .
Total: 45 / 2 + 31 / 2 = 38 45/2 + 31/2 = 38 45/2 + 31/2 = 38 .
Example 5. If ( x , y ) (x, y) ( x , y ) , ( 2 , 4 ) (2, 4) ( 2 , 4 ) , and ( 3 , 6 ) (3, 6) ( 3 , 6 ) are collinear, show y = 2 x y = 2 x y = 2 x .
Set area = 0 = 0 = 0 : x ( 4 − 6 ) + 2 ( 6 − y ) + 3 ( y − 4 ) = 0 ⇒ − 2 x + 12 − 2 y + 3 y − 12 = 0 ⇒ y − 2 x = 0 x(4 - 6) + 2(6 - y) + 3(y - 4) = 0 \Rightarrow -2 x + 12 - 2 y + 3 y - 12 = 0 \Rightarrow y - 2 x = 0 x ( 4 − 6 ) + 2 ( 6 − y ) + 3 ( y − 4 ) = 0 ⇒ − 2 x + 12 − 2 y + 3 y − 12 = 0 ⇒ y − 2 x = 0 , i.e., y = 2 x y = 2 x y = 2 x . ✓
Try it yourself
Area of triangle with vertices ( 2 , 3 ) , ( − 1 , 0 ) , ( 4 , − 2 ) (2, 3), (-1, 0), (4, -2) ( 2 , 3 ) , ( − 1 , 0 ) , ( 4 , − 2 ) .
Are ( 1 , 1 ) , ( − 2 , 7 ) , ( 3 , − 3 ) (1, 1), (-2, 7), (3, -3) ( 1 , 1 ) , ( − 2 , 7 ) , ( 3 , − 3 ) collinear?
Find k k k if ( k , 0 ) , ( 3 , 0 ) , ( 0 , k ) (k, 0), (3, 0), (0, k) ( k , 0 ) , ( 3 , 0 ) , ( 0 , k ) are collinear. (Geometry hint: think about the line.)
Show that the points ( a , b + c ) , ( b , c + a ) , ( c , a + b ) (a, b + c), (b, c + a), (c, a + b) ( a , b + c ) , ( b , c + a ) , ( c , a + b ) are collinear.
Area of triangle with vertices ( 0 , 0 ) , ( 5 , 0 ) , ( 0 , 7 ) (0, 0), (5, 0), (0, 7) ( 0 , 0 ) , ( 5 , 0 ) , ( 0 , 7 ) .
Find the area of the quadrilateral with vertices ( 1 , 1 ) , ( 3 , 4 ) , ( 5 , − 2 ) , ( 4 , − 7 ) (1, 1), (3, 4), (5, -2), (4, -7) ( 1 , 1 ) , ( 3 , 4 ) , ( 5 , − 2 ) , ( 4 , − 7 ) .
Find k k k if the area of the triangle with vertices ( k , 0 ) , ( 4 , 0 ) , ( 0 , 2 ) (k, 0), (4, 0), (0, 2) ( k , 0 ) , ( 4 , 0 ) , ( 0 , 2 ) is 4 4 4 .
Find k k k if ( 2 , 3 ) , ( 4 , k ) , ( 6 , − 3 ) (2, 3), (4, k), (6, -3) ( 2 , 3 ) , ( 4 , k ) , ( 6 , − 3 ) are collinear.
Prove that if the area of the triangle with vertices ( a 1 , b 1 ) , ( a 2 , b 2 ) , ( a 3 , b 3 ) (a_1, b_1), (a_2, b_2), (a_3, b_3) ( a 1 , b 1 ) , ( a 2 , b 2 ) , ( a 3 , b 3 ) is zero, then the points are collinear.
Find the area of the triangle whose vertices are ( − 2 , 3 ) , ( 3 , 2 ) , ( 1 , − 3 ) (-2, 3), (3, 2), (1, -3) ( − 2 , 3 ) , ( 3 , 2 ) , ( 1 , − 3 ) .
Pitfalls / Insight
Take absolute value at the end to keep area positive.
Don't divide by 2 too early. Compute the bracket first, then halve.
Collinearity = area zero , easier than computing slopes (and avoids division by zero edge cases).
Insight. Area is the algebraic measure of "how spread out" three points are. Collinearity is the limit of zero spread. One formula handles both.