Cramer’s rule is an explicit formula for the solution of a system of linear equations with as many equations as unknowns, valid whenever the system has a unique solution. 1

Rule

Consider a system of equation and unknowns, represented as the following

where the matrix has non-zero determinant.

Then Cramer’s rule state that the solution is

where is replaced by using the th column of by .

Practicality for Large Systems

Cramer’s rule, implemented in a naive way, is computationally inefficient for systems of more than two or three equations. 1 The standard implementation of Cramer’s rule requires calculating determinants for a system of n equations, each of which has a complexity of using basic methods. Cramer’s rule can also be numerically unstable even for 2×2 systems. 1

Though it is possible to reduce its complexity to the same as Gaussian elimination 1, it is still not preferred for large systems in practice.

Footnotes

  1. Cramer’s rule - Wikipedia 2 3 4