Prove that $\det(A^{2019} +B^{2019} )$ and $\det(A^{2019} -B^{2019} )$ are divisible by $4$

contest-mathdeterminantlinear algebramatrices

Let $A, B \in M_2(\mathbb{Z})$ so that $$\det A=\det B=\frac{1}{4} \det(A^2+B^2)=1$$ Prove that $\det(A^{2019} +B^{2019} )$ and $\det(A^{2019} -B^{2019} )$ are divisible by $4$.

The only observation I have made is that $\det(A^{2019} +B^{2019}) +\det(A^{2019} – B^{2019} )=4$ so suffice it to prove that one of them is divisible by $4$.
EDIT : This was featured on the regional stage of the maths olympiad in Romania on Saturday, so it is an actual problem, not something I came up with. It is relevant to me because I am preparing for the next stage.
EDIT : $AB=BA$ indeed, I forgot to include it when I posted the problem and I am sorry for this.
Since there are people in the comments eager to see the official paper, here it is :
https://i.sstatic.net/JTOYy.jpg
As you can see, this contest took place on the 24th of February(I know we have a pretty strange date format, but this is what 24.02. 2019 means) and it wasn't an online competition, so I really was honest when I said I was not cheating.

Best Answer

The problem statement in general is false if $A$ and $B$ do not commute. E.g. consider $$ A=\pmatrix{1&-1\\ 2&-1}, \ B=\pmatrix{0&-1\\ 1&0}. $$ Then $A^2=B^2=-I$, so that $$ \det(A)=\det(B)=1\ \text{ and } \ \frac14\det\left(A^2+B^2\right)=\frac14\det(-2I)=1. $$ Yet, as $A^{2019}=(A^2)^{1009}A=(-I)^{1009}A=-A$ and the analogous holds for $B$, we have \begin{aligned} \det\left(A^{2019}+B^{2019}\right) =\det(-A-B)=\det(A+B) =\det\pmatrix{1&-2\\ 3&-1} =5, \end{aligned} which is not divisible by $4$. One can easily verify that $AB\ne BA$ in this example.

Nonetheless, the problem statement is true if $AB=BA$. This can be proved easily be considering the eigenvalues of $A,\ B$ and $A^2+B^2$.

Related Question