TOPICS
Search

Cramer's Rule


Given a set of linear equations

 {a_1x+b_1y+c_1z=d_1; a_2x+b_2y+c_2z=d_2; a_3x+b_3y+c_3z=d_3,
(1)

consider the determinant

 D=|a_1 b_1 c_1; a_2 b_2 c_2; a_3 b_3 c_3|.
(2)

Now multiply D by x, and use the property of determinants that multiplication by a constant is equivalent to multiplication of each entry in a single column by that constant, so

 x|a_1 b_1 c_1; a_2 b_2 c_2; a_3 b_3 c_3|=|a_1x b_1 c_1; a_2x b_2 c_2; a_3x b_3 c_3|.
(3)

Another property of determinants enables us to add a constant times any column to any column and obtain the same determinant, so add y times column 2 and z times column 3 to column 1,

 xD=|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|=|d_1 b_1 c_1; d_2 b_2 c_2; d_3 b_3 c_3|.
(4)

If d=0, then (4) reduces to xD=0, so the system has nondegenerate solutions (i.e., solutions other than (0, 0, 0)) only if D=0 (in which case there is a family of solutions). If d!=0 and D=0, the system has no unique solution. If instead d!=0 and D!=0, then solutions are given by

 x=(|d_1 b_1 c_1; d_2 b_2 c_2; d_3 b_3 c_3|)/D,
(5)

and similarly for

y=(|a_1 d_1 c_1; a_2 d_2 c_2; a_3 d_3 c_3|)/D
(6)
z=(|a_1 b_1 d_1; a_2 b_2 d_2; a_3 b_3 d_3|)/D.
(7)

This procedure can be generalized to a set of n equations so, given a system of n linear equations

 [a_(11) a_(12) ... a_(1n); | | ... |; a_(n1) a_(n2) ... a_(nn)][x_1; |; x_n]=[d_1; |; d_n],
(8)

let

 D=|a_(11) a_(12) ... a_(1n); | | ... |; a_(n1) a_(n2) ... a_(nn)|.
(9)

If d=0, then nondegenerate solutions exist only if D=0. If d!=0 and D=0, the system has no unique solution. Otherwise, compute

 D_k=|a_(11) ... a_(1(k-1)) d_1 a_(1(k+1)) ... a_(1n); | ... | | | ... |; a_(n1) ... a_(n(k-1)) d_n a_(n(k+1)) ... a_(nn)|.
(10)

Then x_k=D_k/D for 1<=k<=n. In the three-dimensional case, the vector analog of Cramer's rule is

 (AxB)x(CxD)=(A·BxD)C-(A·BxC)D.
(11)

See also

Determinant, Linear Algebra, Matrix, System of Equations, Vector

Explore with Wolfram|Alpha

References

Cramer, G. "Intr. à l'analyse de lignes courbes algébriques." Geneva, 657-659, 1750.Muir, T. The Theory of Determinants in the Historical Order of Development, Vol. 1. New York: Dover, pp. 11-14, 1960.

Referenced on Wolfram|Alpha

Cramer's Rule

Cite this as:

Weisstein, Eric W. "Cramer's Rule." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/CramersRule.html

Subject classifications