What is the Cramer’s Rule?
The Cramer’s Rule is a method to solve a system of equations that is simple and straight-forward. Developed by Gabriel Cramer in the 18th century, it is a method that uses only determinants to be able to find the solution to a system of linear equations and is valid of any n number system of linear equations as long as they have a unique solution.
How to use this concept?
To be able to use the Cramer’s Rule, there are several steps to follow. To start with, there is a condition where Cramer’s Rule breaks down, so the first step is to find the determinant of your coefficient matrix (from your system of equations) and check if the determinant is equal to 0. (You can use any method to find the determinant, a simple formula for 2x2 or even Cofactor Expansion).
system of equations: {a1x + b1y = c1 a2x + b2y = c2 → D = |[ a1 b1 a2 b2 ]|
if D=0, do not use Cramer's Rule
if D≠0, use Cramer's Rule
If the determinant is equal to 0, then Cramer’s Rule does not work and you will need to try another method. This is because if it is 0, then there are either no solutions or infinitely many solutions. If it is non-zero, then you may proceed to the next step as it would imply that there is a unique solution.
To find the solution to an arbitrary system of two linear equations, we can simply say that x and y as below. D is the determinant of the coefficient matrix, Dx is the determinant of the numerator in solution for x, and Dy is the determinant of the numerator in solution for y.
{a1x + b1y = c1 a2x + b2y = c2
Solutions via Cramer’s Rule (for 2 by 2 matrix):
where:
D = |[ a1 b1 a2 b2]|
Dx = |[c1 b1 c2 b2 ]|
Dy= |[ a1 c1 a2 c2 ]|
The above is only for a system of two linear equations, however, the same can be extrapolated to a system of three linear equations like the following:
{a1x + b1y + c1z = d1 a2x + b2y + c2z = d2a3x + b3y + c3z = d3
D= |[ a1 b1 c1 a2 b2 c2 a3 b3 c3 ]|
Dx = |[ d1 b1 c1 d2 b2 c2 d3 b3 c3]|
Dy= |[ a1 d1 c1 a2 d2 c2 a3 d3 c3 ]|