Finding out the area of a triangle if the coordinates of the three vertices are given

294.3k Views Asked by At

What is the simplest way to find out the area of a triangle if the coordinates of the three vertices are given in $x$-$y$ plane?

One approach is to find the length of each side from the coordinates given and then apply Heron's formula. Is this the best way possible?

Is it possible to compare the area of triangles with their coordinates provided without actually calculating side lengths?

3

There are 3 best solutions below

0
On

What you are looking for is called the shoelace formula:

\begin{align*} \text{Area} &= \frac12 \big| (x_A - x_C) (y_B - y_A) - (x_A - x_B) (y_C - y_A) \big|\\ &= \frac12 \big| x_A y_B + x_B y_C + x_C y_A - x_A y_C - x_C y_B - x_B y_A \big|\\ &= \frac12 \Big|\det \begin{bmatrix} x_A & x_B & x_C \\ y_A & y_B & y_C \\ 1 & 1 & 1 \end{bmatrix}\Big| \end{align*}

The last line indicates how to generalize the formula to higher dimensions.

PS. Another generalization of the formula is obtained by noting that it follows from a discrete version of the Green's theorem:

$$ \text{Area} = \iint_{\text{domain}}dx\,dy = \frac12\oint_{\text{boundary}}x\,dy - y\,dx $$

Thus the signed (oriented) area of a polygon with $n$ vertices $(x_i,y_i)$ is given by

$$ \text{Area} = \frac12\sum_{i=0}^{n-1} x_i y_{i+1} - x_{i+1} y_i $$

where indices are added modulo $n$.

0
On

Heron's formula is inefficient; there is in fact a direct formula. If the triangle has one vertex at the origin, and the other two vertices are $(a,b)$ and $(c,d)$, the formula for its area is $$ A = \frac{\left| ad - bc \right|}{2} $$

To get a formula where the vertices can be anywhere, just subtract the coordinates of the third vertex from the coordinates of the other two (translating the triangle) and then use the above formula.

0
On

if $(x_1,y_1),(x_2,y_2),(x_3,y_3)$ are the vertices of a triangle then its area is given by:-

$$\frac{ 1}{2}|(x_1(y_2-y_3)+x_2(y_3-y_1)+x_3(y_1-y_2))|$$