# How to construct square matrices $A$, $B$ with $AB = 0$ and a given determinant

I am trying to build two non-zero square matrices $A$ and $B$ whose product will be zero and who will have any fixed determinant value (e.g. det$(A) = 5$).

I can easily think of two non-zero square matrices that satisfy $AB = 0$, but to get them to have a specific determinant is tripping me up.

Would anyone know of a first step? I imagine it would be easy to start with two triangular matrices.

• If $\det A = 5$, then $A$ is nonsingular. So, $AB=0$ implies $B=0$. Dec 5, 2016 at 22:01
• If $\det A \ne 0$, then $A$ is invertible, so from $AB=O$ we conclude $B=O$. Then getting any determinant you want for $A$ should be easy. Dec 5, 2016 at 22:02
• If you assume $\det(A)\ne 0$, then $B$ must be $0$. Dec 5, 2016 at 22:02
• $\det(AB)=\det(A)\det(B)$ so do you have an example of $A$ $B$ such that neither has determinant 0 but their product does have determinant 0? Dec 5, 2016 at 22:03
• Thanks very much, all. I now see that I was missing some key ideas when I asked this question. Dec 6, 2016 at 3:37

If $A \ne 0$ and $B\ne 0$ are such that $AB=0$, than $A$ and $B$ are not invertible and this means that $\det A =0$ and $\det B=0$.
You can prove this by contraposition. Suppose $A$ is invertible, than
$$AB=0 \Rightarrow A^{-1}(AB)=A^{-1}0 \Rightarrow (A^{-1}A)B=0\Rightarrow B=0$$
and analogously for $B$.