Determinant and matrix multiplication

Let $A$ and $B$ be $2 \times 2$ matrices, and let $a > 0$ be an area of some 2D shape. If $B$ is applied to each point of the shape, the area multiplies by $\det(B)$ (TODO), so we get $a\det(B)$. If we also apply $A$, the area then becomes $a\det(B)\det(A)$. On the other hand, first applying $B$ and then $A$ is what the matrix $AB$ does, so $$ a\det(B)\det(A)=a\det(AB), $$ and dividing by $a$ gives $$ \det(AB)=\det(A)\det(B). $$ On the rest of this page, we show that the same works for square matrices of any size.

If $\det(B) \ne 0$

Let $f$ be a function that takes in a square matrix and outputs a number, defined by $$ f(A) = \frac{\det(AB)}{\det(B)}. $$ For this to work, we have to assume that $\det(B) \ne 0$. Our goal is to show that this function computes $\det(A)$. Let's check whether it satisfies the conditions in the definition of determinant:

Because the function $f$ satisfies the conditions in the definition of determinant, it must be the determinant, and therefore $$ \det(A) = f(A) = \frac{\det(AB)}{\det(B)} $$ for all square matrices $A$ of the same size as $B$.

If $A$ and $B$ are square matrices of the same size and $\det(B) \ne 0$, then $\det(AB)=\det(A)\det(B)$.

If $\det(B) = 0$

Let's now see what happens when the above calculations don't work due to division by zero. Because $\det(B)=0$, the columns of $B$ are linearly dependent, so $B$ does not always produce different outputs for different inputs, i.e. there are different vectors $\vec v \ne \vec w$ so that $$ B\vec v = B\vec w. $$ Multiplying from left by $A$ gives $$ AB\vec v = AB\vec w, $$ so $AB$ is not invertible, and $$ \det(AB) = 0. $$ This means that $\det(AB)=\det(A)\det(B)$ works even if $\det(B)=0$; in that case, it says that $0=0$.

If $A$ and $B$ are square matrices of the same size, then $\det(AB)=\det(A)\det(B)$.