Hint$\ $ Consider what it means for a real $\rm\ 0 < \alpha < 1\ $ to have a periodic decimal expansion:
$$\begin{array}{rrl} &\alpha\!\!\! &\rm =\,\ 0\:.\overbrace{a_1a_2\cdots a_n^{\phantom{l}}}^{\textstyle a}\ \overbrace{\overline{c_1c_2\cdots c_k}}^{\textstyle \overline c}\ \ \text{ in radix } 10\\[.2em]
\iff& \beta \!\!&\!:= \rm 10^n\, \alpha\! -\! a = 0\:.\overline{c_1c_2\cdots c_k}\\[.2em]
\iff& 10^k\: \beta \!\!&=\ \rm c + \beta\\[.2em]
\iff& (10^k-1)\ \beta \!\!&=\ \rm c\\[.2em]
\iff&\!\!\!\! \rm (10^k-1)\ 10^n\: \alpha \!\!&\in\ \Bbb Z
\end{array}\qquad$$
Thus to show that a rational $\rm\,\alpha\,$ has such a periodic expansion, it suffices to find $\rm\,k,n\,$ as above, i.e. so that $\rm\,(10^k-1)\,10^n\,$ serves as a denominator for $\rm\,\alpha.\,$ Put $\rm\,\alpha\, = a/b,\,$ and $\rm\, b = 2^i\,5^j\,d,\,$ where $\rm\,2,5\,\nmid d\,.\,$ Choosing $\rm\,n\, >\, i,\,j\,$ ensures that $\rm\,10^n\,\alpha\,$ has no factors of $\rm\,2\,$ or $\rm\,5\,$ in its denominator. Hence it remains to find some $\rm\,k\,$ such that $\rm\,10^k-1\,$ will cancel the remaining factor of $\rm\,d\,$ in the denominator, i.e. such that $\rm\,d\,|\,10^k-1\,,\,$ or $\rm\,10^k\equiv 1\pmod{d}\,.\,$ Since $\rm\,10\,$ is coprime to $\rm\,d,\,$ by the Euler-Fermat theorem we may choose $\rm\,k = \phi(d),\,$ which completes the proof sketch. For the converse, see this answer.
We know that irrational numbers never repeat by combining the following two facts:
- every rational number has a repeating decimal expansion, and
- every number which has a repeating decimal expansion is rational.
Together these facts show that a number is rational if and only if it has a repeating decimal expansion.
Decimal expansions which don't repeat are easy to construct; other answers already have examples of such things.
I think the most important point to make with regard to your question is that nobody determines the irrationality of a number by examining its decimal expansion. While it is true that an irrational number has a non-repeating decimal expansion, you don't need to show a given number has a non-repeating decimal expansion in order to show it is irrational. In fact, this would be very difficult as we would have to have a way of determining all the decimal places. Instead, we use the fact that an irrational number is not rational; in fact, this is the definition of an irrational number (note, the definition is not that it has a non-repeating decimal expansion, that is a consequence). In particular, to show a number like $\sqrt{2}$ is irrational, we show that it isn't rational. This is a much better approach because, unlike irrational numbers, rational numbers have a very specific form that they must take, namely $\frac{a}{b}$ where $a$ and $b$ are integers, $b$ non-zero. The standard proofs show that you can't find such $a$ and $b$ so that $\sqrt{2} = \frac{a}{b}$ thereby showing that $\sqrt{2}$ is not rational; that is, $\sqrt{2}$ is irrational.
Best Answer
You set up a false dilemma. How many digits a decimal representation of a number has only tells us how much information is needed in the decimal system to describe the number.
While reading the decimal digits of $\pi$ we gain more and more detail about the exact value of the number:
$$ \begin{align} \pi &= 3.1...&\implies&&3.1\leq&\pi\leq3.2\\ \pi&=3.14...&\implies&&3.14\leq&\pi\leq3.15\\ \vdots&&\vdots&&&\vdots\\ \pi&=3.141592...&\implies&&3.141592\leq&\pi\leq3.141593\\ \end{align} $$ so that there are infinitely many digits only goes to show that our decimal system is not "powerful" enough to give all details about the number $\pi$ as a finite set of data.
The size of the data describing $\pi$ in a given system of representation bears no witness to the size of the number itself.
An experiment to consider
You may have the idea that you can measure any given distance with perfect precision, but try the following experiment:
Suppose then from a theoretical point of view that we had a decimal system ruler with infinitely fine markings on it. Then you could zoom in to the $3.14$ and $3.15$ marks and recognize that $\pi$ lies somewhere between those two - much closer to the $3.14$ mark than to the other.
After that try zooming in quite a deal more to the $3.141592$ and the $3.141593$ marks and again $\pi$ escapes fitting any of those two exactly. It is impossible to perform this experiment in practice, but actually the same phenomenon is most likely to be the case for your randomly drawn line - if you only had the power to keep zooming in.