MathorynMathematical Formula Database

Linear Algebra

Cramer's Rule

Cramer's rule solves a square linear system Ax=bA\mathbf x=\mathbf b with det⁡(A)≠0\det(A)\neq0: replace column ii of AA by b\mathbf b to get AiA_i. It is practical for small systems.

xi=det⁡(Ai)det⁡(A)x_i=\frac{\det(A_i)}{\det(A)}
LaTeXx_i=\frac{\det(A_i)}{\det(A)}

Variables

AA
coefficient matrix
AiA_i
A with column i replaced by the constants
xix_i
i-th unknown

Example

Solve x+2y=5, 3x+4y=11x+2y=5,\ 3x+4y=11.

  1. det⁡A=4−6=−2\det A=4-6=-2.
  2. det⁡Ax=5⋅4−2⋅11=−2\det A_x=5\cdot4-2\cdot11=-2, det⁡Ay=1⋅11−5⋅3=−4\det A_y=1\cdot11-5\cdot3=-4.

Answer: x=1, y=2x=1,\ y=2.

Related formulas