im currently study for exam and I have a problem that I forgot how to solve. I have the quotient ring $\mathbb{Z}/_{\langle 560 \rangle}$.
How do I find how many inverse elementes exists in the ring? and how do I find the inverse of $99+\langle 560 \rangle$?
thank you.
Extended Euclidean algorithm:
$$560=5×99+65\\99=1×65+34\\65=1×34+31\\34=1×31+3\\31=3×10+1$$.
So $(99,560)=1.$
Now work backwards: $$1=31-\color{red}{3}×10=31-(\color{red}{34-1×31})×10=11×\color{purple}{31}-10×34=11(\color {purple}{65-1×34})-(10)34=11×65-(21)×\color {orange}{34}=11×65- (21)(\color {orange}{99-1×65})=32×\color {blue}{65}-21×99=(32)(\color{blue}{560-5×99})-21×99=32×560-181×99.$$
So $99^{-1}\equiv-181\equiv379\pmod{560}.$