Why do some square matrices not have an inverse?

My answer to a question on Quora: Why do some square matrices not have an inverse? I need a simple answer.

A good question, and it can be explained by a simple observations: there are non-zero square matrices \(A\) and \(B\) such that the product is the zero matrix: \(AB = 0\). Let us look at the example given by Alexander Farrugia:

\(A = \left(\begin{array}{rr} 1&2\\ 1&2\end{array}\right) \)

it is not invertible because if I take

\(B = \left(\begin{array}{rr} -2&-2\\ 1&1\end{array}\right) \)

then their product is the zero matrix:

\(AB = \left(\begin{array}{rr} 1&2\\ 1&2\end{array}\right) \left(\begin{array}{rr} -2&-2\\ 1&1\end{array}\right)=\left(\begin{array}{rr} 0&0\\ 0&0\end{array}\right). \)

Can after that \(A\) be inversible? No, it cannot, because multiplying the last equality by \(A^{-1}\), we get \(A^{-1}AB = A^{-1}\cdot 0\), which simplifies as \(B=0\).

I will give this as a simple exercise to my (first-year) students:

A square matrix \(A\) is either invertible, or there exists a non-zero square matrix \(B\) such that \(AB = 0\).