You are on page 1of 9

CURRICULUM INSPIRATIONS: www.maa.

org/ci
Math for America DC: www.mathforamerica.org/DC

Innovative Online Courses: www.gdaymath.com


Tanton Tidbits: www.jamestanton.com

Whoa! COOL MATH!


CURIOUS MATHEMATICS FOR FUN AND JOY

JUNE 2014
ALSO … Join James Key (@iheartgeo) at
PROMOTIONAL CORNER: Have
9 pm EDT on Tuesday June 10 at the Global
you an event, a workshop, a website,
Math Department for a presentation on
some materials you would like to share
factoring: What is factoring all about really?
with the world? Let me know! If the work
Should students study it? How can it be seen
is about deep and joyous and real and developed in a natural and meaningful
mathematical doing I would be delighted context for students? All good mulling!
to mention it here. Sign up at …
***
Look out for Primo: A fun, mathematically https://www.bigmarker.com/communities/
rich board game being developed by GlobalMathDept/about
www.mathforlove.com .
Join their kick-starter campaign at:
https://www.kickstarter.com/projects/3439 PUZZLER:
41773/primo-the-beautiful-colorful-
mathematical-board-ga
© James Tanton 2014

COMPUTING AREAS Multiply pairs of entries along southeast


diagonals (with “wrap around” at the ends)
Here’s a nonagon with vertices, in turn, and sum. (Call this Sum 1.) Do this again for
( 2,9 ) , ( 6,11) , ( 9,8 ) , ( 6, 7 ) , (13, 6 ) , south-west diagonals (to get Sum 2). Half
the difference of these two sums is the area
( 9, 2 ) , ( 4,3) , ( 5,8) , and ( 3,1) . of the polygon!
What is its area?

Sum 1
= 2 × 11 + 6 × 8 + 9 × 7 + 6 × 6 + 13 × 2
+ 9 × 3 + 4 × 8 + 5 × 1 + 3 × 9 = 286
Sum 2:
= 9 × 6 + 11 × 9 + 8 × 6 + 7 × 13 + 6 × 9
German mathematician and physicist Carl
+ 2 × 4 + 3 × 5 + 8 × 3 + 1 × 2 = 395
Friedrich Gauss (1777-1855) discovered,
among many astounding and profound
Positive Difference = 395 − 286 = 109
accomplishments throughout his lifetime, a
wondrous procedure for computing the 1
Area = ⋅ 109 = 54.5 .
area of a polygon in the coordinate plane 2
using only the coordinates of its vertices.
The general formula that results from this
For our nonagon above the algorithm procedure is known as Gauss’ shoelace area
proceeds as follows: formula. (Can you see why it is given this
name? Perhaps superimpose the above two
March around the boundary of the polygon diagrams.)
in a consistent direction and list in a column
the coordinates of the vertices encountered
in turn. This produces two individual EXAMPLE: A triangle with base b and
columns of numbers: one of the x - height h can be situated in the coordinate
coordinates of the vertices encountered, plane as follows:
and one with the matching y -coordinates.

According to the shoelace formula its area


is:

www.jamestanton.com and www.gdaymath.com


© James Tanton 2014

EXERCISE: A square of side-length c (and


hence area c 2 ) sits in the corner of the first
quadrant as shown, touching the x -axis at
position a and the y -axis at position b .

Sum 1 = 0 + bh + 0 = bh
Sum 2 = 0 + 0 + 0 = 0

1 1
Area = ( bh − 0 ) = bh ,
2 2
which is correct!

EXAMPLE: A parallelogram with base of


length b and height h can be situated in
the coordinate plane as follows: What does the shoelace formula give for
the area of this square?

This goal of this essay is to establish why


this lovely shoelace algorithm works.

STEP 1: NICELY-SITUATED TRIANGLES

Consider a triangle with one vertex at the


origin O = ( 0, 0 ) . Suppose its remaining
two vertices are A = ( x1 , y1 ) and
According to the shoelace formula, its area B = ( x2 , y2 ) . What is the area of this
is:
triangle?

Sum1 = 0 + bh + ( x + b ) h + 0 = 2bh + xh
Sum 2 = 0 + 0 + xh + 0 = xh

1
Area = ( 2bh + xh − xh ) = bh , An efficient way to compute this area is to
2 enclose the triangle in a rectangle and
which is correct! subtract from the area of that rectangle the
areas of three right triangles.

www.jamestanton.com and www.gdaymath.com


© James Tanton 2014

If we label the vertices this way:

the area of the triangles is:


1
Area = ( x1 y2 − x2 y1 ) .
Area = x1 y2 −
1 1 1
x1 y1 − x2 y2 − ( x1 − x2 )( y2 − y1 )
2
2 2 2 (Check this! Subtract the areas of three
1 right triangles and one small rectangle.)
= ( 2 x1 y2 − x1 y1 − x2 y2 − x1 y2 + x2 y2 + x1 y1 − x2 y1 )
2
1 If, instead, we label the vertices as:
= ( x1 y2 − x2 y1 )
2

This is the shoelace formula applied to the


three coordinate points we have:

the area of the triangle is now given by:


1
Area = ( x2 y1 − x1 y2 ) .
Sum 1 = 0 + x1 y2 + 0 2
Sum 2 = 0 + y1 x2 + 0 . These two formulas differ by a minus sign.
1
Half their difference: ( x1 y2 − x2 y1 ) . Either way, both match half the difference
2 of the two shoelace sums, either
1 1
So the shoelace formula does match the ( Sum1 − Sum 2 ) or ( Sum 2 − Sum1) .
area of the triangle in this case. 2 2

But the diagram we drew does not


represent all the ways that the vertices of
the triangle could be situated. Consider, for
example, three vertices situated as follows:
Exercise: For a tedious exercise …

Verify (or argue logically) that one of the


shoelace formulas, either
1 1
( Sum1 − Sum 2 ) or ( Sum 2 − Sum1) ,
2 2
matches the area of the triangle no matter
in which quadrant or on which axis its two
non-origin vertices lie. Check all possible
cases!

www.jamestanton.com and www.gdaymath.com


© James Tanton 2014

STEP 2: GENERAL TRIANGLES STEP 3: BEING CLEAR ON MOTION

Consider a triangle with coordinates We know that the area of a triangle does
A = ( x1 , y1 ) not change under rigid motions. If the
shoelace formula is to match the area of
B = ( x2 , y2 ) triangles, the formula should be invariant
C = ( x3 , y3 ) under rigid motions too! (We assumed this
was the case for translations in step 2.)
What’s its area?
Exercise: Suppose a triangle with vertices:
Let’s translate the triangle so that one of its
coordinates lies at the origin. This will not A = ( x1 , y 1 )
change the area of the triangle. B = ( x2 , y2 )
Specifically, let’s perform the translation C = ( x3 , y3 )
that shifts C to the origin. The translated is translated to the triangle with vertices:
triangle has vertices: A ' = ( x1 − c, y 1 − d )
O = ( 0, 0 )
B ' = ( x2 − c, y2 − d )
A ' = ( x1 − x3 , y1 − y3 )
C ' = ( x3 − c, y3 − d )
B ' = ( x2 − x3 , y2 − y3 )
1
Here: Show that ( Sum1 − Sum 2 ) is the same
2
Sum 1 = ( x1 − x3 )( y2 − y3 ) . for both of these triangles.
Sum 2 = ( x2 − x3 )( y1 − y3 ) .

By step 1, the area of the triangle is half the


difference of these sums:
1
2
( ( x1 − x3 )( y2 − y3 ) − ( x2 − x3 )( y1 − y3 ) )
Exercise: A counter-clockwise rotation
(subtracting Sum 2 from Sum 1). about the origin through an angle θ takes a
point ( x, y ) to:
Some algebra shows this is:
( x cos θ − y sin θ , x sin θ + y cos θ ) .
1
( x1 y2 + x2 y3 + x3 y1 − y1 x2 − y2 x3 − y3 x1 )
2 Suppose a triangle with vertices:
which is the shoelace formula: A = ( x1 , y 1 )
B = ( x2 , y2 )
C = ( x3 , y3 )
is rotated to a triangle with vertices

A ' = ( x1 cos θ − y1 sin θ , x1 sin θ + y1 cos θ )


but with the understanding that we could B ' = ( x2 cos θ − y2 sin θ , x2 sin θ + y2 cos θ )
be off by a minus sign. (Maybe the positive C ' = ( x3 cos θ − y3 sin θ , x3 sin θ + y3 cos θ )
difference comes from subtracting Sum 1
1
from Sum 2 instead.) Show that ( Sum1 − Sum 2 ) is the same
2
for both of these triangles.

www.jamestanton.com and www.gdaymath.com


© James Tanton 2014

By performing the combination of a The previous exercise shows that if one


translation, a rotation about the origin, and picks a consistent direction around the
another translation, it now follows that the triangle – either march clockwise (with area
1 always to your right) or march counter-
formula ( Sum1 − Sum 2 ) is unchanged clockwise (with area always to your left)–
2
1
by arbitrary rotations. the shoelace formula ( Sum1 − Sum 2 ) is
2
Challenge: How does the formula then independent of the choice of starting
1
( Sum1 − Sum 2 ) if the triangle vertex.
2
1
undergoes a reflection? We also know that ( Sum1 − Sum 2 )
2
represents the area of the triangle (if this
STEP 4: BEING CLEAR ON SIGNS value turns out to be a positive number) or
is the negative of the area.
The shoelace formula is also invariant under
another type of action. It would be nice to know which direction we
should traverse triangles to be sure we
Exercise: Suppose a triangle has vertices:
obtain the positive area.
A = ( x1 , y 1 ) RESULT: If one traverses a triangle in a
B = ( x2 , y2 ) counter-clockwise direction, then
1
C = ( x3 , y3 ) ( Sum1 − Sum 2 ) is positive, and is the
2
There are six ways to list the order of these area of the triangle.
vertices.

Show that in these three orderings:

1 Reason: We can translate the triangle so


the value of ( Sum1 − Sum 2 ) is the that one vertex lies at the origin. (This
2 affects neither the area of the triangle nor
same, and for the orderings:
1
the value of ( Sum1 − Sum 2 ) nor any
2
choice of orientation of the triangle.)

By performing a rotation about the origin


1 we can position the triangle so that one
( Sum1 − Sum 2 ) adopts the value with edge lies on the positive x -axis and so that
2
the triangle sits in the upper half-plane.
opposite sign.
(This rotation also does not affect the area
of the triangle, nor the value of the
1
( Sum1 − Sum 2 ) , nor any choice of
2
orientation.)

www.jamestanton.com and www.gdaymath.com


© James Tanton 2014

(Notice that if we were to march around the


full quadrilateral in a counter-clockwise
direction, then that march “induces”
counter-clockwise orientations on each of
the interior triangles.)
We now have a triangle with vertices, listed
LEFT AREA:
in a counter-clockwise order, of the form:
x1 y1
( 0, 0 )
x2 y2
( a, 0 ) x4 y4
( c, d ) 1
with a and d each positive. Here: Area = ( x1 y2 + x2 y4 + x4 y1 − y1 x2 − y2 x4 − y4 x1 )
2
1 1
( Sum1 − Sum 2 ) = ad RIGHT AREA:
2 2 x2 y2
which is indeed positive (and is the area of
x3 y3
the triangle).
x4 y4
1
STEP 5: QUADRILATERALS Area = ( x2 y3 + x3 y4 + x4 y2 − y2 x3 − y3 x4 − y4 x2 )
2
Here’s a quadrilateral in the coordinate Summing gives:
plane: 1  x1 y2 + x2 y3 + x3 y4 + x4 y1 
Total Area =  
2  − y1 x2 − y2 x3 − y3 x4 − y4 x1 

which – delightfully - is the formula


1
( Sum1 − Sum 2 ) applied to the counter-
2
clockwise list of the quadrilaterals vertices:
x1 y1
x2 y2
x3 y3
We can compute its area by subdividing it x4 y4
into two triangles and applying the shoelace (Notice how the terms corresponding to the
1 interior edge ( x2 , y2 ) to ( x4 , y4 ) cancel in
formula ( Sum1 − Sum 2 ) to each piece,
2 the sum of left and right areas. This interior
each given the counter-clockwise edge is traversed twice by the triangles, but
orientation. in opposite directions.)

RESULT: List the vertices of a quadrilateral


in the coordinate plane in a counter-
clockwise order. Then the area of the
quadrilateral is given by the shoelace
1
formula: ( Sum1 − Sum 2 ) .
2

www.jamestanton.com and www.gdaymath.com


© James Tanton 2014

CHALLENGE: Does the formula work for a


STEP 6: BEYOND QUADRILATERALS polygon with a hole?

If a polygon with N sides can be seen as


constructed by adjoining a triangle to one
edge of a smaller polygon:

Can some version of it be made to work?

Comment: One can, of course, compute the


area of the outer polygon and subtract from
it the area of the hole. But can one, in any
then one can write the shoelace formula reasonable way, interpret this holey
1
( Sum1 − Sum 2 ) for the area of the polygon as a non-holed polygon with two
parallel congruent edges brought infinitely
2
( N − 1) -sided polygon: close together?

x1 y1
x2 y2
M
xN −1 y N −1
and the shoelace formula for the area of
the triangle:
x1 y1 Is this way of thinking helpful? Interesting?
xN −1 yN −1
QUERY: Suppose we wish to compute the
xN yN
area under the graph of y = f ( x ) shown:

and add the two formulas. One sees that


terms corresponding to the vertices of the
common interior edge again cancel. The
resulting formula is the shoelace formula as
applied directly to the original N -gon!

(Notice again that if we follow a counter-


clockwise orientation for the large polygon, We could approximate the curve via line
all interior polygons naturally follow a segments and apply the shoelace formula
counter-clockwise orientation as well.) to the polygon that results:
This establishes that Gauss shoelace
formula works for all reasonable polygons.

www.jamestanton.com and www.gdaymath.com


© James Tanton 2014

By taking the limit of finer and finer


approximations, we should approach the
b
true area under the curve: ∫ f ( x ) dx .
a

Does the shoelace formula give us a new


way to think about integrals?

EXERCISE: In the opening example of a


nonagon we followed a clockwise
orientation, not a counter-clockwise path.
Could this have been a problem?

RESEARCH CORNER:
Is there a three-dimensional version of the
shoelace formula, one that computes
volumes of polyhedra?

© 2014 James Tanton


tanton.math@gmail.com

www.jamestanton.com and www.gdaymath.com

You might also like