Ishuda is correct. I think I gave an incorrect answer on another board where you posted this question, thinking that is was only necessary for A or B to be singular.
I did not read the problem correctly and was thinking "AB singular" rather than "AB= 0". If, for example, A is not singular and AB= 0 then multiplying both sides of the equation, on the left, by \(\displaystyle A^{-1}\), B= 0, a contradiction. Conversely, if B is not singular and AB= 0, then multiplying both sides of the equation, on the right, by \(\displaystyle B^{-1}\) gives A= 0, a contradiction. In order to have AB= 0, with neither A nor B equal to 0, they must both be singular.