## Tuesday, June 19, 2012

### Converting a decimal to a fraction

If you haven't done so yet, read yesterday's post on decimal representations of fractions, as some of the concepts discussed today will reference those ideas.

When you calculate a number on a calculator, sometimes you are left with a decimal number, such as 3.125. Sometimes you round that part off, but other times it is useful to rewrite that decimal part as a fraction instead. Here are the methods I know for how to do that:

1. Duh--It's one that you memorized.
2. Use the calculator
3. Write it over a factor of ten
4. Write it over a bunch of nines
5. Solve an equation
1. After years of working with numbers, I have a huge number of fraction/decimal number memorized, not because I made flash cards of them and studied them like the times tables, but because familiarity comes with frequency. How many songs can you recite the words to?  I immediately recognized the .125 as one of the 8ths, and if you know it, then you're done! I always list the simplest approaches first, because sometimes my students forget that they know things, and try to use the more difficult approaches on questions they shouldn't.

2. Many calculators have a fraction button, or have conversion tools built into them. I love the TI-30's implementation of fractions -- but TI 82, 83, and 84 decided to hide this functionality in the Math menu.  You can still find it easily -- type the decimal number, then press math, and the first option converts it to a fraction. This is usually the second thing I teach my algebra students when they get their new TI84's each year.

3.  If the decimal version is a non-repeating fraction, like .125, but one you don't have memorized, you can easily write it as a fraction. Since the decimal notation has 3 digits in it, write those three digits in the numerator, and write it over 10^3, or a 1 with three zeros. That will produce a fraction which may or may not be reducible. Any power of ten is only divisible by 2's or 5's, and when you reduce, simply try to divide by 2 or 5 as often as possible.
$0.125 = \frac{125}{1000}\frac{\div 5}{\div 5} = \frac{25}{200}\frac{\div 5}{\div 5} = \frac{5}{40}\frac{\div 5}{\div 5}=\frac{1}{8}$

4. If the decimal version is of the repeating variety, then as we learned in yesterday's post, it can be written over a bunch of nines. Like in #3, figure out how many digits repeat in the pattern, and write it over the same number of repeated nines. As an example, consider the decimal $\inline 0.027027027027... = 0.\overline{027}$ which you might recognize from yesterday. It has three digits repeating, and so I'll put 027 in the numerator and 999 in the denominator, and reduce it if possible. Here the reducing might be more difficult as it will involve all sorts of possible factors, except 2's and 5's.
$0.027027027027... = 0.\overline{027} = \frac{27}{999}\frac{\div 3}{\div 3} = \frac{9}{333}\frac{\div 3}{\div 3} = \frac{3}{111}\frac{\div 3}{\div 3}=\frac{1}{37}$

5. The hardest type of fraction to rationalize (i.e. write as a fraction) is one that is delayed repeating fraction, such as 0.52727272727... The process I've learned for this type of fraction is to start by writing it as an equation equal to x, multiply by powers of ten till you have only repeated fractions, subtract, and divide. I will simply show the process below, and if you want more explanation, examples, or a proof for why it works, I'll consider expanding it in a future post.

First write it as an equation:  x = 0.52727272727...
Next multiply both sides by 10 enough times to remove one cycle of repeating digits. In this particular case, the repeating part is 2 digits long, so I'm going to multiply by 100 to shift 2 decimal places.  That yields the equation: 100x = 52.72727272727...

The next step is to subtract these two equations and divide. Notice how the shifted equation and the original have the repeated parts aligned perfectly, so they subtract themselves away.
\begin{align*} 100x &= 52.7272727272... \\ - x &= 00.5272727272... \\ 99x &= 52.200000000... \\ 990x &= 522 \\ x &= \frac{522}{990} \left (\frac{\div 18}{\div 18} \right ) =\frac{29}{55} \end{align*}
Not the most intuitive method in the world, but it's a nice one to have in your bag of tricks.