Cramer's rule

Cramer's rule is a way of solving a system of linear equations using determinants.

Suppose we are trying to solve a system of linear equations such that


or Ax = b in matrix form, where

Cramer's Rule says that

where Ai is a new matrix formed by replacing the ith column of A with the b vector.


In this case,

By Cramer's rule,

x1 = = = -5
x2 = = =   3
x3 = = = -8

We can then check that


We reinterpret the matrix-vector equation Ax = b as

In other words, b = x1v1 + ... + xnvn where each vi is the ith column of matrix A (see Matrix Multiplication). If we plug this expression for b into Ai, the matrix made by replacing the ith column of A with b, we get:

From the, properties of determinants, we can perform column operations of the type (i) + k(j) → (i) without changing the determinant. Therefore we can use the columns containing v1,..., vi - 1, vi + 1,... vn to subtract out every term in x1v1 + ... + xnvn except for xivi. In other words,

From another property of determinants, a column of type k(i) → (i) has the same effect of multiplying the determinant by k. Therefore we can pull the scalar fact xi from the iith column which contains x1vi. In other words,


combining (1.) and (2.) gives us det(Ai) = xidet(A). Dividing by det(A) gives us , which is the original statement of Cramer's rule.

Limitations of Cramer's rule

See also matrix notation.