Lably
Skip to content

Cramer's rule

Formula for systems of linear equations

  • 10 min read
  • 10 chapters

Learn it on Lably

General case

Consider a system of n linear equations for n unknowns, represented in matrix multiplication form as follows:

Ax=b

where the n × n matrix A has a nonzero determinant, and the vector x=(x1,…,xn)T is the column vector of the variables. Then the theorem states that in this case the system has a unique solution, whose individual values for the unknowns are given by:

xi=det(Ai)det(A)i=1,…,n

where Ai is the matrix formed by replacing the i-th column of A by the column vector b.

A more general version of Cramer's rule considers the matrix equation

AX=B

where the n × n matrix A has a nonzero determinant, and X, B are n × m matrices. Given sequences 1≤i1<i2<⋯<ik≤n and 1≤j1<j2<⋯<jk≤m, let XI,J be the k × k submatrix of X with rows in I:=(i1,…,ik) and columns in J:=(j1,…,jk). Let AB(I,J) be the n × n matrix formed by replacing the is column of A by the js column of B, for all s=1,…,k. Then

detXI,J=det(AB(I,J))det(A).

In the case k=1, this reduces to the normal Cramer's rule.

The rule holds for systems of equations with coefficients and unknowns in any field, not just in the real numbers.

Sign in to keep reading

9 more chapters are free with a Lably account.

More in Algebra