Cramer's Rule for Systems of Linear Equations

Cramer's Rule

We will now look at a method to find the solutions to a system of linear equations which combine our results from square matrices and determinants.

 Theorem 1 (Cramer's Rule): Suppose that $Ax = b$ is a system of linear equations where $A$ is an $n \times n$ sized matrix, $x = \begin{bmatrix}x_1\\ x_2\\ \vdots\\ x_n\end{bmatrix}$, and $b = \begin{bmatrix}b_1\\ b_2\\ \vdots\\ b_n\end{bmatrix}$. Let $A_j$ denote the matrix that is obtained by taking the $j^{th}$ column of $A$ and replacing it with the column matrix $b$. If $\det (A) ≠ 0$, then this system has a unique solution given by $x_1 = \frac{\det (A_1)}{\det (A)}$, $x_2 = \frac{\det (A_2)}{\det (A)}$, …, $x_n = \frac{\det (A_n)}{\det (A)}$.
• Proof: We know that $A$ is invertible since $\det (A) ≠ 0$. That said, there exists a unique solution $x = A^{-1}b$ that satisfies this system. We know that $A^{-1} = \frac{1}{\det(A)} \mathrm{adj}(A)$. Making this substitution we get that:
(1)
\begin{align} \quad x = \frac{1}{\det(A)} \mathrm{adj}(A)b = \frac{1}{\det (A)} = \begin{bmatrix} C_{11} & C_{12} & \cdots & C_{n1}\\ C_{21} & C_{22} & & C_{n2}\\ \vdots & \vdots & & \vdots\\ C_{1n} & C_{2n} & \cdots & C_{nn} \end{bmatrix} \begin{bmatrix} b_1\\ b_2\\ \vdots\\ b_n \end{bmatrix} = \begin{bmatrix} b_1C_{11} & b_2C_{12} & \cdots & b_nC_{n1}\\ b_1C_{21} & b_2C_{22} & & b_nC_{n2}\\ \vdots & \vdots & & \vdots\\ b_1C_{1n} & b_2C_{2n} & \cdots & b_nC_{nn} \end{bmatrix} \end{align}
• Now for any row $j$, it follows that:
(2)
\begin{align} x_j = \frac{b_1C_{1j} + b_2C_{2j} + ... + b_nC_{nj}}{\det (A)} \end{align}
• Now look at the matrix $A_j$ that we defined earlier:
(3)
\begin{align} A_j = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1j-1} & b_1 & a_{1j+1} & \cdots & a_{1n}\\ a_{21} & a_{22} & \cdots & a_{2j-1} & b_2 & b_{2j+1} & \cdots & a_2n\\ \vdots & \vdots & & \vdots & \vdots & \vdots & & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nj-1} & b_n & a_{nj+1} & \cdots & a_{nn} \end{bmatrix} \end{align}
• The matrix $A_j$ only differs from $A$ by a single column (column $j$). Hence the cofactors of $b_1, b_2, ..., b_n$ in $A_j$ are the same as the cofactors $a_{1j}, a_{2j}, ..., a_{nj}$ in $A$, and thus $\det (A_j) = b_1C_{1j} + b_2C_{2j} + ... + b_nC_{nj}$. Substituting this back into the formula $x_j = \frac{b_1C_{1j} + b_2C_{2j} + ... + b_nC_{nj}}{\det (A)}$, we get that:
(4)
\begin{align} x_j = \frac{\det (A_j)}{\det(A)} \end{align}

$\blacksquare$