Difference between revisions of "Shoelace Theorem"
m (→Proof 1) |
|||
(29 intermediate revisions by 21 users not shown) | |||
Line 2: | Line 2: | ||
==Theorem== | ==Theorem== | ||
− | Suppose the polygon <math>P</math> has vertices <math>(a_1, b_1)</math>, <math>(a_2, b_2)</math>, ... , <math>(a_n, b_n)</math>, listed in clockwise order. Then area of <math>P</math> is | + | Suppose the polygon <math>P</math> has vertices <math>(a_1, b_1)</math>, <math>(a_2, b_2)</math>, ... , <math>(a_n, b_n)</math>, listed in clockwise order. Then the area of <math>P</math> is |
<cmath>\dfrac{1}{2} |(a_1b_2 + a_2b_3 + \cdots + a_nb_1) - (b_1a_2 + b_2a_3 + \cdots + b_na_1)|</cmath> | <cmath>\dfrac{1}{2} |(a_1b_2 + a_2b_3 + \cdots + a_nb_1) - (b_1a_2 + b_2a_3 + \cdots + b_na_1)|</cmath> | ||
− | The Shoelace Theorem gets its name because if one lists | + | You can also go counterclockwise order, as long as you find the absolute value of the answer. |
+ | |||
+ | The Shoelace Theorem gets its name because if one lists the coordinates in a column, | ||
<cmath>\begin{align*} | <cmath>\begin{align*} | ||
(a_1 &, b_1) \\ | (a_1 &, b_1) \\ | ||
Line 12: | Line 14: | ||
& \vdots \\ | & \vdots \\ | ||
(a_n &, b_n) \\ | (a_n &, b_n) \\ | ||
− | (a_1 &, b_1) | + | (a_1 &, b_1) \\ |
− | \end{align*} | + | \end{align*}</cmath> |
and marks the pairs of coordinates to be multiplied, the resulting image looks like laced-up shoes. | and marks the pairs of coordinates to be multiplied, the resulting image looks like laced-up shoes. | ||
− | ==Proof== | + | ==Proof 1== |
− | {{ | + | Claim 1: The area of a triangle with coordinates <math>A(x_1, y_1)</math>, <math>B(x_2, y_2)</math>, and <math>C(x_3, y_3)</math> is <math>\frac{|x_1y_2+x_2y_3+x_3y_1-x_1y_3-x_2y_1-x_3y_2|}{2}</math>. |
+ | |||
+ | ===Proof of claim 1:=== | ||
+ | |||
+ | Writing the coordinates in 3D and translating <math>\triangle ABC</math> so that <math>A=(0, 0, 0)</math> we get the new coordinates <math>A'(0, 0, 0)</math>, <math>B(x_2-x_1, y_2-y_1, 0)</math>, and <math>C(x_3-x_1, y_3-y_1, 0)</math>. Now if we let <math>\vec{b}=(x_2-x_1 \quad y_2-y_1 \quad 0)</math> and <math>\vec{c}=(x_3-x_1 \quad y_3-y_1 \quad 0)</math> then by definition of the cross product <math>[ABC]=\frac{||\vec{b} \times \vec{c}||}{2}=\frac{1}{2}||(0 \quad 0 \quad x_1y_2+x_2y_3+x_3y_1-x_1y_3-x_2y_1-x_3y_2)||=\frac{x_1y_2+x_2y_3+x_3y_1-x_1y_3-x_2y_1-x_3y_2}{2}</math>. | ||
+ | |||
+ | ===Proof:=== | ||
+ | |||
+ | We will proceed with induction. | ||
+ | |||
+ | By claim 1, the shoelace theorem holds for any triangle. We will show that if it is true for some polygon <math>A_1A_2A_3...A_n</math> then it is also true for <math>A_1A_2A_3...A_nA_{n+1}</math>. | ||
+ | |||
+ | We cut <math>A_1A_2A_3...A_nA_{n+1}</math> into two polygons, <math>A_1A_2A_3...A_n</math> and <math>A_1A_nA_{n+1}</math>. Let the coordinates of point <math>A_i</math> be <math>(x_i, y_i)</math>. Then, applying the shoelace theorem on <math>A_1A_2A_3...A_n</math> and <math>A_1A_nA_{n+1}</math> we get | ||
+ | |||
+ | <cmath>[A_1A_2A_3...A_n]=\frac{1}{2}\sum_{i=1}^{n}(x_iy_{i+1}-x_{i+1}y_i)</cmath> | ||
+ | <cmath>[A_1A_nA_{n+1}]=\frac{1}{2}(x_1y_2+x_2y_3+x_3y_1-x_1y_3-x_2y_1-x_3y_2)</cmath> | ||
+ | |||
+ | Hence | ||
+ | |||
+ | <cmath>[A_1A_2A_3...A_nA_{n+1}]=[A_1A_2A_3...A_n]+[A_1A_nA_{n+1}]=\frac{1}{2}\sum_{i=1}^{n}(x_iy_{i+1}-x_{i+1}y_i)+\frac{1}{2}(x_1y_2+x_2y_3+x_3y_1-x_1y_3-x_2y_1-x_3y_2)</cmath> | ||
+ | <cmath>=\frac{1}{2}((x_2y_1+x_3y_2+...+x_{n+1}y_n+x_1y_{n+1})-(x_1y_2+x_2y_3+...+x_ny_{n+1}+x_{n+1}y_1))=\boxed{\frac{1}{2}\sum_{i=1}^n(x_iy_{i+1}-x_{i+1}y_i)}</cmath> | ||
+ | |||
+ | As claimed. | ||
+ | |||
+ | ~ShreyJ | ||
+ | |||
+ | ==Proof 2== | ||
+ | Let <math>\Omega</math> be the set of points belonging to the polygon. | ||
+ | We have that | ||
+ | <cmath> | ||
+ | A=\int_{\Omega}\alpha, | ||
+ | </cmath> | ||
+ | where <math>\alpha=dx\wedge dy</math>. | ||
+ | The volume form <math>\alpha</math> is an exact form since <math>d\omega=\alpha</math>, where | ||
+ | <cmath> | ||
+ | \omega=\frac{x\,dy}{2}-\frac{y\,dx}{2}.\label{omega} | ||
+ | </cmath> | ||
+ | Using this substitution, we have | ||
+ | <cmath> | ||
+ | \int_{\Omega}\alpha=\int_{\Omega}d\omega. | ||
+ | </cmath> | ||
+ | Next, we use the theorem of Stokes to obtain | ||
+ | <cmath> | ||
+ | \int_{\Omega}d\omega=\int_{\partial\Omega}\omega. | ||
+ | </cmath> | ||
+ | We can write <math>\partial \Omega=\bigcup A(i)</math>, where <math>A(i)</math> is the line | ||
+ | segment from <math>(x_i,y_i)</math> to <math>(x_{i+1},y_{i+1})</math>. With this notation, | ||
+ | we may write | ||
+ | <cmath> | ||
+ | \int_{\partial\Omega}\omega=\sum_{i=1}^n\int_{A(i)}\omega. | ||
+ | </cmath> | ||
+ | If we substitute for <math>\omega</math>, we obtain | ||
+ | <cmath> | ||
+ | \sum_{i=1}^n\int_{A(i)}\omega=\frac{1}{2}\sum_{i=1}^n\int_{A(i)}{x\,dy}-{y\,dx}. | ||
+ | </cmath> | ||
+ | If we parameterize, we get | ||
+ | <cmath> | ||
+ | \frac{1}{2}\sum_{i=1}^n\int_0^1{(x_i+(x_{i+1}-x_i)t)(y_{i+1}-y_i)}-{(y_i+(y_{i+1}-y_i)t)(x_{i+1}-x_i)\,dt}. | ||
+ | </cmath> | ||
+ | Performing the integration, we get | ||
+ | <cmath> | ||
+ | \frac{1}{2}\sum_{i=1}^n\frac{1}{2}[(x_i+x_{i+1})(y_{i+1}-y_i)- | ||
+ | (y_{i}+y_{i+1})(x_{i+1}-x_i)]. | ||
+ | </cmath> | ||
+ | More algebra yields the result | ||
+ | <cmath> | ||
+ | \frac{1}{2}\sum_{i=1}^n(x_iy_{i+1}-x_{i+1}y_i). | ||
+ | </cmath> | ||
+ | |||
+ | ==Proof 3== | ||
+ | This is a very nice approach that directly helps in understanding the sum as terms which are areas of trapezoids. | ||
+ | |||
+ | See page 281 in this book (in the Polygon Area section.) | ||
+ | https://cses.fi/book/book.pdf | ||
+ | |||
+ | (The only thing that needs to be modified in this proof is that one must shift the entire polygon up by k, until all the y coordinates are positive, but this term gets canceled in the resulting sum.) | ||
== Problems == | == Problems == | ||
=== Introductory === | === Introductory === | ||
− | In right triangle <math>ABC</math>, we have <math>\angle ACB=90^{\circ}</math>, <math>AC=2</math>, and <math>BC=3</math>. [[ | + | In right triangle <math>ABC</math>, we have <math>\angle ACB=90^{\circ}</math>, <math>AC=2</math>, and <math>BC=3</math>. [[Median]]s <math>AD</math> and <math>BE</math> are drawn to sides <math>BC</math> and <math>AC</math>, respectively. <math>AD</math> and <math>BE</math> intersect at point <math>F</math>. Find the area of <math>\triangle ABF</math>. |
+ | |||
+ | == External Links== | ||
+ | A good explanation and exploration into why the theorem works by James Tanton: | ||
+ | [http://www.jamestanton.com/wp-content/uploads/2012/03/Cool-Math-Essay_June-2014_SHOELACE-FORMULA.pdf] | ||
+ | |||
+ | |||
− | |||
[[Category:Geometry]] | [[Category:Geometry]] | ||
[[Category:Theorems]] | [[Category:Theorems]] | ||
+ | AOPS |
Revision as of 18:18, 23 June 2020
The Shoelace Theorem is a nifty formula for finding the area of a polygon given the coordinates of its vertices.
Contents
Theorem
Suppose the polygon has vertices , , ... , , listed in clockwise order. Then the area of is
You can also go counterclockwise order, as long as you find the absolute value of the answer.
The Shoelace Theorem gets its name because if one lists the coordinates in a column, and marks the pairs of coordinates to be multiplied, the resulting image looks like laced-up shoes.
Proof 1
Claim 1: The area of a triangle with coordinates , , and is .
Proof of claim 1:
Writing the coordinates in 3D and translating so that we get the new coordinates , , and . Now if we let and then by definition of the cross product .
Proof:
We will proceed with induction.
By claim 1, the shoelace theorem holds for any triangle. We will show that if it is true for some polygon then it is also true for .
We cut into two polygons, and . Let the coordinates of point be . Then, applying the shoelace theorem on and we get
Hence
As claimed.
~ShreyJ
Proof 2
Let be the set of points belonging to the polygon. We have that where . The volume form is an exact form since , where Using this substitution, we have Next, we use the theorem of Stokes to obtain We can write , where is the line segment from to . With this notation, we may write If we substitute for , we obtain If we parameterize, we get Performing the integration, we get More algebra yields the result
Proof 3
This is a very nice approach that directly helps in understanding the sum as terms which are areas of trapezoids.
See page 281 in this book (in the Polygon Area section.) https://cses.fi/book/book.pdf
(The only thing that needs to be modified in this proof is that one must shift the entire polygon up by k, until all the y coordinates are positive, but this term gets canceled in the resulting sum.)
Problems
Introductory
In right triangle , we have , , and . Medians and are drawn to sides and , respectively. and intersect at point . Find the area of .
External Links
A good explanation and exploration into why the theorem works by James Tanton: [1] AOPS