I want to find the inverse of $56 \bmod 5$ so $56x \equiv 1 \bmod 5$. With the eye we can easily see that $x=1$ but i want to follow the procedure.
So i proceed with the extended Euclidian algorithm
$56 = 11 \cdot 5 + 1$
So
$1 = -11 \cdot 5 + 1 \cdot 56$
Since we want the inverse to be in $[1,55]$
$1=(45-56) \cdot 5 + 1 \cdot 56$
So by this procedure it would be $x=45$ which is obviously not correct.
What am i doing wrong here? I thought i followed the algorithm steps accurately