A solution in a book demonstrates the following:


79z = 92x + 9y (values for z, x and y are in between 0 and 10)


Modulo 9, this gives -2z ≡ 2x and by multiplying both sides by 5 gives -z ≡ x. Since 1 ≤ x ≤ 9, we have z = 9 - x.



Can someone please explain how taking Modulo 9 of the equation above leads to these results in detail. Thanks.