$11^{-1}$ modulo $91$ is $58$. Why? I am reading wiki article about Quadratic Sieve and it says
$11^{-1}$ modulo $91$ is $58$ 
Why? How is it been calculated?
 A: $$11\cdot 58 = 638 \equiv 1 \pmod{91}$$
In other words, $11^{-1} = 58$ in $\mathbb{Z}_{91}$.
$\mathbb{Z}_{91} = \{\bar{0},...,\bar{90}\}$ where $\bar{a} = \{x\in \mathbb{Z}|x \equiv a \pmod{91}$}. Now $11^{-1}$ in $\mathbb{Z}_{91}$ is 58 since $$11\cdot58 = 58\cdot 11 = 1 \text{ in } \mathbb{Z}_{91} $$ 
And this is how we define the inverse. But of course we have $11^{-1} = \frac{1}{11}$ in $\mathbb{R}$, and you must be careful not to confuse the two.
A: The reason $58 = 11^{-1} \pmod{91}$ is 
$$58 \cdot 11 = 638 = 7 \cdot 91 + 1 \implies 58 \cdot 11 \equiv 638 \equiv 1 \pmod{91}$$
The reason $11$ has an inverse $\pmod{91}$ is that $\gcd(11, 91) = 1$.  
To calculate the inverse, we use the extended Euclidean algorithm. First, we use the Euclidean Algorithm to solve for $\gcd(11, 91)$.
\begin{align*}
91 & = 8 \cdot 11 + 3\\
11 & = 3 \cdot 3 + 2\\
3 & = 1 \cdot 2 + 1\\
2 & = 2 \cdot 1
\end{align*}
Working backwards, we express $1$ as a linear combination of $11$ and $91$.
\begin{align*}
1 & = 3 - 1 \cdot 2\\
  & = 3 - 1(11 - 3 \cdot 3)\\
  & = 4 \cdot 3 - 1 \cdot 11\\
  & = 4(91 - 8 \cdot 11) - 1 \cdot 11\\
  & = 4 \cdot 91 - 33 \cdot 11
\end{align*}
Hence, 
$$-33 \cdot 11 = 1 - 4 \cdot 91 \implies -33 \cdot 11 \equiv 1 \pmod{91}$$
Thus, $-33 \equiv 11^{-1} \pmod{91}$.  Moreover, any number of the form $-33 + 91t$ is an inverse of $11 \pmod{91}$ since 
$$
11(-33 + 91t) = -363 + 11t \cdot 91 = 1 - 364 + 11t \cdot 91 = 1 + 91(11t - 4)$$ 
Thus, $11(-33 + 91t) \equiv 1 \pmod{91} \implies -33 + 91t \equiv 11^{-1} \pmod{91}$.
In particular, if $t = 1$, we obtain 
$$11^{-1} \equiv -33 + 91 \equiv 58 \pmod{91}$$ 
