I can see some solutions online that the answer should be 59, for example in these two links.
However, I am using an algorithm from my textbook (Abstract Algebra by Beachy and Blair) which I think should follow like the solution below. However, I get answer -24. Is it correct? I know that there are many (infinitely many?) solutions to the equation considering all linear combinations...so which one is the correct multiplicative inverse?
My method:
Using the Euclidean Algorithm (this is the only method for solving that I understand well), \begin{align*} \begin{bmatrix} 1 & 0 & 83\\ 0 & 1 & 38\\ \end{bmatrix} \sim \begin{bmatrix} 1 & -2 & 7\\ 0 & 1 & 38\\ \end{bmatrix} \tag{row 1 minus 2 $\cdot$ (row2)} \\ \sim \begin{bmatrix} 1 & -2 & 7\\ -5 & 11 & 3\\ \end{bmatrix} \tag{row 2 minus 5 $\cdot$(row 1)} \\ \sim \begin{bmatrix} 11 & -24 & 1\\ -5 & 11 & 3\\ \end{bmatrix} \tag{row 1 minus 2 $\cdot ($row 2)}\\ \sim \begin{bmatrix} 11 & -24 & 1\\ -38 & 83 & 0\\ \end{bmatrix}\tag{row 2 minus 3 $\cdot$ (row 1)} \\ \end{align*} Thus $83(11)+38(-24)=1$, which shows that $[38]_{83}^{-1}=-24$.