If the denominator of a rational number contains only 2 and 5 as prime factors then the decimal expansion of the rational number is terminating. How can I Prove this
-
1You can multiply top and bottom by the same integer so that the new denominator is a power of $10$. – David Mitra Jul 11 '15 at 18:31
-
See also Characterising reals with terminating decimal expansions. – peterwhy Jul 11 '15 at 19:01
1 Answers
First, let's observe that any terminating decimal fraction is equal to a simple fraction with a denominator which is a power of $10$ and vice versa.
Now, let $f=p/q$, where $p$ and $q$ are integers and $q$ contains only 2 and 5 as prime factors. Then $q$ can be written as
$$ q = 2^m\cdot 5^n, $$
where $m$ and $n$ are non-negative integers. If $m=n$, then $q=10^n$, and $f=p/10^n$. If $m>n$, then multiplying both the numerator and the denominator of $f$ by $5^{m-n}$, we get
$$ f =\frac{p\cdot 5^{m-n}}{2^m\cdot 5^n\cdot 5^{m-n}} = \frac{p\cdot 5^{m-n}}{2^m\cdot 5^m} = \frac{p\cdot 5^{m-n}}{10^m}. $$
The case $m<n$ can be done the same way by multiplying both the numerator and the denominator of $f$ by $2^{n-m}$. Thus, for any choice of $m$ and $n$, $f$ can be rewritten as a fraction with a power of $10$ in the denominator, or a terminating decimal fraction. QED.
-
A trick to avoid considering three separate cases: multiply by $2^n \cdot 5^m$. But resolving into cases is probably more transparent and natural. – Erick Wong Jul 11 '15 at 19:27