Solution (source code)

= Solution

If $A_{ji}$ denotes the matrix obtained by deleting row $j$ and column $i$, then the <adjugate matrix> is
$$
\operatorname{adj}(A)_{ij}
=(-1)^{i+j}\det A_{ji}.
$$
For nonsingular $A$,
$$
\operatorname{adj}(A)=\det(A)A^{-1}.
$$
Therefore, when $A$ and $B$ are nonsingular,
$$
\begin{aligned}
\operatorname{adj}(AB)
&=\det(A)\det(B)(AB)^{-1}\\
&=\det(B)B^{-1}\det(A)A^{-1}\\
&=\boxed{\operatorname{adj}(B)\operatorname{adj}(A)}.
\end{aligned}
$$