This is a method for finding a Matrix Inverse and for solving a System of Linear Equations.
The formula is $A^{-1} = \cfrac{1}{| A |} C^T$
Let $A$ be an $2 \times 2$ matrix
a_{11} & a_{12} \\ a_{21} & a_{22} \\ \end{bmatrix}$
a_{11} & a_{12} & 1 & 0 \\ a_{21} & a_{22} & 0 & 1 \\ \end{array} \right] \sim $ row 2: $\text{row $2$} - \cfrac{a_{21}}{a_{11}} \text{row $1$}$
a_{11} & a_{12} & 1 & 0 \\ 0 & a_{22} - a_{12} \cfrac{a_{21}}{a_{11}} & - \cfrac{a_{21}}{a_{11}} & 1 \\ \end{array} \right] \sim $ now divide first row by $a_{11}$ and multiply second by $a_{11}$
1 & \cfrac{a_{12}}{a_{11}} & \cfrac{1}{a_{11}} & 0 \\ 0 & a_{11} a_{22} - a_{12} a_{21} & - a_{21} & a_{11} \\ \end{array} \right] =$ now note that $a_{11} a_{22} - a_{12} a_{21} = | A |$, so
1 & \cfrac{a_{12}}{a_{11}} & \cfrac{1}{a_{11}} & 0 \\ 0 & |A| & - a_{21} & a_{11} \\ \end{array} \right] \sim $ let's divide row 2 by $|A|$
1 & \cfrac{a_{12}}{a_{11}} & \cfrac{1}{a_{11}} & 0 \\ 0 & 1 & - \cfrac{a_{21}}{|A|} & \cfrac{a_{11}}{|A|} \\ \end{array} \right] \sim $ now for row 1: $\text{row $1$} - \cfrac{a_{12}}{a_{11}} \text{row $2$}$
1 & 0 & \cfrac{a_{22}}{|A|} & - \cfrac{a_{12}}{|A|} \\ 0 & 1 & - \cfrac{a_{21}}{|A|} & \cfrac{a_{11}}{|A|} \\ \end{array} \right]$
a_{22} & - a_{12} \\ - a_{21} & a_{11} \\ \end{bmatrix}$
C_{11} & C_{12} \\ C_{21} & C_{22} \\ \end{bmatrix} = \begin{bmatrix} a_{22} & -a_{21} \\ -a_{12} & a_{11} \\ \end{bmatrix} = \begin{bmatrix} a_{22} & - a_{12} \\ - a_{21} & a_{11} \\ \end{bmatrix}^T$
Does it always work? Let's check
a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \\
\end{bmatrix}}_{A} \underbrace{\begin{bmatrix}
C_{11} & C_{21} & \cdots & C_{n1} \\ C_{12} & C_{22} & \cdots & C_{n2} \\ \vdots & \vdots & \ddots & \vdots \\ C_{1n} & C_{2n} & \cdots & C_{nn} \\
\end{bmatrix}}_{C^T} = \underbrace{\begin{bmatrix}
|A| & 0 & \cdots & 0 \\ 0 & |A| & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & |A| \\
\end{bmatrix}}_{|A| \, I}$
a_{11} & a_{12} \\ a_{21} & a_{22} \\ \end{bmatrix} \begin{bmatrix} C_{11} & C_{21} \\ C_{12} & C_{22} \\ \end{bmatrix} = \begin{bmatrix} \boxed{a_{11} C_{11}} + a_{12} C_{12} & a_{11} C_{21} + a_{12} C_{22} \\ a_{21} C_{11} + a_{22} C_{12} & a_{21} C_{21} + \boxed{a_{22} C_{22}} \\ \end{bmatrix}$
$\text{row $i$} \times \text{cofactors of $i$} = |A|$
$\text{row $i$} \times \text{cofactors of $j$} = 0$ for $i \ne j$
so we showed that
Now since we can find the inverse of $A^{-1}$, we can solve the system $A \mathbf x = \mathbf b$
b_{1} & a_{12} & \cdots & a_{1n} \\ b_{2} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ b_{n} & a_{n2} & \cdots & a_{nn} \\
\end{vmatrix} / \begin{vmatrix}
a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \\
\end{vmatrix}$
This is known as the Cramer's Rule
This is known as not very practical method for computing the inverse or for solving the system