In short
Given the coordinates of the vertices, the area of a triangle is half the absolute value of a specific expression involving the coordinates — an expression that also appears as a 3 \times 3 determinant. When that expression equals zero, the three points are collinear (they lie on the same straight line). The same idea extends to quadrilaterals and arbitrary polygons via the shoelace formula.
Take three points on a sheet of graph paper: A(1, 1), B(5, 1), C(3, 4). They form a triangle. You can see it, you can trace it with your finger — but what is its area?
One approach: draw the triangle, measure the base and height with a ruler, and use \frac{1}{2} \times \text{base} \times \text{height}. That works, but it requires you to figure out which side is the base and then find the perpendicular height from the opposite vertex — which is messy when the triangle is tilted.
There is a better way. A formula that takes only the coordinates of the three vertices and hands you the area directly. No base, no height, no perpendicular measurement. Just six numbers in, one number out. The same formula also answers a second question for free: are the three points collinear?
Why not just use base times height?
You already know the formula \frac{1}{2} \times \text{base} \times \text{height} from school geometry. The trouble is that for a triangle placed arbitrarily on the coordinate plane, finding the "height" is itself a whole problem. The height is the perpendicular distance from a vertex to the opposite side — and computing that perpendicular involves finding the equation of the line through the base, then the perpendicular from the vertex, then the foot of the perpendicular, then the distance. That's four steps before you even start on the area.
What you want is a formula that skips all of that — one that takes the six raw coordinates and hands you the area in a single computation. Such a formula exists, and the idea behind it is surprisingly elegant.
Building the formula from a rectangle
Here is the idea. Instead of measuring the triangle directly, trap it inside a rectangle aligned with the axes, and subtract the parts you don't want.
Take the triangle A(1, 1), B(5, 1), C(3, 4). The smallest axis-aligned rectangle that contains this triangle has corners at (1, 1), (5, 1), (5, 4), (1, 4).
The rectangle has width 5 - 1 = 4 and height 4 - 1 = 3, so its area is 4 \times 3 = 12.
The three corners of the rectangle that are not vertices of triangle ABC create three right triangles between the rectangle and the triangle:
- Top-left triangle (between A, C, and the corner (1, 4)): base = 3 - 1 = 2, height = 4 - 1 = 3, area = \frac{1}{2} \times 2 \times 3 = 3.
- Top-right triangle (between C, B, and the corner (5, 4)): base = 5 - 3 = 2, height = 4 - 1 = 3, area = \frac{1}{2} \times 2 \times 3 = 3.
- Bottom edge: here A and B already share the base of the rectangle at y = 1, so there is no triangle to subtract at the bottom.
Area of triangle ABC = 12 - 3 - 3 = 6 square units.
This subtraction method always works, but it is tedious. Each triangle has different dimensions, and for a general triangle none of the sides are horizontal or vertical. What you want is a single formula that handles everything at once.
There is a more systematic approach — the trapezoid method — that leads directly to a clean formula. Instead of subtracting corner triangles from a rectangle, it projects each edge of the triangle onto the x-axis, creating trapezoids whose signed areas combine to give the triangle's area.
The area formula for a triangle
The rectangle-subtraction approach, when carried out algebraically for a general triangle with vertices (x_1, y_1), (x_2, y_2), (x_3, y_3), simplifies to a surprisingly compact expression.
Derivation
Let the three vertices be A(x_1, y_1), B(x_2, y_2), C(x_3, y_3). The area can be derived by computing the signed contributions of the trapezoids formed by projecting each edge onto the x-axis.
Consider the edge from A to B. The trapezoid between this edge and the x-axis has parallel sides y_1 and y_2 (the heights of the two endpoints) and width x_2 - x_1. Its signed area is:
Why: the area of a trapezoid is \frac{1}{2} \times (\text{sum of parallel sides}) \times \text{width}. The sign of (x_2 - x_1) makes this positive when traversing left-to-right and negative when traversing right-to-left.
Similarly, for edges B \to C and C \to A:
The signed area of the triangle is the sum T_1 + T_2 + T_3. Expanding each term:
Adding all three, several terms cancel in pairs — specifically, x_2 y_2 cancels with -x_2 y_2, and -x_1 y_1 cancels with x_1 y_1, and x_3 y_3 cancels with -x_3 y_3:
Why: six of the twelve terms cancel, leaving exactly six terms — three with a plus sign and three with a minus sign, arranged in a cyclic pattern.
This can be rewritten by grouping:
The expression above gives a signed area — positive if the vertices are listed counter-clockwise, negative if clockwise. Taking the absolute value gives the actual area.
Area of a triangle
The area of the triangle with vertices A(x_1, y_1), B(x_2, y_2), C(x_3, y_3) is
Equivalently, using a determinant:
The determinant form is the same expression, just written more compactly. Expanding the 3 \times 3 determinant along the third column gives exactly x_1(y_2 - y_3) - y_1(x_2 - x_3) + 1(x_2 y_3 - x_3 y_2), which rearranges to the formula above.
Condition for collinearity
Something special happens when the area of the triangle is zero. A triangle with zero area is not really a triangle — its three vertices must lie on a single straight line. Three such points are called collinear.
From the area formula, the area is zero precisely when:
Condition for collinearity
Three points A(x_1, y_1), B(x_2, y_2), C(x_3, y_3) are collinear if and only if
or equivalently,
This is a powerful test. To check whether three points lie on one line, you don't need to find the equation of the line and test each point — you just plug the six coordinates into the formula and check whether the result is zero.
The geometric intuition is direct: three points that lie on a single line cannot enclose any area between them. The "triangle" they form is completely flat — degenerate — with zero area. The formula detects exactly this.
An alternative view: equal slopes
There is another way to think about collinearity. Three points A, B, C are collinear if and only if the slope from A to B equals the slope from B to C:
Cross-multiplying gives (y_2 - y_1)(x_3 - x_2) = (y_3 - y_2)(x_2 - x_1). Expanding both sides and rearranging yields exactly the condition x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) = 0. So the area-based test and the slope-based test are the same condition written in different forms.
The slope version has one drawback: it fails when x_1 = x_2 (division by zero). The area-based version has no such problem — it handles vertical lines just fine.
Area of a quadrilateral
For a quadrilateral with vertices A, B, C, D listed in order (either clockwise or counter-clockwise), split it into two triangles along a diagonal and add their areas.
If the diagonal is AC, then:
Each triangle's area comes from the formula you already know. But there is a more elegant approach that handles any polygon — the shoelace formula.
The shoelace formula
The trapezoid method used to derive the triangle area formula extends naturally to any polygon. For an n-sided polygon with vertices (x_1, y_1), (x_2, y_2), \ldots, (x_n, y_n) listed in order around the boundary:
Shoelace formula
where the indices wrap around: (x_{n+1}, y_{n+1}) = (x_1, y_1).
The name "shoelace" comes from the pattern of the computation. Write the coordinates in two columns, and draw lines diagonally between them — the crisscross pattern looks like the lacing on a shoe.
How the computation works
List the vertices in a column, repeating the first vertex at the bottom:
Multiply diagonally downward-right (x_i \cdot y_{i+1}) and sum all such products. Then multiply diagonally downward-left (x_{i+1} \cdot y_i) and sum those. The area is half the absolute difference.
For a quadrilateral with vertices (x_1, y_1), (x_2, y_2), (x_3, y_3), (x_4, y_4):
When n = 3, this reduces to exactly the triangle area formula derived earlier.
Why the shoelace formula works
The formula sums the signed areas of the trapezoids formed by projecting each edge of the polygon onto the x-axis — the same idea used to derive the triangle formula. As you trace the polygon's boundary, some trapezoids contribute positive area (edges going left-to-right) and some contribute negative area (edges going right-to-left). The net sum gives the interior area of the polygon, with a sign that depends on whether you traversed clockwise or counter-clockwise. Taking the absolute value eliminates the sign.
The beauty of the shoelace formula is its generality: the polygon can be convex or concave, regular or irregular. As long as the vertices are listed in order around the boundary (and the boundary does not cross itself), the formula works.
Worked examples
Example 1: Area and collinearity check
Are the points P(2, 3), Q(5, 9), R(8, 15) collinear? If not, find the area of triangle PQR.
Step 1. Set up the coordinates.
Why: labelling carefully prevents sign errors in the formula.
Step 2. Compute the expression inside the absolute value.
Why: each term is an x-coordinate times the difference of the other two y-coordinates. The cyclic pattern ensures every coordinate appears exactly once as a multiplier.
Step 3. Interpret the result.
Since the expression equals 0, the area is \frac{1}{2}|0| = 0.
Step 4. State the conclusion.
Result: The three points are collinear. They all lie on a single straight line.
A quick check: the slope from P to Q is \frac{9-3}{5-2} = 2, and the slope from Q to R is \frac{15-9}{8-5} = 2. Equal slopes confirm collinearity. The formula and the slope test agree.
Example 2: Area of a quadrilateral using the shoelace formula
Find the area of the quadrilateral with vertices A(0, 0), B(6, 0), C(8, 5), D(2, 5), listed counter-clockwise.
Step 1. Write the vertices in the shoelace arrangement, repeating the first at the end.
Why: the shoelace formula requires the vertices to be listed in order around the boundary. Repeating the first vertex at the end "closes" the polygon.
Step 2. Compute the downward-right diagonal products and sum them.
Why: each product pairs the x-coordinate of one vertex with the y-coordinate of the next vertex in order.
Step 3. Compute the downward-left diagonal products and sum them.
Step 4. Take half the absolute difference.
Result: The area of quadrilateral ABCD is 30 square units.
A sanity check: ABCD is a trapezium with parallel sides AB and DC, both of length 6 (since D to C goes from x=2 to x=8, a span of 6). The height between the parallel sides is 5. The trapezium area formula gives \frac{1}{2}(6 + 6)(5) = 30, matching the shoelace result.
Common confusions
-
"The area formula can give a negative number." The expression inside the absolute value can be negative — that just means you listed the vertices in clockwise order. The absolute value fixes it. If you consistently list vertices counter-clockwise, the expression is always positive, but the absolute value is there as a safety net.
-
"Collinear means the points are close together." No — collinear means they lie on one straight line. Three points can be collinear and millions of units apart (like the points (0, 0), (1000, 2000), (5000, 10000), which all lie on y = 2x). Collinearity is about alignment, not proximity.
-
"The shoelace formula only works for convex polygons." It works for any simple polygon — convex or concave — as long as the boundary does not cross itself. For a self-intersecting polygon (like a figure-eight), the formula gives the algebraic sum of the signed areas, which may not be what you want.
-
"I can list the vertices in any order." The vertices must be listed in order around the boundary — either all clockwise or all counter-clockwise. If you jumble the order, you are no longer describing the same polygon, and the formula gives a wrong answer.
-
"The determinant form is a different formula." It is the same formula, written differently. Expanding the 3 \times 3 determinant along the third column reproduces the coordinate expression term by term.
Going deeper
If you came here to learn how to compute areas and test for collinearity, you have everything you need — you can stop here. What follows is for readers who want the geometric meaning of the sign, the connection to cross products, and a few applications.
The sign of the area: orientation
The expression x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) — without the absolute value — is the signed area of the triangle. Its sign tells you the orientation of the vertices:
- Positive: the vertices A \to B \to C go counter-clockwise.
- Negative: the vertices A \to B \to C go clockwise.
- Zero: the points are collinear.
This is not a curiosity — it is genuinely useful. In computational geometry, the signed area is used to determine whether a point lies to the left or right of a directed line, which is the basic building block of algorithms for convex hulls, triangulation, and polygon intersection.
Connection to the cross product
If you know vectors, the area formula has a clean geometric interpretation. Define the vectors \vec{AB} = (x_2 - x_1,\; y_2 - y_1) and \vec{AC} = (x_3 - x_1,\; y_3 - y_1).
The cross product of these two vectors (strictly, the z-component of their cross product in 3D, since the vectors lie in the xy-plane) is:
Expanding:
This is exactly the expression in the area formula. So:
The magnitude of the cross product of two vectors equals the area of the parallelogram they span. Half of that is the triangle. This is why the area formula works — it is computing a cross product in disguise.
The shoelace formula for a general polygon — a proof sketch
For an n-sided polygon with vertices listed counter-clockwise, the signed area is:
Here is the idea behind the proof. Divide the polygon into triangles by connecting each edge to the origin. The triangle formed by the origin O and the edge from vertex i to vertex i+1 has signed area \frac{1}{2}(x_i y_{i+1} - x_{i+1} y_i). When you sum these triangles, the areas inside the polygon add up, and the areas outside the polygon (if the origin is outside) cancel. The total is the area of the polygon.
This works regardless of where the origin is — including outside the polygon — because the sign of each triangle's area handles the cancellation automatically. The elegance of the shoelace formula is that all the bookkeeping of which triangles to add and which to subtract is handled by the signs.
Application: checking if a point is inside a triangle
Given a triangle ABC and a point P, here is a method to check whether P is inside the triangle. Compute the areas of the three smaller triangles \triangle PAB, \triangle PBC, \triangle PCA. If the point P is inside \triangle ABC, these three areas sum to exactly the area of \triangle ABC:
If P is outside, the sum is strictly greater. This gives a clean coordinate-based test for point-in-triangle, using nothing more than the area formula applied four times.
Application: area of a triangle with one vertex at the origin
When one vertex is the origin (0, 0), say A = (0, 0), the area formula simplifies considerably:
This is just \frac{1}{2} times the absolute value of the cross product of \vec{OB} and \vec{OC}. Many JEE problems arrange the coordinates so that one vertex is at the origin, specifically to exploit this simplification.
Signed area and the equation of a line
The signed area formula has one more application that connects directly to the next topic in coordinate geometry. Given two fixed points A(x_1, y_1) and B(x_2, y_2), the expression
is the condition for the variable point P(x, y) to be collinear with A and B. Rearranging this gives the equation of the line through A and B in determinant form:
This is one of the cleanest ways to write the equation of a line through two known points. It says: the point (x, y) lies on the line through (x_1, y_1) and (x_2, y_2) if and only if the three points are collinear — which happens if and only if the triangle they form has zero area. The line equation comes for free from the collinearity condition.
Area ratios and section formula
There is a beautiful link between area ratios and the section formula. If P divides the segment BC of triangle ABC in the ratio m : n, then the triangle ABP and triangle APC have areas in the same ratio m : n. This is because triangles sharing the same vertex (A) and with bases on the same line (BC) have areas proportional to their base lengths.
This means you can read off the ratio in which a point divides a side from the ratio of the areas of the sub-triangles. If the areas of triangles ABP and APC are 12 and 8 respectively, then P divides BC in the ratio 12 : 8 = 3 : 2. The area formula and the section formula are deeply connected.
Where this leads next
You now have the tools to measure areas and detect collinearity from coordinates alone. The next topics build on these:
- Centres of Triangle — the centroid, incentre, circumcentre, and orthocentre of a triangle, all expressed in coordinates. The centroid turns out to be the arithmetic mean of the vertices.
- Straight Line Forms — the equation of a line through two points, and the many forms it can take (slope-intercept, point-slope, intercept, normal).
- Locus — the set of all points satisfying a geometric condition, described as an equation in x and y.
- Determinants Introduction — the 3 \times 3 determinant that appears in the area formula is a special case of a larger theory.
- Coordinate Geometry — Basics — if you haven't read it yet, this article covers the distance formula and section formula that underlie everything here.