Cramer's Rule
Cramer's Rule gives an explicit formula for the solution of a system of linear equations in terms of determinants. While computationally expensive for large systems, it is theoretically elegant and useful for symbolic and small-scale computations.
Statement
Let be invertible and . The unique solution of the system is given by
for , where is the matrix obtained from by replacing the -th column with .
Since is invertible, . By the adjugate formula, , so
Now is the cofactor expansion of along column (since the -th column of is , and the cofactors for column are computed from the other columns, which are the same as in ).
Examples
Solve .
.
Solution: . Verify: and .
Solve: , , .
.
Similarly one computes and .
Solve , with :
Cramer's Rule gives a closed-form solution that makes dependence on parameters transparent.
If , Cramer's Rule does not apply. The system either has no solution or infinitely many solutions, depending on whether .
: . Infinitely many solutions: , .
: and . No solution.
A key advantage of Cramer's Rule: to find just in a system, compute only two determinants ( and ), rather than solving the full system. This can be more efficient than row reduction if only one variable is needed.
Cramer's Rule is rarely used for numerical computation (too expensive for large ), but it is invaluable in theory:
- It shows the solution of depends rationally on the entries of and .
- It proves that solutions vary smoothly (or algebraically) with parameters.
- It is used in algebraic geometry to study families of linear systems.
Setting in gives the -th column of :
This recovers the adjugate formula .
Solve and over :
.
. Rationalize by multiplying by :
.
For in : where are the columns of .
is the signed area of the parallelogram spanned by and , and is the signed area spanned by and . The ratio gives the "proportion" of needed to reach from the direction.
Cramer's Rule is a consequence of the multilinear and alternating nature of the determinant. Replacing column by and using multilinearity:
since vanishes when two columns are equal. This is the deepest way to understand Cramer's Rule.
Cramer's Rule requires computing determinants of matrices. Using cofactor expansion, this is . Even using LU decomposition for each determinant, it is , compared to for Gaussian elimination on the augmented matrix.
Over a commutative ring (not necessarily a field), Cramer's Rule still holds in the form: . If is a unit in , we can divide. If not, the formula still gives useful information (e.g., annihilates the cokernel of the map defined by ).
Cramer's Rule converts the problem of solving a linear system into the problem of computing determinants. While impractical for large numerical systems, it provides:
- An explicit, closed-form formula for solutions
- A proof that solutions depend rationally on the coefficients
- Geometric insight via the volume interpretation of determinants
- A theoretical tool in algebra and algebraic geometry