# Proof $\sqrt{2}$ irrational using last digits

"This proof was found by Sergey Markelov when yet in high school. In the decimal system, a square of an integer may only end in one of the following digits: $$0$$, $$1$$, $$4$$, $$5$$, $$6$$, $$9$$ whereas twice a square may only end with $$0$$, $$2$$, $$8$$. Thus assuming $$a^2=2b^2$$, both $$a$$ and $$b$$ may only end with $$0$$. This triggers an infinite descent which proves that this is also impossible."

What exactly is the infinite descent here? I can see that the only solution is $$a=0$$, $$b=0$$, but I don't see how that shows that there exist smaller $$a$$, $$b$$.

• Hint: If they both end with a $0$, they both are divisible by $10$.
– Gary
Apr 22, 2020 at 6:37
• @jamie thank you for sharing this beautiful proof. :) Apr 22, 2020 at 7:03
• Just for the record, its proof no 14 here cut-the-knot.org/proofs/sq_root.shtml Apr 22, 2020 at 7:15

I was struggling to see how the last digit of $$b^2$$ must be 0. I believe the answer is that it is not necessary, it could be 0 or 5. It can be seen that the last digits of $$a^2,b^2$$ must be in 0,1,4,9,6,5 , so cannot be 2 or 8,

$$a^2\equiv 0 \mod 10$$ $$2b^2\equiv 0 \mod 10$$ Since $$2|10$$, $$b^2\equiv 0 \mod 5$$ Then since 5 is prime, we can make the argument that the factor of 5 did not come from squaring. Therefore if true for $$b,a$$ we can divide by 5 to find it is also true for two smaller integers, leading to a contradiction by infinite descent due to the well ordering principle.

Assume for contradiction that there are non zero natural numbers $$a, b$$ such that $$a^2 = 2 b^2$$. Consider $$a \neq 0 \in \mathbb{N}$$ minimal such that there is $$b \in \mathbb{N}$$ (wlog) such that $$a^2 = 2 b^2$$. As observed, the last digit of $$a^2$$ and $$2b^2$$ are $$0$$, so that both are divisible by $$5$$.

Hence, both $$a$$ and $$b$$ are divisible by $$\textbf{5}$$ (and not necessarily by $$10$$, as noted by @jamie in his excellent answer).

Then $$a' := \frac{a}{5}$$ and $$b' := \frac{b}{5}$$ also satisfy $$a'^2 = 2 b'^2$$. It is a contradiction since $$a' < a$$.

Btw I skiped the "infinite descent" but it amounts to this : if any $$a, b$$ satisfy $$a^2 = 2 b^2$$ then $$a' := \frac{a}{5}$$ and $$b' := \frac{b}{5}$$ also satisfy $$a'^2 = 2 b'^2$$ and eventualy you can't divide by $$5$$ anymore.

• Please see my answer, I think you(and the quoted proof) were wrong to assume that the last digit of $2b^2$ is 0 Apr 22, 2020 at 16:01
• @jamie Well done, I included your remark. Apr 23, 2020 at 2:25