Rule

Cramer's Rule

Consider a system of equations where the number of equations equals the number of variables. Let A be the coefficient matrix, x the variable matrix, and b the constant matrix.
System of Equations Coefficient Matrix Variable Matrix Constants Matrix
ax+by = e cx+dy = f A = a & b c & d x = x y b = e f

If the determinant of A is non-zero, then the system has a unique solution x whose components are given by the equations below.


x = |A_1|/|A| = | c e & b f & d |/|A| y = |A_2|/|A| = | c a & e c & f |/|A|

In the equations above, A_1 and A_2 are the coefficient matrices where, for A_1, the first column is replaced by the constant matrix b, and for A_2, the second column is replaced by b. Cramer's Rule also applies for systems with more than two equations.

System of Equations Matrix Equation
a_1x+b_1y+c_1z = d_1 a_2x+b_2y+c_2z = d_2 a_3x+b_3y+c_3z = d_3 a_1 & b_1 & c_1 a_2 & b_2 & c_2 a_3 & b_3 & c_3 * x y z = d_1 d_2 d_3
Solutions
x = | c d_1 & b_1 & c_1 d_2 & b_2 & c_2 d_3 & b_3 & c_3 |/|A|; y = | c a_1 & d_1 & c_1 a_2 & d_2 & c_2 a_3 & d_3 & c_3 |/|A|; z = | c a_1 & b_1 & d_1 a_2 & b_2 & d_2 a_3 & b_3 & d_3 |/|A|
The usefulness of Cramer's Rule is that the value of a variable can be found without solving the entire system. A proof of Cramer's Rule for a system of two equations is demonstrated below.

Proof

Consider a system of two equations. This system can be solved using the Elimination Method. ax+by = e & (I) cx+dy = f & (II) Start by eliminating the y-variable. To do this, multiply Equation (I) by d and Equation (II) by b. Then, subtract the equations.
ax+by = e & (I) cx+dy = f & (II)
Solve by elimination
adx+bdy = de & (I) cx+dy = f & (II)
adx+bdy = de & (I) bcx+bdy = bf & (II)
adx-bcx = de-bf bcx+bdy = bf
x(ad-bc) = de-bf bcx+bdy = bf
Notice that the factor (ad-bc) is equal to the determinant of matrix A and that the right-hand side expression is equal to the determinant of matrix A_1. |A| &= | c a & b c & d | = ad- bc |A_1| &= | c e & b f & d | = de-bf Using these equations, Equation (I) can be rewritten in terms of determinants.
x(ad-bc) = de-bf bcx+bdy = bf
x* |A| = |A_1| bcx+bdy = bf
Finally, since |A|≠ 0, both sides of Equation (I) can be divided by |A|. This manipulation creates the first equation of Cramer's Rule.


x = |A_1|/|A| = | c e & b f & d |/|A|

A similar process to eliminate the x-variable gives the second equation.


y = |A_2|/|A| = | c a & e c & f |/|A|

In conclusion, when |A|≠ 0, the system has a unique solution x whose components are the ones above.

Exercises