But what about numbers which are written as decimals?
Every middle schooler remembers the joys of converting fractions to decimals (and to percents, but that's a post for a different day). But what about converting them back to fractions?
Terminating decimals are a cinch. Take a number like .375, which is properly pronounced three hundred seventy five thousandths. (It's usually pronounced "point three seven five" by lazy people, including some educators, including myself. Shame on me.) They can easily be turned into a fraction where the denominator is a power of 10.
There are three decimal places, so if you multiply the decimal by 103, you have the numerator 375 and 1000 as the denominator: 375 / 1000, which simplifies to 3/8, which is obviously a rational number.
Repeating decimals are a little trickier. Sure, you may recognize 0.7777777... and know that it's 7/9, or even 0.36363636... is 4/11. But what a strange number like 0.378378378...?
There is a simple procedure for it, involving a little Algebra.
Let x = 0.378378378378... And then do the following calculations:
x =     0.378378378378....
999x = 378.00000000000....
x = 378 / 999 which simplifies to 14 / 37
By multiplying and subtracting, the repeating pattern of the decimal can be removed, leaving a multiple of x that will always be one less than a power of 10. Dividing by the coefficient transforms the value into a fraction (which may or may not be reducible).
This can be done for any repeating decimal. So any repeating decimal can be written as a fraction, i.e., a ratio of two integers and is, therefore, a rational number.