1
$\begingroup$

Given 3 points, $A$, $B$ and $C$ in anti clockwise order, I have to find the area of the $\triangle ABC$. The formula is area $=\frac{1}{2}(A_x*B_y+B_x*C_y+C_x*A_y-A_y*B_x-B_y*C_x-C_y*A_x)$. Here $A_x$ is the $x$ coordinate of point $A$, and $A_y$ the $y$ coordinate. Why does this equation work to find the area of a triangle? What is the principle behind it? Why must this be done in an anti clockwise manner? Do note that doing in a clockwise manner will yield negative results(as I experimented). Why does this happen too?

$\endgroup$
  • $\begingroup$ Search up the shoelace formula. The formula you have given is the triangle case for the shoelace formula. $\endgroup$ – Landuros Jan 19 '18 at 11:30
1
$\begingroup$

It is an application of cross product, since

$$|\vec v \times \vec w|=|\vec v||\vec w|\sin \theta$$

and the area of triangle with sides $|\vec v|$ and $|\vec w|$ is given by

$$A=\frac12|\vec v||\vec w|\sin \theta$$

Note that it not necessary to take into account the order if we consider the absolute value.

For the calculation you should consider for example

$\vec v=(A_x-B_x,A_y-B_y,A_z-B_z)$

$\vec w=(A_x-C_x,A_y-C_y,A_z-C_z)$

$$\vec v \times \vec w=\begin{vmatrix} i&j&k\\A_x-B_x&A_y-B_y&A_z-B_z\\A_x-C_x&A_y-C_y&A_z-C_z \end{vmatrix}=...$$

Take also a look here how to calculate area of 3D triangle?

$\endgroup$
0
$\begingroup$

Start with something more basic: The area of a triangle with vertices $P=(x_1,y_2)$, $Q=(x_2,y_0)$ and $O=(0,0)$ is the absolute value of $$a(\triangle{OPQ}) = \frac12\begin{vmatrix}x_1&x_2\\y_1&y_2\end{vmatrix}.$$ You can find several proofs that the above determinant gives the area of the parallelogram with sides $OP$ and $OQ$ here, and $\triangle{OPQ}$ is half of this parallelogram.

$a(\triangle{OPQ})$ itself is a signed value, and its sign turns out to have a meaning that will be useful in the general formula: if the vertices are traversed counterclockwise, the value is positive; if counterclockwise, then it is negative.

We can rewrite your formula for the area of $\triangle{ABC}$ as a sum of determinants, and so as the sum of signed areas: $$\frac12\begin{vmatrix}A_x&B_x\\A_y&B_y\end{vmatrix} + \frac12\begin{vmatrix} B_x&C_x\\B_y&C_y \end{vmatrix} + \frac12\begin{vmatrix} C_x&A_x\\C_y&A_y \end{vmatrix} = a(\triangle{OAB})+a(\triangle{OBC})+a(\triangle{OCA}).$$ If the origin lies within $\triangle{ABC}$, then this is a decomposition into three smaller triangles, all traversed counterclockwise, and the total area is obviously the sum of their areas.

Things are a bit more interesting if the origin is exterior to $\triangle{ABC}$ as in the example illustrated below:

enter image description here

Observe that the first two triangles cover $\triangle{ABC}$, but they also include the excess yellow area of $\triangle{OAC}$. However, the latter’s vertices are traversed clockwise in the formula, so its area gets subtracted from the total, leaving only the area of $\triangle{ABC}$.

Traversing the vertices of $\triangle{ABC}$ clockwise reverses the orientation of each of the three sub-triangles, which in turn changes the sign of the determinant, so this also changes the sign of the total area without changing its magnitude.

The above isn’t a formal proof, of course, which would require dealing with every possible arrangement of the three points, but it should give you an idea of how the formula works. It’s in fact a special case of the “shoelace formula” for the area of a non-self intersecting polygon, as Landuros commented: you go around the polygon and compute the algebraic sum of the signed areas of the triangles defined by successive vertices. Just as with the above triangle, the excess area that is added due to using triangles with a vertex at the origin gets canceled when you traverse edges in a clockwise direction relative to the origin.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.