The area of a triangle whose coordinates are known can be found by formula. Take the triangle with vertices , and .
When a base and a height can be read off directly, that is enough. The side lies on and has length . The height of the vertex is its distance from that base, the difference between the -coordinate of and the line , so . The area is therefore .
When the base is not parallel to an axis, the following formula applies. For , and the area is as follows.
Substituting gives , agreeing with the answer above.
The formula becomes clearer once the vertex is moved to the origin. Translating there carries to and to . The area of the triangle formed by the origin and two points and takes the following form.
Substituting gives . A translation does not change an area, so this is all that is needed. The quantity is the area of the parallelogram spanned by the two vectors, and the triangle is exactly half of it.
| Method | Computation | Result |
|---|---|---|
| Base and height | ||
| The coordinate formula | ||
| Moving to the origin |
The absolute value is there to make the area positive, so that the answer does not depend on the order of the vertices. The sign of the value without it records the direction in which is traced.
The area is exactly when the triangle collapses, so the formula also serves as a test of whether three points are collinear.
The same idea extends to a polygon, tracing the vertices in order, and becomes the shoelace formula1. A triangle is its simplest case.
The three lines on the graph are the three sides, and the large dots are the vertices , and .