# Prove that if $A$ and $B$ are square matrices and $AB$ is invertible, then both $A$ and $B$ are invertible

I already know how to prove this using the definition of inverse and the associative property of matrix multiplication, but I was wondering if this would also be a valid proof.

As $A$ and$B$ are $n \times n$ matrices then $AB$ is an $n\times n$ matrix.

Suppose $AB$ is invertible, then by the Fundamental Theorem of Invertible Matrices $AB$ is a product of elementary matrices. Then $A$ and $B$ must both be products of elementary matrices. By the same Fundamental Theorem this implies $A$ and $B$ are invertible.

• $det(AB) = det(A) det(B) \not = 0$ i.e $A,B$ have non-zero determinant i.e invertible. Commented Apr 6, 2016 at 4:54
• Yes I see how this is also a correct way to prove the statement, but I was wondering if there was an error in the informal proof I stated above.
– Dave
Commented Apr 6, 2016 at 5:11
• there is gap in your proof which needs to be addressed. Just because $AB$ is a product of elementary matrices it isn't obvious why should $A$ and $B$ be both products of elementary matrices. It would have been obvious the other way. Commented Apr 6, 2016 at 5:47

## 1 Answer

The way to fill the gap in your proof is as follows: Let $AB=E_1E_2 \dotsb E_k$, where $E_i$ are elementary matrices. Then consider the homogeneous system $B\vec{x}=\vec{0}$. If this had a solution $\vec{x}_0$, then that will also be a solution to the homogeneous system $AB\vec{x}=\vec{0}$. But $AB$ is invertible so the only solution must be the trivial solution. This means $B$ is invertible. Now we can say that $B$ is a product of elementary matrices. Once we have that then we can write $A=(AB)B^{-1}$ to claim that $A$ is also invertible and product of elementary matrices.

• Thanks for showing how to prove it fully, I had a feeling there was something wrong with my assumption but wasn't sure how to prove/disprove it.
– Dave
Commented Apr 6, 2016 at 6:11
• When you have proved $B$ is invertible, there's no point in using elementary matrices: $A=(AB)B^{-1}$ is a product of invertible matrices, so it's invertible. Commented Apr 6, 2016 at 9:00
• @egreg you are absolutely right. The only reason I had added that was to answer OP's original question. I thought in case he wanted to show that $A$ is a product of elementary matrices. Commented Apr 7, 2016 at 5:21