Solving a system of linear equations using Cramer's rule
Cramer's rule may only be applied for a system of linear equations with as many equations as unknowns (the coefficient matrix of the system must be square) and with non-zero determinant of the coefficient matrix.
Consider a system of n linear equations for n unknowns x
1, x
2, ..., x
n:
a
11x
1 + a
12x
2 + ...+ a
1nx
n = b
1
a
21x
1 + a
22x
2 + ...+ a
2nx
n = b
2
... ... ... ... ...
a
n1x
1 + a
n2x
2 + ...+ a
nnx
n = b
n
The determinant of the coefficient matrix
![determinant of the coefficient matrix](/images/determinant-of-the-matrix-of-coefficients.png)
Let
![determinant](/images/delta-j.png)
be the determinant of the matrix formed by replacing the j column with the column of the constant terms
![determinant of the matrix formed by replacing the j column with the column of the constant terms](/images/determinant-j.png)
If
![determinant nonzero](/images/determinant-not-zero.png)
, the system has a unique solution
![Cramer's rule](/images/cramers-formula.png)
Since the computation of large determinants is cumbersome, Cramer's rule is generally used for systems of two and three equations.