We have points A, B & C in 2D plane. How having point coordinates $(x, y)$ to calculate area of triangle formed by them?
How to calculate area of triangle having its points 2D coordinates?
2
$\begingroup$
geometry
linear-algebra
euclidean-geometry
-
2English, please. – 2010-11-16
2 Answers
6
To make Rahul's comment more explicit, the determinant formula
$$\frac12 \begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix}$$
where the $(x_i,y_i)$ are the coordinates of the corners, gives the (signed) area of the triangle. For a guaranteed positive result, the points are to be taken anticlockwise.
-
0Straying slightly off-topic, I never noticed before I saw your answer that the obvious way to write the absolute value of a determinant is pretty ugly: $\big\lvert\lvert A\rvert\big\rvert$... (Of course one may write $\lvert\det A\rvert$, but one needs foresight for that!) – 2010-11-16
-
0@Rahul: Yeah, the couple of times I had to use both determinants and norms, I always used $|\det\mathbf{A}|$. – 2010-11-16
0
If by square you mean the area, Heron's formula is your friend. Just calculate the side lengths and the semiperimeter.
-
4If the coordinates of the points are known, Heron's formula is overkill. The area is just half the cross product of two edges. – 2010-11-16
-
0@Rahul: Right you are. – 2010-11-16