Math Lab
Home/Class XII/Ch 4/Area of a triangle

Area of a triangle

A triangle in the coordinate plane with vertices (x1,y1),(x2,y2),(x3,y3)(x_1, y_1), (x_2, y_2), (x_3, y_3) has area given by an explicit determinant. The formula is widely used in geometry, in surveying, and in computer graphics. As a corollary, three points are collinear iff this determinant is zero , a simple algebraic test that avoids slope comparisons.

The formula

Given three points A1=(x1,y1),A2=(x2,y2),A3=(x3,y3)A_1 = (x_1, y_1), A_2 = (x_2, y_2), A_3 = (x_3, y_3) in the plane, the area of triangle A1A2A3A_1 A_2 A_3 is

Area=12det(x1y11x2y21x3y31).\text{Area} = \frac{1}{2} \left| \det \begin{pmatrix} x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1 \end{pmatrix} \right|.

The absolute value is necessary: a positive determinant means the vertices are listed counterclockwise; a negative determinant means clockwise. Either way, area is positive.

Derivation

Expand the determinant along the third column:

det=x1(y2y3)y1(x2x3)+(x2y3x3y2)\det = x_1(y_2 - y_3) - y_1(x_2 - x_3) + (x_2 y_3 - x_3 y_2) =x1(y2y3)+x2(y3y1)+x3(y1y2)= x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2).

Geometrically this is twice the signed area of the triangle, obtained by computing the cross product of two edge vectors A1A2\vec{A_1 A_2} and A1A3\vec{A_1 A_3}. The factor 1/21/2 in the formula corrects for this doubling.

Collinearity test

Three points are collinear iff they form a degenerate triangle, i.e., the area is zero. By the formula, this happens iff

det(x1y11x2y21x3y31)=0.\det\begin{pmatrix} x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1 \end{pmatrix} = 0.

This is often the most efficient way to check collinearity.

Equation of a line through two points

The line through (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) consists of all points (x,y)(x, y) collinear with these two. Set up the collinearity determinant:

det(xy1x1y11x2y21)=0.\det\begin{pmatrix} x & y & 1 \\ x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \end{pmatrix} = 0.

Expanding gives the line equation in two-point form.

Worked examples

Example 1. Find the area of triangle with vertices (2,3),(4,7),(8,5)(2, 3), (4, 7), (8, 5).

det(231471851)=2(75)3(48)+(2056)=4+1236=20\det\begin{pmatrix} 2 & 3 & 1 \\ 4 & 7 & 1 \\ 8 & 5 & 1 \end{pmatrix} = 2(7 - 5) - 3(4 - 8) + (20 - 56) = 4 + 12 - 36 = -20.

Area =20/2=10= |-20|/2 = 10.

Example 2. Are (1,2),(3,4),(5,6)(1, 2), (3, 4), (5, 6) collinear?

det(121341561)=1(46)2(35)+1(1820)=2+42=0\det\begin{pmatrix} 1 & 2 & 1 \\ 3 & 4 & 1 \\ 5 & 6 & 1 \end{pmatrix} = 1(4 - 6) - 2(3 - 5) + 1(18 - 20) = -2 + 4 - 2 = 0. Yes, collinear.

Example 3. Find the equation of the line through (1,2)(1, 2) and (3,4)(3, 4).

det(xy1121341)=0\det\begin{pmatrix} x & y & 1 \\ 1 & 2 & 1 \\ 3 & 4 & 1 \end{pmatrix} = 0.

Expand: x(24)y(13)+(46)=2x+2y2=0x(2 - 4) - y(1 - 3) + (4 - 6) = -2x + 2y - 2 = 0, so y=x+1y = x + 1.

Example 4. Find the value of kk so that the area of the triangle with vertices (1,4),(k,0),(0,k)(1, 4), (k, 0), (0, k) is 44.

det(141k010k1)=1(0k)4(k0)+(k20)=k25k\det\begin{pmatrix} 1 & 4 & 1 \\ k & 0 & 1 \\ 0 & k & 1 \end{pmatrix} = 1(0 - k) - 4(k - 0) + (k^2 - 0) = k^2 - 5k.

Area =k25k/2=4k25k=±8= |k^2 - 5k|/2 = 4 \Rightarrow k^2 - 5k = \pm 8.

Solve: k25k8=0k^2 - 5k - 8 = 0 gives k=(5±57)/2k = (5 \pm \sqrt{57})/2. Or k25k+8=0k^2 - 5k + 8 = 0 has no real roots (Δ=2532<0\Delta = 25 - 32 < 0). So k=(5+57)/2k = (5 + \sqrt{57})/2 or (557)/2(5 - \sqrt{57})/2.

Example 5. Show that the points (a,b+c),(b,c+a),(c,a+b)(a, b + c), (b, c + a), (c, a + b) are collinear.

det(ab+c1bc+a1ca+b1)\det\begin{pmatrix} a & b + c & 1 \\ b & c + a & 1 \\ c & a + b & 1 \end{pmatrix}. Add column 11 to column 22: (aa+b+c1ba+b+c1ca+b+c1)\begin{pmatrix} a & a + b + c & 1 \\ b & a + b + c & 1 \\ c & a + b + c & 1 \end{pmatrix}. Pull out a+b+ca + b + c: (a+b+c)det(a11b11c11)=0(a + b + c) \det\begin{pmatrix} a & 1 & 1 \\ b & 1 & 1 \\ c & 1 & 1 \end{pmatrix} = 0 (two equal columns).

So area =0= 0; the points are collinear.

Example 6. Find the area of the parallelogram with sides as vectors (2,3)(2, 3) and (5,1)(5, 1) starting from origin.

Area=det(2351)=215=13\text{Area} = |\det\begin{pmatrix} 2 & 3 \\ 5 & 1 \end{pmatrix}| = |2 - 15| = 13.

Try it yourself

  1. Find the area of the triangle with vertices (0,0),(4,0),(0,3)(0, 0), (4, 0), (0, 3).
  2. Check collinearity of (2,3),(4,5),(6,7)(2, 3), (4, 5), (6, 7).
  3. Find the area of the triangle with vertices (1,2),(1,3),(3,1)(1, 2), (-1, 3), (3, -1).
  4. Find the equation of the line through (2,1)(2, 1) and (4,5)(4, 5) using determinants.
  5. Show that the points (a,0),(0,b),(a,b)(a, 0), (0, b), (a, b) are not collinear unless a=0a = 0 or b=0b = 0.
  6. If the area of the triangle with vertices (x,4),(2,6),(5,4)(x, 4), (2, -6), (5, 4) is 3535 sq units, find xx.
  7. Determine kk so that the points (k,2k),(2,6),(3,1)(k, 2k), (-2, 6), (3, 1) are collinear.
  8. Find the area of the parallelogram with vertices (0,0),(3,0),(4,5),(1,5)(0, 0), (3, 0), (4, 5), (1, 5). Hint: divide into two triangles.
  9. Find the equation of the line through (3,1)(3, -1) that is parallel to the line through (2,4)(2, 4) and (6,4)(6, 4).
  10. If (a,b),(c,d),(e,f)(a, b), (c, d), (e, f) are collinear, prove det(ab1cd1ef1)=0\det\begin{pmatrix} a & b & 1 \\ c & d & 1 \\ e & f & 1 \end{pmatrix} = 0.
  11. Find the area of the triangle with vertices (2,0),(0,3),(4,5)(2, 0), (0, 3), (4, 5).
  12. Are the points (0,0),(1,2),(3,6)(0, 0), (1, 2), (3, 6) collinear?
  13. Find the area of the triangle whose vertices are (1,1),(3,2),(5,1)(1, 1), (3, 2), (5, 1).
  14. Show that the line det(xy1121341)=0\det\begin{pmatrix} x & y & 1 \\ -1 & 2 & 1 \\ 3 & -4 & 1 \end{pmatrix} = 0 passes through both (1,2)(-1, 2) and (3,4)(3, -4).

Pitfalls / Tricks

  • Always take the absolute value at the end; area is positive.
  • A determinant of zero means area zero, i.e., collinear points (degenerate triangle).
  • The third column of 11s is what makes the formula work; do not omit it.
  • For a parallelogram with vectors u,v\vec u, \vec v from a vertex, the area is the absolute value of det(u,v)\det(\vec u, \vec v), no 1/21/2 factor.

Next we systematise minors and cofactors.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Area of a triangle
6 questions · pick the best answer
Q1

Q2

Q3

Q4

Q5

Q6