What are the irreducible elements of the ring of integer matrices? Let $R$ be a ring (not necessarily commutative). A non-unit and non-zero-divisor element $r \in R$ will be called irreducible if for all $a,b \in R$ such that $r=ab$, then $a$ or $b$ is a unit.
The group of units in $M_n(\mathbb{Z})$ is the group $SL^{\pm}_n(\mathbb{Z})$ of matrices of determinant $\pm 1$.
Question 1: What are the irreducible elements of $M_n(\mathbb{Z})$?
If it is too hard, let us restrict to $n=2$.
Note that a sufficient condition for an element $M \in M_n(\mathbb{Z})$ to be an irreducible element is that $\det(M)$ is a prime element of $\mathbb{Z}$. About the converse, let us ask the following:
Question 2: Let $M,N \in M_n(\mathbb{Z})$ such that $\det(M)=\det(N) \neq 0$. Is there $A,B \in SL^{\pm}_n(\mathbb{Z})$ such that $N=AMB$?
A positive answer to Question 2 implies that above sufficient condition is also necessary, and so would answer Question 1.
 A: Notice that if a matrix has determinant plus or minus a prime, then by Binet it's irreducible.
For the converse, notice that given any matrix $A$ there are $S, T\in SL^\pm(n,\Bbb Z)$ such that $SAT$ is in Smith normal form. Now, a diagonal matrix $D$ (and therefore a matrix in Smith normal form) is irreducible if and only if all its diagonal entries are invertible except exactly one, which is irreducible. If $SAT=D_1D_2$, then $A=(S^{-1}D_1)(D_2T^{-1})$, so the Smith normal form of $A$ being irreducible is a necessary condition.
The description of the elementary divisors in terms of the determinant divisors tells us that the irreducible matrices in $M_n(\Bbb Z)$ must have determinant equal to (plus or minus) a prime, and $d_i(A)=1$ for all $i<n$.
Therefore, the following are equivalent:

*

*$A$ is irreducible in $M_n(\Bbb Z)$;

*$\det(A)$ is $\pm$ a prime;

*$\det(A)$ is $\pm$ a prime and $d_i(A)=1$ for all $i<n$;

*the Smith normal form of $A$ is $\begin{bmatrix}I_{n-1}&0\\ 0& p\end{bmatrix}$ for some prime $p$.


Added: As for the second question, the page on Smith normal form clairifes when two matrices $A,B\in \Bbb Z^{m\times n}$ are left-right equivalent. Call $d_i(X)$ the greatest common divisor of all the $i\times i$ minors of $X$, $\alpha_1=d_1(X)$ and $\alpha_i(X)=\frac{d_i(X)}{d_{i-1}(X)}$ for all $2\le i\le \operatorname{rk}X$. Then, there are invertible matrices $S\in SL^\pm(m,\Bbb Z)$, $T\in SL^\pm(n,\Bbb Z) $ such that $A=SBT$ if and only if $\operatorname{rk}A=\operatorname{rk}B$ and $\alpha_i(A)\Bbb Z=\alpha_i(B)\Bbb Z$ for all $1\le i\le \operatorname{rk}A$. This invariant realises exactly the (weakly) decreasing sequences of at most $\min\{m,n\}$ non-zero ideals.
