TITLE: Prove that a number is rational if and only if from some point on its decimal expansion becomes periodic.
QUESTION [5 upvotes]: Q: "Prove that a number is rational if and only if from some point on its decimal expansion becomes periodic"
Please help!! I am relatively new to algebra and I find these questions very abstract. 
Any input/hint/solution would be highly appreciated! 
God bless you math guys on stackexchange!

REPLY [2 votes]: Proving that if the decimal expansion of $x$ is finite or periodic at some point, then $x$ is rational:

Let $|n|$ denote the number of decimal digits in $n$
Split $x$ into the following parts:


$\color\red{A}=$ the integer part, i.e., $\lfloor{x}\rfloor$
$\color\green{B}=$ the fraction part's non-periodic prefix
$\color\orange{C}=$ the fraction part's periodic postfix


Then:
$$x=\frac{\color\red{A}\cdot(10^{|\color\green{B}|+|\color\orange{C}|}-10^{|\color\green{B}|})+\color\green{B}\cdot(10^{|\color\orange{C}|}-1)+\color\orange{C}}{10^{|\color\green{B}|+|\color\orange{C}|}-10^{|\color\green{B}|}}$$
Hence $x$ is rational.

For example, consider $x=1.23\overline{456}$:

$\color\red{A}=1$
$\color\green{B}=23$
$\color\orange{C}=456$

Then:
$$x=\frac{\color\red{1}\cdot(10^{2+3}-10^{2})+\color\green{23}\cdot(10^{3}-1)+\color\orange{456}}{10^{2+3}-10^{2}}=\frac{41111}{33300}$$