The area of a triangle with vertices at A(x1,y1), B(x2,y2), and C(x3,y3) is given by:
Area(△ABC)=21x1x2x3y1y2y3111
Proof:
Consider trapezoids ABML, ACNL, and BCNM with bases on the x-axis and vertices A, B, and C having coordinates (x1,y1), (x2,y2), and (x3,y3), respectively. The vertical lines AM, BN, and CL are drawn from vertices A, B, and C perpendicular to the x-axis, meeting at points M, N, and L on the x-axis. These perpendiculars define the heights of the respective trapezoids.
The area of trapezoid ABML is given by the average of the lengths of the parallel sides (y1 and y2) multiplied by the distance between them (x2−x1):
AreaABML=21(y1+y2)(x2−x1)
Similarly, the area of trapezoid ACNL is:
AreaACNL=21(y1+y3)(x3−x1)
And the area of trapezoid BCNM is:
AreaBCNM=21(y2+y3)(x3−x2)
As can be seen in the figure, the area of triangle ABC is the sum of the areas of trapezoids ABML and ACNL minus the area of trapezoid BCNM:
AreaABC=AreaABML+AreaACNL−AreaBCNM
Substituting the area expressions and simplifying, the resulting area of triangle ABC is:
Let a polygon P with vertices V1,V2,…,Vn be given. Then the area A(P) of polygon P is equal to the sum of the areas of the triangles formed by connecting a chosen vertex Vi to all non-adjacent vertices of P.
Proof:
Begin with selecting vertex Vi from polygon P. This vertex acts as a common vertex for the triangulation process. Construct segments from Vi to all non-adjacent vertices Vi+2,…,Vi−1 (indices considered modulo n), thereby dividing P into n−2 triangles.
Denote the area of a triangle with vertices Vi,Vj,Vk as A(ViVjVk). The area of P, which can be represented as the sum of the areas of these triangles, is given by:
By the principle of additivity of areas, the sum of the areas of the triangles equals the area of P. Since these triangles are non-overlapping and cover P entirely, no area is counted twice, and no region within P is omitted. Hence, the area of polygon P is the sum of the areas of the triangulated sections.
To apply the Shoelace Formula to a polygon with vertices A1,A2,...,An, list the coordinates in a tabular form with two columns, arranging the abscissas (x-coordinates) in the first column and the ordinates (y-coordinates) in the second column. Include an additional row at the bottom with the coordinates of the first vertex A1 repeated to close the loop.
The Shoelace Formula is then executed by cross-multiplying the entries diagonally and summing the products. Specifically, for each row, multiply the x-coordinate by the y-coordinate of the next row and sum these values. Then, subtract the sum of the products obtained by multiplying the y-coordinate of each row by the x-coordinate of the next row.
Formally, for vertices (x1,y1),(x2,y2),...,(xn,yn), the area A is given by the absolute value of:
A=21i=1∑n(xiyi+1−xi+1yi)
where xn+1=x1 and yn+1=y1 to ensure the loop is closed.