From Rosen's Discrete Math Textbook:
Formulate a conjecture about the final decimal digit of the square of an integer and prove your result.
Solution: The smallest perfect squares are 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, and so on. We notice that the digits that occur as the final digit of a square are 0, 1, 4, 5, 6, and 9, with 2, 3, 7, and 8 never appearing as the final digit of a square. We conjecture this theorem: The final decimal digit of a perfect square is 0, 1, 4, 5, 6, or 9. How can we prove this theorem?
We first note that we can express an integer n as 10a + b, where a and b are positive integers and b is 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9. Here a is the integer obtained by subtracting the final decimal digit of n from n and dividing by 10. Next, note that $(10a + b)^{2}$ = 100$a^{2}$ + 20ab + $b^{2}$ = 10(10$a^{2}$ + 2b) + $b^{2}$, so that the final decimal digit of $n^{2}$ is the same as the final decimal digit of $b^{2}$. Furthermore, note that the final decimal digit of $b^{2}$ is the same as the final decimal digit of $(10 − b)^{2}$ = 100 − 20b + $b^{2}$. Consequently, we can reduce our proof to the consideration of six cases.
Case (i): The final digit of n is 1 or 9. Then the final decimal digit of $n^{2}$ is the final decimal digit of $1^{2}$ = 1 or $9^{2}$ = 81, namely, 1.
Case (ii): The final digit of n is 2 or 8. Then the final decimal digit of $n^{2}$ is the final decimal digit of $2^{2}$ = 4 or $8^{2}$ = 64, namely, 4.
Case (iii): The final digit of n is 3 or 7. Then the final decimal digit of $n^{2}$ is the final decimal digit of $3^{2}$ = 9 or $7^{2}$ = 49, namely, 9.
Case (iv): The final digit of n is 4 or 6. Then the final decimal digit of $n^{2}$ is the final decimal digit of $4^{2}$ = 16 or $6^{2}$ = 36, namely, 6.
Case (v): The final decimal digit of n is 5. Then the final decimal digit of $n^{2}$ is the final decimal digit of $5^{2}$ = 25, namely, 5.
Case (vi): The final decimal digit of n is 0. Then the final decimal digit of $n^{2}$ is the final decimal digit of $0^{2}$ = 0, namely, 0.
Because we have considered all six cases, we can conclude that the final decimal digit of $n^{2}$, where n is an integer is either 0, 1, 4, 5, 6, or 9.
My questions/confusions are on the bolded parts:
Question 1: Although they mention a and b are positive integers, meaning I assume they're implicitly saying we're only considering positive integers (since a negative n squared is same as positive n squared), the statement "here a is the integer obtained by subtracting the final decimal digit of n from n and dividing by 10" would be incorrect if n was negative, correct?
Question 2: I'm not understanding the part "furthermore, note that the final decimal digit of $b^{2}$ is the same as the final decimal digit of $(10 − b)^{2}$ = 100 − 20b + $b^{2}$." since $100 − 20b + b^{2} = 10(10 - 2b) + b^{2}$, where (10 - 2b) is negative when $b \geq 6$. But I thought from the quote "We first note that we can express an integer n as 10a + b, where a and b are positive integers and b is 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9.", that "a" should be positive. How does this affect the analysis here?
Kindly please help me and let me know.