Given: A planar
simple polygon with a
positively oriented (counterclockwise) sequence of points P_i=(x_i,y_i), i=1,\dots,n in a
Cartesian coordinate system. For the simplicity of the formulas below it is convenient to set P_0 = P_n, P_{n+1} = P_1.
The formulas: The area of the given polygon can be expressed by a variety of formulas, which are connected by simple operations (see below): If the polygon is
negatively oriented, then the result A of the formulas is negative. In any case |A| is the sought area of the polygon.
Trapezoid formula The trapezoid formula sums up a sequence of oriented areas A_i=\tfrac 1 2(y_i + y_{i+1})(x_i - x_{i+1}) of
trapezoids with P_iP_{i+1} as one of its four edges (see below): \begin{align} A &= \frac 1 2 \sum_{i=1}^n (y_i + y_{i+1})(x_i - x_{i+1})\\ &=\frac 1 2 \Big((y_1+y_2)(x_1-x_2)+ \cdots +(y_n+y_1)(x_n-x_1)\Big) \end{align}
Triangle formula The triangle formula sums up the oriented areas A_i of triangles OP_iP_{i+1}: \begin{align} B &= \frac 1 2 \sum_{i=1}^n (x_iy_{i+1}-x_{i+1}y_i) =\frac 1 2\sum_{i=1}^{n}\begin{vmatrix} x_i & x_{i+1} \\ y_i & y_{i+1} \end{vmatrix} =\frac 1 2\sum_{i=1}^{n}\begin{vmatrix} x_i & y_i \\ x_{i+1} & y_{i+1} \end{vmatrix}\\ &=\frac 1 2 \Big(x_1 y_2- x_2 y_1 +x_2 y_3- x_3 y_2+\cdots +x_ny_1-x_1y_n\Big) \end{align}
Shoelace formula The triangle formula is the base of the popular
shoelace formula, which is a scheme that optimizes the calculation of the sum of the 2×2-determinants by hand: \begin{align}2A &= \begin{vmatrix} x_1 & x_2 \\ y_1 & y_2 \end{vmatrix} + \begin{vmatrix} x_2 & x_3 \\ y_2 & y_3 \end{vmatrix} +\cdots + \begin{vmatrix} x_n & x_1 \\ y_n & y_1 \end{vmatrix} \\[10mu] &= \begin{vmatrix} x_1 & x_2 &x_3 \cdots &x_n&x_1\\ y_1 & y_2 &y_3 \cdots &y_n&y_1 \end{vmatrix} \end{align} Sometimes this
determinant is
transposed (written vertically, in two columns), as shown in the diagram.
Other formulas \begin{align} A &=\frac 1 2 \sum_{i=1}^n y_i(x_{i-1}-x_{i+1})\\ & =\frac 1 2 \Big(y_1(x_n-x_2)+y_2(x_1-x_3)+ \cdots+y_n(x_{n-1}-x_1)\Big) \end{align} A=\frac 1 2 \sum_{i=1}^n x_i(y_{i+1} - y_{i-1})
Exterior algebra A particularly concise statement of the formula can be given in terms of the
exterior algebra. Let \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n be the consecutive vertices of the polygon. The Cartesian coordinate expansion of the
outer product with respect to the standard ordered orthonormal plane basis (\mathbf{x}, \mathbf{y}) gives \mathbf{v}_i \wedge \mathbf{v}_{i+1} = (x_i y_{i+1} - x_{i+1} y_i) \; \mathbf{x} \wedge \mathbf{y} and the oriented area is given as follows. A = \frac{1}{2} \sum_{i=1}^{n} v_i \wedge v_{i+1} = \frac{1}{2} \sum_{i=1}^{n} (x_i y_{i+1} - x_{i+1} y_i) \; \mathbf{x} \wedge \mathbf{y} Note that the area is given as a multiple of the unit area \mathbf{x} \wedge \mathbf{y} . == Example ==