Thoughts on 1/7 and other rational numbers (Part 3)

In Part 2 of this series, I discussed the process of converting a fraction into its decimal representation. In this post, I consider the reverse: starting with a decimal representation, and ending with a fraction.

Let me say at the onset that the process I’m about to describe appears to be a dying art. When I show this to my math majors who want to be high school teachers, roughly half have either not seen it before or else have no memory of seeing it before. (As always, I hold my students blameless for the things that they were simply not taught at a younger age, and part of my job is repairing these odd holes in their mathematical backgrounds so that they’ll have their best chance at becoming excellent high school math teachers.) I’m guessing that this algorithm is a dying art because of the ease and convenience of modern calculators.

So let me describe how I describe this procedure to my students. To begin, suppose that we’re given a repeating decimal like 0.\overline{432} = 0.432432432\dots. How do we change this into a decimal? Let’s call this number x.

I’m now about to do something that, if you don’t know what’s coming next, appears to make no sense. I’m going to multiply x by 1000. Students often give skeptical, quizzical, and/or frustrated looks about this non-intuitive next step… they’re thinking, “How would I ever have thought to do that on my own?” To allay these concerns, I explain that this step comes from the patented Bag of Tricks. Socrates gave the Bag of Tricks to Plato, Plato gave it to Aristotle, it passed down the generations, my teacher taught the Bag of Tricks to me, and I teach it to my students. Multiplying by 1000 on the next step is absolutely not obvious, unless you happen to know via clairvoyance what’s going to come next.

Anyway, let’s write down x and also 1000x.

1000x = 432.432432\dots

x = 0.432432\dots

Notice that the decimal parts of both x and 1000x are the same. Subtracting, the decimal parts cancel, leaving

999x = 432

or

x = \displaystyle \frac{432}{999} = \displaystyle \frac{16}{37}

In my experience, most students — even senior math majors who have taken a few theorem-proof classes and hence are no dummies — are a little stunned when they see this procedure for the first time. To make this more real and believable to them, I then ask them to pop out their calculators to confirm that this actually worked. (Indeed, many students need this confirmation to be psychologically sure that it really did work.)

TI1637

Then I ask my students, why did we multiply by 1000? They’ll usually give the correct answer: so that the decimal parts will cancel. My follow-up question is, what should we do if the decimal is 0.\overline{24}? They’ll usually respond that we should multiply by 100 or, in general, by 10^n, where n is the length of the repeating block.

This strategy, of course, works for $0.\overline{142857}$, eventually yielding

0.\overline{142587} = \displaystyle \frac{142857}{999999} = \displaystyle \frac{1}{7}

after cancellation.

green line

The same procedure works for decimal expansions with a delay, like x = 0.72\overline{3}. This time, I’ll ask them how we should go about changing this into a fraction. I usually get at least one of three responses. I love getting multiple responses, as this gives the students a chance to came the “different” answers, compare the different strategies, and

Answer #1. Multiply x by 1000 since the repeating pattern starts at the 3rd decimal place.

1000x = 723.333\dots

x = 0.7233\dots

\therefore 999x = 722.61

x =\displaystyle\frac{722.61}{999} = \displaystyle\frac{72261}{99900} = \displaystyle \frac{217}{300}

Answer #2. Multiply x by 10 since the repeating block has length 1.

10x = 7.23333\dots

x = 0.7233\dots

\therefore 9x = 6.51

x = \displaystyle \frac{6.51}{9} = \displaystyle\frac{651}{900} = \displaystyle\frac{217}{300}

Answer #3. First multiply x by 100 to get rid of the delay. Then multiply 100 x by an extra 10 since the repeating block has length 1.

1000x = 723.333\dots

100x = 72.33\dots

\therefore 900x = 651

x = \displaystyle\frac{651}{900} = \displaystyle\frac{217}{300}

green line

The above discussion concerned repeating decimals. For completeness, converting terminating decimals into a fraction is easy. For example,

0.124 = \displaystyle \frac{1}{10} + \frac{2}{100} + \frac{4}{1000} = \displaystyle \frac{124}{1000} = \displaystyle \frac{31}{250}

green line

One more thought. The concept behind Part 2 of this series shows that a rational number of the form k/n, where both k and n are integers, must have either a terminating decimal expansion or else a repeating decimal expansion (possibly with a delay). In this post, we went the other direction. Therefore, we have the basis for the following theorem.

Theorem. A number x is rational if and only if it has either a terminating decimal expansion or else a repeating decimal expansion.

The contrapositive of this theorem is perhaps intuitively obvious.

Theorem. A number x is irrational if and only if it has a non-terminating and non-repeating decimal expansion.

In my experience, most students absolutely believe both of these theorems. For example, most students believe that \sqrt{2} has a decimal expansion that neither terminates nor repeats. That said, most math majors are surprised to discover that it does take quite a bit of work — like a formal write-up of Parts 2 and 3 of this series — to actually prove this statement from middle-school mathematics.

Thoughts on 1/7 and other rational numbers (Part 2)

Let’s take another look at the decimal expansion of 1/7:

TI17

This result from a calculator should convince most students that \displaystyle \frac{1}{7} = 0.\overline{142857}. After all, there’s a second 142 after the first 7, and the ending 9 is consistent with rounding up the 857.

So the evidence that \displaystyle \frac{1}{7} = 0.\overline{142857} is persuasive.

But does this prove beyond a shadow of a doubt that this decimal representation is correct?

Sadly, no. Taken by itself, the result of the calculator is also consistent with, to give just one example, \displaystyle \frac{1}{7} = 0.\overline{142857142910235}, which also would truncate after 10 decimal places to the result shown above.

In short, the calculator gives evidence that the decimal expansion is correct, but does not prove that it’s correct.

Which leads to the obvious question: how do we prove it?

green_speech_bubble

One method, which used to be taught in elementary school (I honestly don’t know if this is taught anymore), is by traditional long division:longdivision17

After six steps, we finally get to a remainder that was previously seen (in this case, on the first step). Therefore, we tell students, the subsequent digits have to repeat.

By the way, this is the essence of the proof for why every rational number has either a repeating decimal representation (possibly with a delay, like 0.1\overline{6}) or else a terminating decimal representation. Though a more formal proof would be preferred by professional mathematicians, the idea is simple: in the algorithm for long division for k/n, there are only n possible remainders: 0, 1, \dots, n-1. So we eventually have to arrive at a remainder that was seen before. If that remainder is 0, then the decimal representation terminates. Otherwise, the decimal representation repeats itself.

In my experience, every math major that I’ve ever met intuitively knows that the above theorem is true. After all, they’ve worked intensively with decimals since 5th grade and have seen decimals in the lower elementary grades. However, very few can articulate why it’s true.

Thoughts on 1/7 and other rational numbers (Part 1)

I’m guessing that not many people ever blocked time out of their busy schedules to purposefully memorize the decimal representation of a fraction. Nevertheless, in my experience, most math majors and math teachers can immediately convert, from memory, most (but not all — more on this later) fractions of the form \displaystyle \frac{k}{n} into its decimal representation as long as the denominator n is less than or equal to 10. They can also go the other direction, mentally recognizing a decimal expansion as a fraction of this form.

This memorization occurs not because of purposeful study but because these fractions arise so commonly from 6th grade through college that students can’t help but memorize them. They just come up so often that good students almost can’t help but memorize them.

Here are the decimal representations of \displaystyle \frac{k}{n}, where the fraction is in lowest terms and 1 \le k < n \le 10.

\displaystyle \frac{1}{2} = 0.5

\displaystyle \frac{1}{3} = 0.\overline{3} \quad \displaystyle \frac{2}{3} = 0.\overline{6}

\displaystyle \frac{1}{4} = 0.25 \quad \displaystyle \frac{3}{4} = 0.75

\displaystyle \frac{1}{5} = 0.2 \quad \displaystyle \frac{2}{5} = 0.4 \quad \displaystyle \frac{3}{5} = 0.6 \quad \displaystyle \frac{4}{5} = 0.8

\displaystyle \frac{1}{6} = 0.1\overline{6} \quad \displaystyle \frac{5}{6} = 0.8\overline{3}

\displaystyle \frac{1}{7} = 0.\overline{142857} \quad \displaystyle \frac{2}{7} = 0.\overline{285714} \quad \displaystyle \frac{3}{7} = 0.\overline{428571}

\displaystyle \frac{4}{7} = 0.\overline{571428} \quad \displaystyle \frac{5}{7} = 0.\overline{714285} \quad \displaystyle \frac{6}{7} = 0.\overline{857142}

\displaystyle \frac{1}{8} = 0.125 \quad \displaystyle \frac{3}{8} = 0.375 \quad \displaystyle \frac{5}{8} = 0.625 \quad \displaystyle \frac{7}{8} = 0.875

\displaystyle \frac{1}{9} = 0.\overline{1} \quad \displaystyle \frac{2}{9} = 0.\overline{2} \quad \displaystyle \frac{4}{9} = 0.\overline{4} \quad \displaystyle \frac{5}{9} = 0.\overline{5} \quad \displaystyle \frac{7}{9} = 0.\overline{7} \quad \displaystyle \frac{8}{9} = 0.\overline{8}

\displaystyle \frac{1}{10} = 0.1 \quad \displaystyle \frac{3}{10} = 0.3 \quad \displaystyle \frac{7}{10} = 0.7 \quad \displaystyle \frac{9}{10} = 0.9

Like I said, most (but not all) of these have been memorized by math majors and math teachers. The exceptions, not surprisingly, are the fractions with a denominator of 7.

When I was a child, I read somewhere the following rule for memorizing the decimal expansion of \displaystyle \frac{k}{7}. I must have been lucky, because I have yet to meet a student that also saw this rule. The following is not a formal proof of the rule, but it does work for the purposes of memorization.

Step 1. Let’s begin with \displaystyle \frac{1}{7}. The decimal expansion can be remembered by repeating “3, 2, 6” along with repeating “up, down.” Repeating both patterns, we get

up 3

down 2

up 6

down 3

up 2

down 6

So,

Start at 1:

up 3: \quad 1 + 3 = 4

down 2: \quad 4 - 2 = 2

up 6: \quad 2 + 6 = 8

down 3: \quad 8 - 3 = 5

up 2: \quad 5 + 2 = 7

down 6: \quad 7 - 6 = 1

The pattern returns back to 1, and the digits repeat. That’s the decimal expansion:

\displaystyle \frac{1}{7} = 0.142857142857\dots

Steps 2-6. For \displaystyle \frac{2}{7}, \dots, \frac{6}{7}, the digits repeat in the same pattern as \displaystyle \frac{1}{7}, just starting at a different place. For example:

For \displaystyle \frac{2}{7}, the second smallest of the digits 1, 4, 2, 8, 5, \hbox{~and~} 7 is 2. So we’ll drop the first 1 and 4 and start on 2:

\displaystyle \frac{1}{7} = 0.2857142857\dots = 0.\overline{285714}

For \displaystyle \frac{4}{7}, the fourth smallest of the digits 1, 4, 2, 8, 5, \hbox{~and~} 7 is 5. So we’ll drop the first 1, 4, 2, and 8 and start on 5:

\displaystyle \frac{4}{7} = 0.57142857\dots = 0.\overline{571428}

green line

P.S. Plenty of math majors (though perhaps not a majority) have also memorized the decimal expansions of \displaystyle\frac{k}{11} and \displaystyle \frac{k}{12}. For 11, the rule is multiply k by 9 to form the two-digit repeating block. In other words:

4 \times 9 = 36, and so \displaystyle \frac{4}{11} = 0.\overline{36}

8 \times 9 = 72, and so \displaystyle \frac{8}{11} = 0.\overline{72}

1 \times 9 = 9, and so \displaystyle \frac{1}{11} = 0.\overline{09}

For 12, the only lowest-term fractions are \displaystyle \frac{1}{12}, \displaystyle \frac{5}{12}, \displaystyle \frac{7}{12}, and \displaystyle \frac{11}{12}. To begin, the first should be memorized:

\displaystyle \frac{1}{12} = 0.08333\dots = 0.08\overline{3}

The others are obtained by addition or subtraction:

\displaystyle \frac{7}{12} = \displaystyle \frac{1}{2} + \frac{1}{12} = 0.5 + 0.08333\dots = 0.58333\dots = 0.58\overline{3}

\displaystyle \frac{5}{12} = \displaystyle \frac{1}{2} - \frac{1}{12} = 0.5 - 0.08333\dots = 0.41666\dots = 0.41\overline{3}

\displaystyle \frac{11}{12} = 1 - \frac{1}{12} = 1 - 0.08333\dots = 0.91666\dots = 0.91\overline{6}

Full lesson plan: Platonic solids

Over the summer, I occasionally teach a small summer math class for my daughter and her friends around my dining room table. Mostly to preserve the memory for future years… and to provide a resource to my friends who wonder what their children are learning… I’ll write up the best of these lesson plans in full detail.

This was the first lesson that I taught to this audience: constructing the five regular polyhedra and inductively deriving Euler’s formula. This lesson plan is written in a 5E format — engage, explore, explain, elaborate, evaluate — which promotes inquiry-based learning and fosters student engagement.

Platonic Solids Lesson

Post Assessment 1

Post Assessment 2

V-E-F Chart

Vocabulary Sheet

Unsolved problems: the Collatz conjecture

Students at all levels — elementary, middle, secondary, and college — tend to think that either (1) all the problems in mathematics have already been solved, or else (2) some unsolved problems remain but only an expert can understand even the statement of the problem.

There are plenty of famous unsolved problems in mathematics. And the Collatz conjecture is an easily stated unsolved problem that can be understood by most fourth and fifth graders.

Here’s the statement of the problem.

  • Start with any positive integer.
  • If the integer is even, divide it by 2. If it’s odd, multiply it by 3 and then add 1.
  • Repeat until (and if) you reach 1.

That’s it. From Wikipedia:

For instance, starting with 6, one gets the sequence 6, 3, 10, 5, 16, 8, 4, 2, 1.

Starting with 11, for example, takes longer to reach 1: 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1.

The sequence for 27 takes 111 steps, climbing to 9232 before descending to 1: 27, 82, 41, 124, 62, 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1

The longest progression for any initial starting number less than 100 million is 63,728,127, which has 949 steps. For starting numbers less than 1 billion it is 670,617,279, with 986 steps, and for numbers less than 10 billion it is 9,780,657,630, with 1132 steps.

Here’s the question: Does this sequence eventually reach 1 no matter the starting value? Or is there a number out there that you could use as a starting value that has a sequence that never reaches 1?

Like I said, this is an easily stated problem that most fourth graders could understand. And no one knows the answer. Every number that’s been tried by computer has produced a sequence that eventually reaches 1. But that doesn’t mean that there isn’t a bigger number out there that doesn’t reach 1.

I’ll refer to the above Wikipedia page (and references therein) for further reading about the Collatz conjecture. Pedagogically, I suggest that casually mentioning this unsolved problem in class might inspire students to play with mathematics on their own, rather than think that all of mathematics has already been solved by somebody.

xkcdcollatz_conjecture

Source: http://www.xkcd.com/710/

Full lesson plan: magic squares

Over the summer, I occasionally teach a small summer math class for my daughter and her friends around my dining room table. Mostly to preserve the memory for future years… and to provide a resource to my friends who wonder what their children are learning… I’ll write up the best of these lesson plans in full detail.

This was perhaps my favorite: fostering algebraic thinking through the use of 3×3 magic squares, which have the property that the numbers in every row, column, and diagonal have the same sum.

6a00d83542d51e69e2016304a977c0970d-500wi

This lesson plan is written in a 5E format — engage, explore, explain, elaborate, evaluate — which promotes inquiry-based learning and fosters student engagement.

Magic Squares Lesson Plan

Post Assessment 1

Post Assessment 2

Vocabulary Sheet

Magic Squares Examples

 

 

A great algebra question. (Or is it?)

I absolutely love the following algebra question:

Mrs. Ortiz made a batch of cookies for Carlos, Maria, Tina, and Joe. The children shared the cookies equally and finished them all right away.

Then Mrs. Ortiz made another batch of cookies, twice as big as the first. When she took the cookies off the cookie sheet, 6 of them crumbled, so she didn’t serve them to the children. She gave the children the rest of the cookies.

Just then, Mr. Ortiz came home and ate 2 cookies from the children’s tray. Each of the children ate 3 more cookies along with a glass of milk. They were stuffed, so they decided to leave the last 4 cookies on the tray.

1. How many cookies were in the first batch?

2. How many cookies did each of the children eat?

The reason I love this algebra question is that it wasn’t an algebra question. It was a question that was posed to upper elementary students. (Here are the Google results for this question; most of the results are brain-teaser type questions for students ranging from 4th grade to 6th grade.)

As a math person, my first instinct probably would be to let x represent the number of cookies that each child ate on the first day and then set up an equation for x based on the information from the second day. There may be other algebraic ways of solving this problem that are just as natural (or even better than my approach.)

So try to think about this problem from the perspective of a child who hasn’t learned algebra yet.  How would you even start tackling a complex problem like this if you didn’t know you could introduce an x someplace?

I encourage you to take a few minutes and try to solve this problem as a 4th or 5th grader might try to solve it.

While this problem doesn’t require the use of algebra, it does require the use of algebraic thinking. That’s what I love about this problem: even a 9-year-old child can be reasonably expected to think through a solution to this problem, even if the methods that they might choose may not be those chosen by students with more mathematical training.

My observation is that math majors in college — even those that have good teaching instincts and want to teach in high schools after graduating — have a difficult time thinking that far back in time. Of course, putting themselves in the place of students who have not learned algebra yet is a good exercise for anyone who wants to teach algebra. So that’s a major reason that I love this problem; it’s a good vehicle for forcing college students who are highly trained in mathematics to think once again like a pre-algebra student.

 

Cryptography As a Teaching Tool

From the webpage Cryptography As a Teaching Tool, found at http://www.math.washington.edu/~koblitz/crlogia.html, which was written by Dr. Neal Koblitz, Professor of Mathematics at the University of Washington:

Cryptography has a tremendous potential to enrich math education. In the first place, it puts mathematics in a dramatic setting. Children are fascinated by intrigue and adventure. More is at stake than a grade on a test: if you make a mistake, your agent will be betrayed.

In the second place, cryptography provides a natural way to get students to discover certain key mathematical concepts and techniques on their own. Too often math teachers present everything on a silver platter, thereby depriving the children of the joy of discovery. In contrast, if after many hours the youngsters finally develop a method to break a cryptosystem, then they will be more likely to appreciate the power and beauty of the mathematics that they have uncovered. Later I shall describe cryptosystems that the children can break if they rediscover such fundamental techniques of classical mathematics as the Euclidean algorithm and Gaussian elimination.

In the third place, a central theme in cryptography is what we do not know or cannot do. The security of a cryptosystem often rests on our inability to efficiently solve a problem in algebra, number theory, or combinatorics. Thus, cryptography provides a way to counterbalance the impression that students often have that with the right formula and a good computer any math problem can be quickly solved.

Mathematics is usually taught as if it were a closed book. Other areas of science are associated in children’s minds with excitement and mystery. Why did the dinosaurs die out? How big is the Universe? M. R. Fellows has observed that in mathematics as well, the frontiers of knowledge can and should be put within reach of young students.

Finally, cryptography provides an excellent opportunity for interdisciplinary projects… in the middle or even primary grades.

This webpage provides an excellent mathematical overview as well as some details about to engage students with the mathematics of cryptography.

Geometric magic trick

This is a magic trick that my math teacher taught me when I was about 13 or 14. I’ve found that it’s a big hit when performed for grade-school children.

Magician: Tell me a number between 3 and 10.

Child: (gives a number, call it x)

Magician: On a piece of paper, draw a shape with x corners.

Child: (draws a figure; an example for x=6 is shown)

geom_magic1Important Note: For this trick to work, the original shape has to be convex… something shaped like an L or M won’t work. Also, I chose a maximum of 10 mostly for ease of drawing and counting (and, for later, calculating).

Magician: Tell me another number between 3 and 10.

Child: (gives a number, call it y)

Magician: Now draw that many dots inside of your shape.

Child: (starts drawing y dots inside the figure; an example for y = 7While the child does this, the Magician calculates 2y + x - 2, writes the answer on a piece of paper, and turns the answer face down.

geom_magic2Magician: Now connect the dots with lines until you get all triangles. Just be sure that no two lines cross each other.

Child: (connects the dots until the shape is divided into triangles; an example is shown)

geom_magic3Magician: Now count the number of triangles.

Child: (counts the triangles)

Magician: Was your answer… (and turns the answer over)?

The reason this magic trick works so well is that it’s so counter-intuitive. No matter what convex x-gon is drawn, no matter where the y points are located, and no matter how lines are drawn to create triangles, there will always be 2y + x - 2 triangles. For the example above, 2y+x-2 = 2\times 7 + 6 - 2 = 18, and there are indeed 18 triangles in the figure.

Why does this magic trick work? I offer a thought bubble if you’d like to think about it before scrolling down to see the answer.

green_speech_bubbleThis trick works by counting the measures of all the angles in two different ways.

Method #1: If there are T triangles created, then the sum of the measures of the angles in each triangle is 180 degrees. So the sum of the measures of all of the angles must be 180 T degrees.

geom_magic4Method #2: The sum of the measures of the angles around each interior point is 360 degrees. Since there are y interior points, the sum of these angles is 360y degrees.

geom_magic5The measures of the remaining angles add up to the sum of the measures of the interior angles of a convex polygon with x sides. So the sum of these measures is 180(x-2) degrees.

geom_magic6In other words, it must be the case that

180T = 360y + 180(x-2), or T = 2y + x - 2.

That Makes It Invertible!

There are several ways of determining whether an n \times n matrix {\bf A} has an inverse:

  1. \det {\bf A} \ne 0
  2. The span of the row vectors is \mathbb{R}^n
  3. Every matrix equation {\bf Ax} = {\bf b} has a unique solution
  4. The row vectors are linearly independent
  5. When applying Gaussian elimination, {\bf A} reduces to the identity matrix {\bf I}
  6. The only solution of {\bf Ax} = {\bf 0} is the trivial solution {\bf x} = {\bf 0}
  7. {\bf A} has only nonzero eigenvalues
  8. The rank of {\bf A} is equal to n

Of course, it’s far more fun to remember these facts in verse (pun intended). From the YouTube description, here’s a Linear Algebra parody of One Direction’s “What Makes You Beautiful”. Performed 3/8/13 in the final lecture of Math 40: Linear Algebra at Harvey Mudd College, by “The Three Directions.”

While I’m on the topic, here’s a brilliant One Direction mashup featuring the cast of Downton Abbey. Two giants of British entertainment have finally joined forces.