How to prove "Unit digit of a square number"?

1.7k Views Asked by At

How can I prove that the unit digit of a perfect square is always $0,1,4,9,5,6$ and never $2,3,7,8$?

It's pretty intuitive but I am having difficulties proving this statement. I had used trial and error to get to that statement.

Note(The original problem was: If the length and width of a rectangle are consecutive positive integers and the area has $6$ in its unit digit.Is it possible to say that one of the length or width is a perfect square number ?)

3

There are 3 best solutions below

4
On BEST ANSWER

Any integer can be written as $10n+r$ where $n,r$ are integers with $0\leq r<10$. Then the unit digit of the square $$(10n+r)^2=100n+20rn+r^2=10(\underbrace{10n+2rn}_{\text{integer}})+r^2$$ is equal to the unit digit of $r^2$. So it suffices to consider the unit digit of $r^2$ when $r\in \{0,1,2,3,4,5,6,7,8,9\}$.

Thus we may conclude that the unit digit of any perfect square belongs to the set $$\{\text{unit digit of $r^2$}: r\in \{0,1,2,3,4,5,6,7,8,9\}\}=\{0,1,4,9,6,5\}.$$

P.S. As regards the original question, a product of two consecutive integers has a unit digit $6$ iff we multiply factors with unit digits $2$ and $3$, or $7$ and $8$. It follows that none of these factors can be a perfect square.

2
On

You can write your number in the form $$n=10k+r_i$$ with $$r_i \in \{0,1,2,3,4,5,6,7,8,9\}$$ and square it.

0
On

Use the modular arithmetic: $$\begin{align} n&\equiv 0,1,2,3,4,5,6,7,8,9 \pmod{10} \Rightarrow \\ n^2&\equiv 0^2,1^2,2^2,3^2,4^2,5^2,6^2,7^2,8^2,9^2 \\ &\equiv 0,1,4,9,16,25,36,49,64,81 \\ &\equiv 0,1,4,9,6,5,6,9,4,1 \pmod{10}.\end{align}$$