Solution (source code)

= Solution

The <determinant> is $a^2-i(-i)=a^2-1$. The <adjugate matrix> formula gives
$$
\boxed{A^{-1}=\frac1{a^2-1}\begin{pmatrix}a&-i\\i&a\end{pmatrix},\qquad a\ne\pm1.}
$$
When $a=1$ or $a=-1$ we have a <singular matrix>, so no <inverse matrix> exists. This criterion holds for real or complex $a$.