  In this paper we study decidability and complexity of decision problems on
matrices from the special linear group $\mathrm{SL}(2,\mathbb{Z})$. In
particular, we study the freeness problem: given a finite set of matrices $G$
generating a multiplicative semigroup $S$, decide whether each element of $S$
has at most one factorization over $G$. In other words, is $G$ a code? We show
that the problem of deciding whether a matrix semigroup in
$\mathrm{SL}(2,\mathbb{Z})$ is non-free is NP-hard. Then, we study questions
about the number of factorizations of matrices in the matrix semigroup such as
the finite freeness problem, the recurrent matrix problem, the unique
factorizability problem, etc. Finally, we show that some factorization problems
could be even harder in $\mathrm{SL}(2,\mathbb{Z})$, for example we show that
to decide whether every prime matrix has at most $k$ factorizations is
PSPACE-hard.
