# How do we derive Cramer's method?

Feb 26, 2018

See the explanation below

#### Explanation:

Let us consider the set of equations $A x = b$ written out element by element :
${a}_{11} {x}_{1} + {a}_{12} {x}_{2} + \ldots + {a}_{1 n} {x}_{n} = {b}_{1}$
${a}_{21} {x}_{1} + {a}_{22} {x}_{2} + \ldots + {a}_{2 n} {x}_{n} = {b}_{2}$
...
${a}_{n 1} {x}_{1} + {a}_{n 2} {x}_{2} + \ldots + {a}_{n n} {x}_{n} = {b}_{n}$

If we want to find ${x}_{1}$, say, we can rewrite this in the form

$\left({a}_{11} {x}_{1} - {b}_{1}\right) + {a}_{12} {x}_{2} + \ldots + {a}_{1 n} {x}_{n} = 0$
$\left({a}_{21} {x}_{1} - {b}_{2}\right) + {a}_{22} {x}_{2} + \ldots + {a}_{2 n} {x}_{n} = 0$
...
$\left({a}_{n 1} {x}_{1} - {b}_{n}\right) + {a}_{n 2} {x}_{2} + \ldots + {a}_{n n} {x}_{n} = 0$

This can be written in the form $A p r i m e x p r i m e = 0$ where

$A p r i m e = \left(\begin{matrix}{a}_{11} {x}_{1} - {b}_{1} & {a}_{12} & \ldots & {a}_{1 n} \\ {a}_{21} {x}_{1} - {b}_{2} & {a}_{22} & \ldots & {a}_{2 n} \\ \ldots & \ldots . & \ldots . & \ldots \\ {a}_{n 1} {x}_{1} - {b}_{n} & {a}_{n 2} & \ldots & {a}_{n n}\end{matrix}\right) , q \quad x p r i m e = \left(\begin{matrix}1 \\ {x}_{2} \\ \ldots \\ {x}_{n}\end{matrix}\right)$

Now the set of equations $A p r i m e x p r i m e = 0$ has a non trivial solution (the first element of $x p r i m e$ is 1 - so clearly it is non-zero), and thus $\det A p r i m e = 0$ (otherwise $A p r i m e$ would have had an inverse, forcing $x p r i m e = {\left(A p r i m e\right)}^{-} 1 0$ to be the null vector.

So
$0 = | \left({a}_{11} {x}_{1} - {b}_{1} , {a}_{12} , \ldots , {a}_{1 n}\right) , \left({a}_{21} {x}_{1} - {b}_{2} , {a}_{22} , \ldots , {a}_{2 n}\right) , \left(\ldots , \ldots . , \ldots . , \ldots\right) , \left({a}_{n 1} {x}_{1} - {b}_{n} , {a}_{n 2} , \ldots , {a}_{n n}\right) |$
$= | \left({a}_{11} {x}_{1} , {a}_{12} , \ldots , {a}_{1 n}\right) , \left({a}_{21} {x}_{1} , {a}_{22} , \ldots , {a}_{2 n}\right) , \left(\ldots , \ldots . , \ldots . , \ldots\right) , \left({a}_{n 1} {x}_{1} , {a}_{n 2} , \ldots , {a}_{n n}\right) | - | \left({b}_{1} , {a}_{12} , \ldots , {a}_{1 n}\right) , \left({b}_{2} , {a}_{22} , \ldots , {a}_{2 n}\right) , \left(\ldots , \ldots . , \ldots . , \ldots\right) , \left({b}_{n} , {a}_{n 2} , \ldots , {a}_{n n}\right) |$
$= {x}_{1} | \left({a}_{11} , {a}_{12} , \ldots , {a}_{1 n}\right) , \left({a}_{21} , {a}_{22} , \ldots , {a}_{2 n}\right) , \left(\ldots , \ldots . , \ldots . , \ldots\right) , \left({a}_{n 1} , {a}_{n 2} , \ldots , {a}_{n n}\right) | - | \left({b}_{1} , {a}_{12} , \ldots , {a}_{1 n}\right) , \left({b}_{2} , {a}_{22} , \ldots , {a}_{2 n}\right) , \left(\ldots , \ldots . , \ldots . , \ldots\right) , \left({b}_{n} , {a}_{n 2} , \ldots , {a}_{n n}\right) |$

and so, if $\det A \ne 0$ we can write
${x}_{1} = | \left({b}_{1} , {a}_{12} , \ldots , {a}_{1 n}\right) , \left({b}_{2} , {a}_{22} , \ldots , {a}_{2 n}\right) , \left(\ldots , \ldots . , \ldots . , \ldots\right) , \left({b}_{n} , {a}_{n 2} , \ldots , {a}_{n n}\right) \frac{|}{|} \left({a}_{11} , {a}_{12} , \ldots , {a}_{1 n}\right) , \left({a}_{21} , {a}_{22} , \ldots , {a}_{2 n}\right) , \left(\ldots , \ldots . , \ldots . , \ldots\right) , \left({a}_{n 1} , {a}_{n 2} , \ldots , {a}_{n n}\right) |$

We can similarly derive the expression for all the unknown variables.

Note: in the derivation above we have used two elementary properties of determinants.