Originally Posted by

**HallsofIvy** $\displaystyle 5^{-1}$ mod 31 is the number, x, such that 5x= 1 (mod 31). There is no integer x such that 5x= 1. There is no integer x such that 5x= 31+ 1= 32. There is no integer x such that 5x= 2(31)+ 1= 63. There is no integer x such that 5x= 3(31)+ 1= 94. But there **is** integer x such that 5x= 4(31)+ 1= 125. That x is 25. So $\displaystyle a= (5)^{-1}(-7b- 11c)= -(25(7b+ 11c)= -(174b+ 2950c)= -(5(31)+ 19)b+ (95(31)+ 5)c= -(19b+ 5c)= -19b- 5c$

-19= 31- 19= 12 (mod 31) and -5= 31- 5= 26 (mod 31). So a= 12b+ 26c (mod 31).