Difference between revisions of "Pick's Theorem"
m (Added a little info.) |
Runninterp (talk | contribs) (→Proof) |
||
(27 intermediate revisions by 17 users not shown) | |||
Line 1: | Line 1: | ||
'''Pick's Theorem''' expresses the [[area]] of a [[polygon]], all of whose [[vertex | vertices]] are [[lattice points]] in a [[coordinate plane]], in terms of the number of lattice points inside the polygon and the number of lattice points on the sides of the polygon. The formula is: | '''Pick's Theorem''' expresses the [[area]] of a [[polygon]], all of whose [[vertex | vertices]] are [[lattice points]] in a [[coordinate plane]], in terms of the number of lattice points inside the polygon and the number of lattice points on the sides of the polygon. The formula is: | ||
− | <math>A = I + \frac{ | + | <math>A = I + \frac{1}{2}B - 1</math> |
where <math>I</math> is the number of lattice points in the interior and <math>B</math> being the number of lattice points on the boundary. | where <math>I</math> is the number of lattice points in the interior and <math>B</math> being the number of lattice points on the boundary. | ||
− | It is similar to the | + | It is similar to the [[Shoelace Theorem]], and although it is less powerful, it is a good tool to have in solving problems. |
− | {{ | + | <asy> |
+ | size(150); | ||
+ | defaultpen(linewidth(0.8)); | ||
+ | for (int i = -2; i <= 2; i=i+1) { | ||
+ | for (int j = -2; j <= 2; j=j+1) { | ||
+ | dot((i,j)); | ||
+ | } | ||
+ | } | ||
+ | draw((-2,-2)--(-2,0)--(0,1)--(-1,2)--(2,2)--(0,0)--(1,-2)--cycle);</asy> | ||
== Proof == | == Proof == | ||
− | {{ | + | If a triangle on the lattice points with exactly <math>3</math> points in its interior or on its edges, it has an area of <math>\frac{1}{2}</math>. Such triangle must contain two lattice points distance <math>1</math> from each other and one lattice point on a line parallel to the opposite edge distance <math>1</math> apart. The minimum distance between two distinct lattice points is <math>1</math>. If no two lattice points have distance <math>1</math>, then by <math>\frac{1}{2}bh</math> the area is more than 1 and similarly for the height. |
+ | Removing a triangle either removes <math>1</math> boundary point or turns <math>1</math> interior point into a boundary point, accounting for the <math>I+\frac{1}{2}B</math> part. The <math>-1</math> part is accounted for by looking at the area of the unit triangle with <math>3</math> boundary points, <math>0</math> interior points, and <math>\frac{1}{2}</math> area. | ||
+ | |||
+ | Solution by [[User:a1b2|a1b2]] | ||
+ | |||
+ | |||
+ | The above proof is questionable. Let me added the sketch of two proofs below. | ||
+ | |||
+ | Sketch of Proof 1: | ||
+ | |||
+ | Step 1: Prove the theorem for rectangles whose sides are parallel to the axes. Suppose that the side parallel to the <math>x</math>-axis has length <math>a</math>, and the side parallel to the <math>y</math>-axis has length <math>b</math>, then: | ||
+ | <cmath> | ||
+ | A = ab, \; I = (a-1)(b-1), \; B = 2a+2b, | ||
+ | </cmath> | ||
+ | and thus the asserted formula holds. | ||
+ | |||
+ | Step 2: Prove the theorem for right triangles whose bases are parallel to the axes. This can be checked by cutting a rectangle in step 1 into two right triangles. | ||
+ | |||
+ | Step 3: Prove the theorem for an arbitrary triangle <math>T</math>. Consider a rectangle <math>R</math> containing <math>T</math> with <math>R \setminus T</math> can be divided into several right triangles and rectangles. This enables us to subtract off the right triangles and rectangles from the rectangles to verify the claimed formula. | ||
+ | |||
+ | To be more specific, suppose that <math>T</math> has vertices <math>V_1 = (x_1, y_1)</math>, <math>V_2 = (x_2, y_2)</math> and <math>V_3 = (x_3, y_3)</math> with <math>x_1 \le x_2 \le x_3</math>. Without loss of generality, suppose <math>y_1 \le y_3</math>. If <math>y_1 \le y_2 \le y_3</math> and <math>V_2</math> is below the segment <math>\overline{V_1V_3}</math>, then write | ||
+ | <cmath> | ||
+ | R \setminus T = \Delta_{V_3 V_4 V_1} + \Delta_{V_1 V_5 V_2} + \Delta_{V_2 V_6 V_3} + [x_2,x_3] \times [y_1, y_2], | ||
+ | </cmath> | ||
+ | where the vertices <math>V_4 = (x_1, y_3)</math>, <math>V_5 = (x_2, y_1)</math>, <math>V_6 = (x_3, y_2)</math>. If <math>y_2 < y_1</math>, then write | ||
+ | <cmath> | ||
+ | R \setminus T = \Delta_{V_3 V_4 V_1} + \Delta_{V_1 V_7 V_2} + \Delta_{V_2 V_6 V_3}, | ||
+ | </cmath> | ||
+ | where the vertices <math>V_4 = (x_1, y_3)</math>, <math>V_6 = (x_3, y_2)</math>, <math>V_7 = (x_1, y_2)</math>. For the cases when <math>V_2</math> is above the segment <math>\overline{V_1V_3}</math>, this can be done in a similar way. | ||
+ | |||
+ | Step 4: Prove the theorem for any polygon: simply triangulate the polygon. | ||
+ | |||
+ | |||
+ | Sketch of Proof 2: | ||
+ | |||
+ | Since one can triangulate any polygon, it suffices to prove for triangles. Since if a triangle has any interior points or boundary points other than its vertices, one can further divide this triangle into smaller triangles, it suffices to prove the theorem for triangles with <math>0</math> interior points and <math>3</math> boundary points. This is equivalent to showing that any triangles (whose vertices are lattice points) with <math>0</math> interior points and <math>3</math> boundary points, its area is <math>0 + 3/2 - 1 = 1/2</math>. | ||
+ | |||
+ | To show this, without loss of generality we can assume that one vertice is <math>(0,0)</math>. Suppose the other two vertices are <math>(x_1, y_1)</math> and <math>(x_2, y_2)</math>, we see immediately that <math>gcd(x_1, y_1) = gcd(x_2, y_2) = 1</math> from the fact that there are no boundary points other than the vertices. Since the are of the triangle is given by <math>|x_1 y_2 - x_2 y_1|/2</math>, our aim is to show that <math>|x_1 y_2 - x_2 y_1| = 1</math>. | ||
+ | |||
+ | We argue by contradiction. Since this is indeed a triangle (which means that <math>x_1 y_2 - x_2 y_1 \neq 0</math>), we have <math>d := |x_1 y_2 - x_2 y_1| \ge 2</math>. Without loss of generality, we can further assume the sign, i.e <math>d = x_1 y_2 - x_2 y_1 \ge 2</math>. Using the fact that <math>gcd(x_1, y_1) = 1</math>, there exists integers <math>a</math> and <math>b</math> thus that <math>b x_1 - a y_1 = 1</math>. One can show that the distance from the point <math>(a, b)</math> to the line <math>L_1</math> passing through <math>(0,0)</math> and <math>(x_1, y_1)</math> is <math>\frac{1}{\sqrt{x_1^2 + y_1^2}}</math> and both <math>(a,b)</math> and <math>(x_2,y_2)</math> are on the same side of <math>L_1</math>. Since the distance from <math>(x_2, y_2)</math> to <math>L_1</math> is <math>\frac{d}{\sqrt{x_1^2 + y_1^2}}</math>, the distance from <math>(a,b)</math> to <math>L_1</math> is smaller. | ||
+ | |||
+ | Furhtermore, for any integer <math>k</math>, the point <math>(a + kx_1, b + ky_1)</math> also has a distance <math>\frac{1}{\sqrt{x_1^2 + y_1^2}}</math> to <math>L</math> and on the same side with <math>(x_2,y_2)</math>. Let <math>L_2</math> be the line passing through <math>(0,0)</math> and <math>(x_2,y_2)</math>, the distance from <math>(a + kx_1, b + ky_1)</math> to <math>L_2</math> is | ||
+ | <cmath> | ||
+ | \frac{| (a + kx_1)y_2 - (b + ky_1)x_2 |}{\sqrt{x_2^2 + y_2^2}} = \frac{| ay_2 - bx_2 + kd |}{\sqrt{x_2^2 + y_2^2}}. | ||
+ | </cmath> | ||
+ | Consequently, one can choose <math>k</math> such that <math>0 \le ay_2 - bx_2 + kd < d</math>, i.e. the point <math>(a + kx_1, b + ky_1)</math> is on the same side of <math>L_2</math> with <math>(x_2, y_2)</math> and has a smaller distance. Combining with the previous result, we show that the point <math>(a + kx_1, b + ky_1)</math> is inside the closure of the parallelogram with vertices <math>(0,0), (x_1,y_2), (x_2,y_2), (x_1+x_2, y_1+y_2)</math>. So either <math>(a + kx_1, b + ky_1)</math> or <math>( x_1 + x_2 - (a + kx_1), y_1 + y_2 - (b + ky_1) )</math> is an interior point or boundary point for the traingle with vertices <math>(0,0), (x_1,y_2), (x_2,y_2)</math>. Due to that the distance from <math>(a + kx_1, b + ky_1)</math> or <math>( x_1 + x_2 - (a + kx_1), y_1 + y_2 - (b + ky_1) )</math> to <math>L_1</math> is <math>\frac{1}{\sqrt{x_1^2 + y_1^2}}</math> or <math>\frac{d-1}{\sqrt{x_1^2 + y_1^2}}</math>, this point must be different from the vertices, which finishes the proof. | ||
+ | |||
+ | == Usage == | ||
+ | |||
+ | [[Category:Geometry]] | ||
+ | |||
+ | [[Category:Theorems]] |
Revision as of 13:29, 26 June 2024
Pick's Theorem expresses the area of a polygon, all of whose vertices are lattice points in a coordinate plane, in terms of the number of lattice points inside the polygon and the number of lattice points on the sides of the polygon. The formula is:
where is the number of lattice points in the interior and being the number of lattice points on the boundary. It is similar to the Shoelace Theorem, and although it is less powerful, it is a good tool to have in solving problems.
Proof
If a triangle on the lattice points with exactly points in its interior or on its edges, it has an area of . Such triangle must contain two lattice points distance from each other and one lattice point on a line parallel to the opposite edge distance apart. The minimum distance between two distinct lattice points is . If no two lattice points have distance , then by the area is more than 1 and similarly for the height. Removing a triangle either removes boundary point or turns interior point into a boundary point, accounting for the part. The part is accounted for by looking at the area of the unit triangle with boundary points, interior points, and area.
Solution by a1b2
The above proof is questionable. Let me added the sketch of two proofs below.
Sketch of Proof 1:
Step 1: Prove the theorem for rectangles whose sides are parallel to the axes. Suppose that the side parallel to the -axis has length , and the side parallel to the -axis has length , then: and thus the asserted formula holds.
Step 2: Prove the theorem for right triangles whose bases are parallel to the axes. This can be checked by cutting a rectangle in step 1 into two right triangles.
Step 3: Prove the theorem for an arbitrary triangle . Consider a rectangle containing with can be divided into several right triangles and rectangles. This enables us to subtract off the right triangles and rectangles from the rectangles to verify the claimed formula.
To be more specific, suppose that has vertices , and with . Without loss of generality, suppose . If and is below the segment , then write where the vertices , , . If , then write where the vertices , , . For the cases when is above the segment , this can be done in a similar way.
Step 4: Prove the theorem for any polygon: simply triangulate the polygon.
Sketch of Proof 2:
Since one can triangulate any polygon, it suffices to prove for triangles. Since if a triangle has any interior points or boundary points other than its vertices, one can further divide this triangle into smaller triangles, it suffices to prove the theorem for triangles with interior points and boundary points. This is equivalent to showing that any triangles (whose vertices are lattice points) with interior points and boundary points, its area is .
To show this, without loss of generality we can assume that one vertice is . Suppose the other two vertices are and , we see immediately that from the fact that there are no boundary points other than the vertices. Since the are of the triangle is given by , our aim is to show that .
We argue by contradiction. Since this is indeed a triangle (which means that ), we have . Without loss of generality, we can further assume the sign, i.e . Using the fact that , there exists integers and thus that . One can show that the distance from the point to the line passing through and is and both and are on the same side of . Since the distance from to is , the distance from to is smaller.
Furhtermore, for any integer , the point also has a distance to and on the same side with . Let be the line passing through and , the distance from to is Consequently, one can choose such that , i.e. the point is on the same side of with and has a smaller distance. Combining with the previous result, we show that the point is inside the closure of the parallelogram with vertices . So either or is an interior point or boundary point for the traingle with vertices . Due to that the distance from or to is or , this point must be different from the vertices, which finishes the proof.