# Find the area of a quadrangle with green´s theorem

How can i prove using Green´s Theorem that the area of a quadrangle with coordinates $(x_i,y_i)$ , $i=1,...,4$ is:

$$A = \sum_{i=1}^{4} (x_{i}y_{i+1}-x_{i+1}y_{i})$$

I prove this with some examples using particular vertices but i don't know how can i apply the Green´s Theorem $$\oint_{\partial D} P\;dx + Q\;dy = \iint_D \left(\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\right)\;dA$$

$c(t)=⟨x_1+t(x_2−x_1),y_1+t(y_2−y_1)⟩, 0≤t≤1 dx = (x_2 −x_1)dt, dy = (y_2 −y_1)dt$ , then
$$x dy = (x_1 +t(x_2 −x_1))(y_2 −y_1)dt$$ $$y dx =(y_1 +t(y_2 −y_1))(x_2 −x_1)dt$$ $$x dy −y dx = (x_1(y_2 −y_1)−y_1(x_2 −x_1))dt$$ $$= (x_1y_2 − x_2y_1)dt$$
Let $D$ be your quadrangle (or any simple $n$-gon, for that matter). Then its boundary $\partial D$ is the sum of $n$ segment paths $$\sigma_k:\quad t\mapsto (1-t)(x_{k-1},y_{k-1}) + t(x_k,y_k)\qquad(0\leq t\leq1)\ .$$ In order to apply Green's theorem we have to introduce "out of the blue" a vector field ${\bf F}=(P,Q)$. We shall choose ${\bf F}$ in such a way that $${\rm curl}\>{\bf F}={\partial Q\over\partial x}-{\partial P\over\partial y}\equiv 1\ ,$$ since then the right side of Green's theorem is simply $={\rm area}(D)$. A possible choice is $${\bf F}=(P,Q):={1\over2}(-y,x)\ .$$ We now have to set up, compute, and sum up the line integrals $\int_{\sigma_k}(P\>dx+Q\>dy)$. A part of the necessary calculations to this end shows up in your question, as follows: $$\int_{\textstyle\sigma_2}(Pdx+Qdy)={1\over2}\int_{\textstyle\sigma_2}(x dy-ydx)={1\over2}\int_0^1(x_1y_2-x_2y_1)\ dt={1\over2}(x_1y_2-x_2 y_1)\ .$$ Now we have to sum this up over all $k$, whereby we have to be aware that the index $k$ has to be taken "cyclically", i.e., modulo $n$. It follows that $${\rm area}(D)={1\over2}\sum_k(x_k y_{k+1}-x_{k+1}y_k)\ .$$