How does Cramer's rule work?

It's actually simple; I explain it here in two variables, but the principle is the same.

Say you have an equation $$\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}p\\q \end{pmatrix}$$

Now you can see that the following holds

$$\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}x&0\\y&1\end{pmatrix}=\begin{pmatrix}p&b\\q &d\end{pmatrix}$$

Finally just take the determinant of this last equation; $\det$ is multiplicative so you get $$\Delta x=\Delta_1$$


Cramer's rule is very easy to discover because if you solve the linear system of equations \begin{align*} a_{11} x_1 + a_{12} x_2 + a_{13} x_3 &= b_1 \\ a_{21} x_1 + a_{22} x_2 + a_{23} x_3 &= b_2 \\ a_{31} x_1 + a_{32} x_2 + a_{33} x_3 &= b_3 \\ \end{align*} by hand, just using a standard high school approach of eliminating variables, then out pops Cramer's rule! In my opinion, this is the most likely way that a mathematician would discover the determinant in the first place, and Cramer's rule is discovered simultaneously.

I remember thinking that it must be quite difficult to prove Cramer's rule for an $n \times n$ matrix, but it turns out to be surprisingly easy (once you take the right approach). We'll prove it below.

The most useful way of looking at the determinant, in my opinion, is this: the function $M \mapsto \det M$ is an alternating multilinear function of the columns of $M$ which satisfies $\det(I) = 1$. This characterization of the determinant gives us a quick, simple proof of Cramer's rule.

For simplicity, I'll assume $A$ is a $3 \times 3$ matrix with columns $a_1, a_2, a_3$. Suppose that $$b = Ax = x_1 a_1 + x_2 a_2 + x_3 a_3.$$ Then \begin{align*} \begin{vmatrix} b & a_2 & a_3 \end{vmatrix} &= \begin{vmatrix} x_1 a_1 + x_2 a_2 + x_3 a_3 & a_2 & a_3 \end{vmatrix} \\ &= x_1 \begin{vmatrix} a_1 & a_2 & a_3 \end{vmatrix} + x_2 \begin{vmatrix} a_2 & a_2 & a_3 \end{vmatrix} + x_3 \begin{vmatrix} a_3 & a_2 & a_3 \end{vmatrix} \\ &= x_1 \det A. \end{align*} If $\det A \neq 0$, it follows that $$ x_1 = \frac{\begin{vmatrix} b & a_2 & a_3 \end{vmatrix}}{\det A}. $$

I learned this proof in section 4.4, problem 16 ("Quick proof of Cramer's rule") in Gilbert Strang's book Linear Algebra and its Applications.


Here is a very simple solution that only uses some properties of determinants. Consider the following system:

$$ \left\{ \begin{array}{c} a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{array} \right. $$ Assume $\Delta\neq0$, then, $$\require{action}\begin{align} \Delta_1& \mathtip{=\left| \matrix{d_1 & b_1 & c_1 \\ d_2 & b_2 & c_2 \\ d_3 & b_3 & c_3}\right|}{\text{by definition of }\Delta_1} \\& \\ &\mathtip{=\left| \matrix{(a_1x+b_1y+c_1z) & b_1 & c_1 \\ (a_2x+b_2y+c_2z) & b_2 & c_2 \\ (a_3x+b_3y+c_3z) & b_3 & c_3}\right|}{\text{by the system of equations}} \\& \\ &\mathtip{=\left| \matrix{(a_1x+b_1y+c_1z)-(b_1y+c_1z) & b_1 & c_1 \\ (a_2x+b_2y+c_2z)-(b_2y+c_2z) & b_2 & c_2 \\ (a_3x+b_3y+c_3z)-(b_3y+c_3z) & b_3 & c_3}\right|}{\text{If a multiple of one column is added to another column, the value of the determinant is not changed.}} \\ & \\ &\mathtip{=\left| \matrix{a_1x & b_1 & c_1 \\ a_2x & b_2 & c_2 \\ a_3x & b_3 & c_3}\right|}{\text{Simplifying}} \\& \\ &\mathtip{= x\left| \matrix{a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3}\right|}{\text{If each entry in a given row is multiplied by $k$, then the value of the determinant is multiplied by $k$.}} \\& \\ &\mathtip{= x\Delta}{\text{by definition of }\Delta} \end{align}$$ Thus $x=\dfrac{\Delta_1}{\Delta}$. The proof is due to D. E. Whitford and M. S. Klamkin. (“On an Elementary Derivation of Cramer's Rule”, American Mathematical Monthly, vol. 60 (1953), pp.186–7).