Shoelace formula in terms of squared distances

263 Views Asked by At

The wikipedia page for polygon specifies a shoelace formula for the signed area of a (simple) polygon in terms of squared distances. Namely, denote by $A$ the (simple) polygon signed area and by $Q_{i,j}$ the squared distance between $\left(x_{i},y_{i} \right)$ and $\left(x_{j},y_{j} \right)$, then $$ 16A^{2}=\sum_{i=0}^{n-1}\sum_{j=0}^{n-1}{\begin{vmatrix} Q_{i,j} & Q_{i,j+1} \\ Q_{i+1,j} & Q_{i+1,j+1} \\ \end{vmatrix}} $$ where $x_{0}=x_{n}$ and $y_{0}=y_{n}$.

The aforementioned wikipedia page gives a 1949 paper written in Hungarian as the only reference for the aforementioned formula.

Is there an English reference for the squared-distance version of the shoelace formula? How can one derive it from the usual form of the shoelace formula? How can one augment the triangulation approach featured in the proof of the usual shoelace formula in order to prove the squared-distance version?

Starting from the usual shoelace formula: $$ \begin{align} 16A^{2} & = 16\left(\frac{1}{2}\sum_{i=0}^{n-1}{\begin{vmatrix} x_{i} & x_{i+1} \\ y_{i} & y_{i+1} \\ \end{vmatrix}} \right)^{2} \\ & = 4\left(\sum_{i=0}^{n-1}{\begin{vmatrix} x_{i} & x_{i+1} \\ y_{i} & y_{i+1} \\ \end{vmatrix}} \right)\left(\sum_{j=0}^{n-1}{\begin{vmatrix} x_{j} & x_{j+1} \\ y_{j} & y_{j+1} \\ \end{vmatrix}} \right) \\ & = \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{4\begin{vmatrix} x_{i} & x_{i+1} \\ y_{i} & y_{i+1} \\ \end{vmatrix} \begin{vmatrix} x_{j} & x_{j+1} \\ y_{j} & y_{j+1} \\ \end{vmatrix}}} \\ & = \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{4\begin{vmatrix} x_{i} & y_{i} \\ x_{i+1} & y_{i+1} \\ \end{vmatrix} \begin{vmatrix} x_{j} & x_{j+1} \\ y_{j} & y_{j+1} \\ \end{vmatrix}}} \\ & = \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{4\begin{vmatrix} x_{i}x_{j}+y_{i}y_{j} & x_{i}x_{j+1}+y_{i}y_{j+1} \\ x_{i+1}x_{j}+y_{i+1}y_{j} & x_{i+1}x_{j+1}+y_{i+1}y_{j+1} \\ \end{vmatrix}}} \\ & = \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{\begin{vmatrix} -2x_{i}x_{j}-2y_{i}y_{j} & -2x_{i}x_{j+1}-2y_{i}y_{j+1} \\ -2x_{i+1}x_{j}-2y_{i+1}y_{j} & -2x_{i+1}x_{j+1}-2y_{i+1}y_{j+1} \\ \end{vmatrix} }} \\ & = \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{\begin{vmatrix} Q_{i,j}-x_{i}^{2}-x_{j}^{2}-y_{i}^{2}-y_{j}^{2} & Q_{i,j+1}-x_{i}^{2}-x_{j+1}^{2}-y_{i}^{2}-y_{j+1}^{2} \\ Q_{i+1,j}-x_{i+1}^{2}-x_{j}^{2}-y_{i+1}^{2}-y_{j}^{2} & Q_{i+1,j+1}-x_{i+1}^{2}-x_{j+1}^{2}-y_{i+1}^{2}-y_{j+1}^{2} \\ \end{vmatrix} }} \end{align} $$

But how to continue from there?

1

There are 1 best solutions below

0
On

How can one derive it from the usual form of the shoelace formula?

We will show that $$ 16A^{2}-\sum_{i=0}^{n-1}\sum_{j=0}^{n-1}{\begin{vmatrix} Q_{i,j} & Q_{i,j+1} \\ Q_{i+1,j} & Q_{i+1,j+1} \\ \end{vmatrix}} = 0 $$ Start from the LHS, obtain $$ 16A^{2}-\sum_{i=0}^{n-1}\sum_{j=0}^{n-1}{\begin{vmatrix} Q_{i,j} & Q_{i,j+1} \\ Q_{i+1,j} & Q_{i+1,j+1} \\ \end{vmatrix}} = \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{4\begin{vmatrix} x_{i} & x_{i+1} \\ y_{i} & y_{i+1} \\ \end{vmatrix} \begin{vmatrix} x_{j} & x_{j+1} \\ y_{j} & y_{j+1} \\ \end{vmatrix}}} \\ - \sum_{i=0}^{n-1}\sum_{j=0}^{n-1}{\begin{vmatrix} Q_{i,j} & Q_{i,j+1} \\ Q_{i+1,j} & Q_{i+1,j+1} \\ \end{vmatrix}} = \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{\left(4\begin{vmatrix} x_{i} & x_{i+1} \\ y_{i} & y_{i+1} \\ \end{vmatrix} \begin{vmatrix} x_{j} & x_{j+1} \\ y_{j} & y_{j+1} \\ \end{vmatrix}-\begin{vmatrix} Q_{i,j} & Q_{i,j+1} \\ Q_{i+1,j} & Q_{i+1,j+1} \\ \end{vmatrix}\right)}} $$ Now recall the definition $$ Q_{i,j} \equiv \left(x_{i}-x_{j} \right)^{2} + \left(y_{i}-y_{j} \right)^{2} $$ and expand the determinants in order to obtain $$ 4\begin{vmatrix} x_{i} & x_{i+1} \\ y_{i} & y_{i+1} \\ \end{vmatrix} \begin{vmatrix} x_{j} & x_{j+1} \\ y_{j} & y_{j+1} \\ \end{vmatrix}-\begin{vmatrix} Q_{i,j} & Q_{i,j+1} \\ Q_{i+1,j} & Q_{i+1,j+1} \\ \end{vmatrix} = \\ a_{i}-a_{i+1}+b_{j}-b_{j+1} $$ where $$ \begin{align} a_{i} & \equiv \left(x_{j}^{2}+y_{j}^{2}-x_{j+1}^{2}-y_{j+1}^{2} \right) \left(x_{i}^{2}+y_{i}^{2} \right) \\ & -2\left(x_{j}^{2}+y_{j}^{2} \right)\left(x_{i}x_{j+1}+ y_{i}y_{j+1}\right) \\ & +2\left(x_{j+1}^{2}+y_{j+1}^{2} \right)\left(x_{i}x_{j}+ y_{i}y_{j}\right) \end{align} $$ and $$ \begin{align} b_{j} & \equiv 2\left(x_{i+1}^{2}+y_{i+1}^{2} \right)\left(x_{i}x_{j}+ y_{i}y_{j}\right) \\ & -2\left(x_{i}^{2}+y_{i}^{2} \right)\left(x_{i+1}x_{j}+ y_{i+1}y_{j}\right)\end{align} $$ Next recall the convention where $x_{0}=x_{n}$ and $y_{0}=y_{n}$ in order to then reduce the telescoping sums $$ \begin{align} & \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{\left(4\begin{vmatrix} x_{i} & x_{i+1} \\ y_{i} & y_{i+1} \\ \end{vmatrix} \begin{vmatrix} x_{j} & x_{j+1} \\ y_{j} & y_{j+1} \\ \end{vmatrix}-\begin{vmatrix} Q_{i,j} & Q_{i,j+1} \\ Q_{i+1,j} & Q_{i+1,j+1} \\ \end{vmatrix}\right)}} = \\ & \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{\left(a_{i}-a_{i+1}+b_{j}-b_{j+1}\right)}} = \\ & \sum_{j=0}^{n-1}{\sum_{i=0}^{n-1}{\left(a_{i}-a_{i+1}\right)}} + \sum_{i=0}^{n-1}{\sum_{j=0}^{n-1}{\left(b_{j}-b_{j+1}\right)}} = \\ & \sum_{j=0}^{n-1}{\left(a_{0}-a_{n}\right)} + \sum_{i=0}^{n-1}{\left(b_{0}-b_{n}\right)} = \\ & \sum_{j=0}^{n-1}{0} + \sum_{i=0}^{n-1}{0} = 0 \end{align} $$

How can one augment the triangulation approach featured in the proof of the usual shoelace formula in order to prove the squared-distance version?

I do not think that a more succinct argument than the one made above can be given here, but I would love to be proven wrong.