Hill cipher, different result when decrypting

cryptography

I have a key

$$K=\begin{pmatrix} 2 & 1\\ 3 & 4 \end{pmatrix}$$

The $K$ is invertible, so we can find the chipertext from that key.

I want to encrypt "il" with Hill Chiper.
We know il=(8,11). And what i got after encrypted it was (23,0) that is become "XA".

Then, i tried to decrypted it. First, i found the inverse matrix on $\mathbb z_{26}$ which is

$$K^{-1}=\begin{pmatrix} 6 & 21\\ 11 & 16 \end{pmatrix}$$

But i got (8,15) instead of (8,11).

Is my inverse matrix wrong or i encrypted it wrong?

Please help me, where is my mistake?

Thanks

Best Answer

The determinant is $8-3=5$.

$5 \cdot 5 \equiv -1\pmod {26}$, hence $5^{-1} \equiv -5 \pmod{26}$.

$$K^{-1}=(-5)\begin{bmatrix} 4 & \color{red}{-}1 \\ \color{red}{-}3 & 2\end{bmatrix}=\begin{bmatrix} 6 & \color{red}5 \\ \color{red}{-11} & 16\end{bmatrix}$$