5
$\begingroup$

I was looking for a way to prove the shoelace formula when I found this proof:


For this clockwise order to make sense, you need a point O inside the polygon so that the angles form $OA_{i}A_{i+1}$ and $OA_{n}A_{1}$ are all positive.

Then the formula is just adding up the areas of the triangles $\Delta OA_{i}A_{i+1}$ and $\Delta OA_{n}A_{1}$.

So all you need is area of $\Delta OA_{1}A_{2}\; =\frac{\; b_{2}a_{1}\; -\; b_{1}a_{2}}{2}$, which is elementary.


However, I have several questions on this proof.

First, what does it mean by "so that the angles are all positive"? Could someone provide a diagram or explain what it means by this?

Second, how do you know such a point always exists?

Third, how did you get the formula $\Delta OA_{1}A_{2}\; =\frac{\; b_{2}a_{1}\; -\; b_{1}a_{2}}{2}$? I don't see how it's "elementary"? Could someone provide a proof on how the area of the triangle is that? Also, why doesn't the area depend on point $O$?

$\endgroup$

1 Answer 1

4
$\begingroup$

I can answer how your question about how this is proved. It assumes the counterclockwise direction and uses vector calculus. What the proof means by positive angles $is$ that it is counterclockwise direction. In this diagram: angle between lines
$\theta$ is positive only if you are measuring from $p_1$ to $p_2$, the counterclockwise direction.
As for the proof: there may be other ways, but the way I know uses Green's Theorem: $$\iint_D \frac{\,dQ}{\,dx}-\frac{\,dP}{\,dy}\,dA=\int_C F\cdot\,dC$$ where $C$ is a parametrized curve in 2 dimensions and $F$ is a vector field that can be represented by $F=(P, Q)$. If $\frac{\,dQ}{\,dx}-\frac{\,dP}{\,dy}=1$, the left hand side of this equation will give you the area. However, as it is impossible to find bounds for this double integral (because there are up to $\infty$ points in the polygon), we use Green's Theorem. We will use the vector field $(-y, x)$; you will see why in a moment. In this case, $\frac{\,dQ}{\,dx}-\frac{\,dP}{\,dy}=1+1=2$. This gives the equation: $$\iint_D 2\,dA=\int_C F\cdot\,dC$$ Pulling the 2 out of the double integral and dividing gives $$\iint_D 1 \,dA=A=\frac{1}{2}\int_C F\cdot \,dC$$ Hence the $\frac{1}{2}$ in the Shoelace Formula.
Now the goal is to parametrize the polygon. The line integral previously stated can be broken up into $n$ line integrals along each of the lines connecting two points. In other words: $$\frac{1}{2}\int_C F\cdot \,dC=\frac{1}{2}\bigg[\sum_{i=1}^{n} \int_{C_i} F\cdot\,dC\bigg]$$ If we can show that one of these line integrals gives ${b_{2}a_1-b_{1}a_2}$, we will have proved the shoelace formula: the $\frac{1}{2}$ distributes out over the sum of the $n$ line integrals. We will say that $p_1$ is $(a_1, b_1)$ and $p_2$ is $(a_2, b_2)$. A parametrization of this line can be $(a_1, b_1)+t(a_2-a_1, b_2-b_1)$, or

$$x=ta_2-ta_1+a_1\\y=tb_2-tb_1+b_1$$ For $t\in[{0, 1}]$. Good. Now we have our parametrization. If we plug into $F=(-y, x)$, we get $F(t)=(tb_1-tb_2-b_1, ta_2+a_1-ta_1)$. We also need $\,dC$ in terms of $\,dt$ so we can integrate in respect to $t$. If we take the derivatives of our parametrization in respect to t we get: $$\frac{\,dx}{\,dt}=\frac{\,d}{\,dt}\big(ta_2-ta_1+a_1\big)=(a_2-a_1)\,dt\\ \frac{\,dy}{\,dt}=\frac{\,d}{\,dt}\big(tb_2-tb_1+b_1\big)=(b_2-b_1)\,dt$$ The dot product is a little tedious, but you get the following: $$F\cdot\,dC_1=(tb_1-tb_2-b_1, ta_2+a_1-ta_1)\cdot(a_2-a_1,b_2-b_1)\,dt\\=(ta_2b_1-ta_1b_1-ta_2b_2+ta_1b_2-a_2b_1+a_1b_1\\+ta_2b_2-ta_2b_1+a_1b_2-a_1b_1-ta_1b_2+ta_1b_1)\,dt\\ =(a_1b_2-a_2b_1)\,dt$$ At this point you might be able to see where the formula comes from. Taking the line integral: $$\int_0^1 (a_1b_2-a_2b_1)\,dt=a_1b_2-a_2b_1.$$ Finally, plugging back into the previous equation gives the shoelace formula: $$\frac{1}{2}\bigg[\sum_{i=1}^{n}a_ib_{i+1}-a_{i+1}b_i\bigg].\tag*{$\blacksquare$}$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .