# How to calculate area of triangle, having its points 2d coordinates?

We have points A, B, C. On 2d plane. How having points coordinates (x, y) calculate area of triangle formed by them?

-
English, please. –  Zarrax Nov 16 '10 at 3:58

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.

-
Straying 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!) –  Rahul Nov 16 '10 at 6:41
@Rahul: Yeah, the couple of times I had to use both determinants and norms, I always used $|\det\mathbf{A}|$. –  Ｊ. Ｍ. Nov 16 '10 at 7:02

If by square you mean the area, Heron's formula is your friend. Just calculate the side lengths and the semiperimeter.

-
If the coordinates of the points are known, Heron's formula is overkill. The area is just half the cross product of two edges. –  Rahul Nov 16 '10 at 3:53
@Rahul: Right you are. –  Ross Millikan Nov 16 '10 at 5:14