# Can the product of some matrices equal the identity matrix?

Let $$A=\begin{pmatrix} 1 & 2 \\ 0 & 1\end{pmatrix}$$ and $$B=\begin{pmatrix} 1 & 0 \\ -2 & 1\end{pmatrix}$$.

Can a product $$X_1 X_2...X_n$$ be equal to the identity matrix if every factor $$X_i$$ equals either $$A$$ or $$B$$?

I believe that the answer is negative, but I don't really know how to prove it. I thought of two approaches:

1. We could try doing this by induction. The base case is trivial since neither of $$A$$ nor $$B$$ are the identity matrix. However, I don't know how to go from $$n$$ to $$n+1$$.

2. Maybe we should use the fact that if $$U, V$$ are two square matrices such that $$UV$$ is the identity, then $$VU$$ is also the identity. I guess that we should somehow shuffle the order of the factors using this observation, but then again, I don't know how to use this.

• Where did you come across this question? You've tagged your question as constest-math; is this question from a competition? Dec 10, 2021 at 17:20
• @BenGrossmann I suspect it is, but I for one got it from a selection test for a competition (to make things clear, that selection test was 6 months ago, so this is not some attempt to cheat). But as I said, I suspect it was given somewhere. Dec 10, 2021 at 18:32

Let $$s=\begin{bmatrix}0 & -1 \\1&0\end{bmatrix}$$ and $$t=\begin{bmatrix}1 & -1 \\ 1&0\end{bmatrix}$$. Then, in $$PSL_2(\mathbb{Z})$$, $$s^2=t^3=1$$, $$s,t$$ generate this group and have no other nontrivial relation (see https://chiasme.wordpress.com/2015/03/08/an-elementary-application-of-ping-pong-lemma/).
Now, note that in $$PSL_2(\mathbb{Z})$$, $$(ts)^{2}=A$$ while $$B=(st)^2$$.
So we want to see that no word in $$stst$$ and $$tsts$$ simplifies to the trivial word when $$s^2=t^3=1$$. That looks obvious (we can only reduce when $$stst$$ comes after $$tsts$$ and then the result is $$tst^{-1}st$$ which cannot be reduced further).