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$$.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}