# example of commutator of square matrices with non zero determinant

I'm looking for example of two complex square matrices $A,B$ s.t. $det(B)>0$ and determinant of commutator of $A$ and $B$ is non zero: $$det([A,B]) \neq 0$$

• then [A,B]=0, so it's not working – Filip Parker Sep 29 '16 at 17:36
• @Starfall $[I,I]=0$ – 211792 Sep 29 '16 at 17:36

$$A=\begin{pmatrix}1&0\\1&1\end{pmatrix}\,,\,\,B=\begin{pmatrix}1&\!-1\\1&1\end{pmatrix}\implies$$
$$AB=\begin{pmatrix}1&\!-1\\2&0\end{pmatrix}\;,\;\;BA=\begin{pmatrix}0&\!-1\\2&1\end{pmatrix}\implies$$
$$AB-BA=\begin{pmatrix}1&0\\0&\!-1\end{pmatrix}$$