system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do two single digit integers that equal 10 when added together both have the same last number when squared?

0^2 and 10^2 end in 0  
 
1^2 and 9^2 end in 1  
  
2^2 and 8^2 end in 4   
  
3^2 and 7^2 end in 9  
  
4^2 and 6^2 end in 6  
  
5^2 ends in 5  
  
So if   
  
>x + y = an integer ending in 0  
>x^2 and y^2 have the same last number  
  
Is there a reason for this? It feels like this makes the unit of 10 mathematically unique.
gpt
Let y = 10 - x. Assume x is an integer. 
Then y^2 = (10 - x)^2 = 100 - 20x + x^2

Notice that in the expression 100 - 20x + x^2, since x is an integer, 20x will end in a zero, just like 100 does. That means that the last digit in the sum will be 0 + 0 + whatever the last digit of x^2 is.