How can adding an infinite number of rationals yield an irrational number?

But for example $$\pi=3+0.1+0.04+0.001+0.0005+0.00009+0.000002+\cdots$$ and that surely does not seem strange to you...


You can't add an infinite number of rational numbers. What you can do, though, is find a limit of a sequence of partial sums. So, $\pi^2/6$ is the limit to infinity of the sequence $1, 1 + 1/4, 1 + 1/4 + 1/9, 1 + 1/4 + 1/9 + 1/16, \ldots $. Writing it so that it looks like a sum is really just a shorthand.

In other words, $\sum^\infty_{i=1} \cdots$ is actually kind of an abbreviation for $\lim_{n\to\infty} \sum^n_{i=1} \cdots$.


Others have demonstrated some examples that make clear why this can happen, but I wanted to point out the key mathematical concept here is "Completeness" of the metric space. A metric space is any set with "distance" defined between any two elements (in the case of $\mathbb{Q}$, we would say $d(x,y) = |x-y|$). A sequence $x_i$ is "Cauchy" if late elements stop moving around very much, a necessary condition for a sequence to have a finite limit. To put it formally, ${x_i}$ is cauchy for $\epsilon>0$, there is a sufficiently large $N$ so that for every $m,n>N$ we have $d(x_n,x_m)<\epsilon$. A metric space is complete if all Cauchy sequences have a limit in the space. The canonical complete metric space is $\mathbb R$, which is in fact the completion of $\mathbb{Q}$, or the smallest complete set containing $\mathbb Q$.

We think of an infinite sum as the limit of a sequence of partial sums: $$\sum_{n=1}^\infty x_n = \lim_{N\to\infty}\left( \sum_{i=1}^Nx_n \right)$$ As others have pointed out with a number of good counter-examples (my favorite of which is the decimal representation of an irrational number), $\mathbb{Q}$ is not complete, therefore an infinite sum of elements of $\mathbb Q$, for which partial sums are necessarily elements of $\mathbb Q$, can converge to a value not in $\mathbb Q$.