As a general rule, given the equations \(A_{1}\)x + \(B_{1}\)y = \(C_{1}\) and \(A_{2}\)x + \(B_{2}\)y = \(C_{2}\), then :
D = \(\begin{pmatrix}A_{1} & B_{1}\\A_{2} & B_{2}\end{pmatrix}\) = A\(_{1}\)× B\(_{2}\) – A\(_{2}\)× B\(_{1}\)
D\(_{1}\) = \(\begin{pmatrix}C_{1} & B_{1}\\C_{2} & B_{2}\end{pmatrix}\) = C\(_{1}\)× B\(_{2}\) – B\(_{1}\)× C\(_{2}\)
D\(_{2}\) = \(\begin{pmatrix}A_{1} & C_{1}\\A_{2} & C_{2}\end{pmatrix}\) = A\(_{1}\)× C\(_{2}\) – A\(_{2}\)× C\(_{1}\)
x = \(\dfrac{D_{1}}{D}\) where D ≠ 0 and y = \(\dfrac{D_{2}}{D}\) where D ≠ 0
Example
Given the equations 3x + 2y = 12 and 5x + 2y = 16, then :
D = \(\begin{pmatrix}3 & 2\\5 & 2\end{pmatrix}\) = 3 × 2 – 5 × 2 = –4
D\(_{1}\) = \(\begin{pmatrix}12 & 2\\16 & 2\end{pmatrix}\) = 12 × 2 – 2 × 16 = –8
D\(_{2}\) = \(\begin{pmatrix}3 & 12\\5 & 16\end{pmatrix}\) = 3 × 16 – 5 × 12 = –12
x = \(\dfrac{–8}{–4}\) = 2 and y = \(\dfrac{–12}{–4}\) = 3
Historical note*
Gabriel Cramer (1704-1752) was a Swiss mathematician who, after attempting to solve a system of five equations in five unknowns using the general elimination method, wrote in his work Introduction à l’analyse des lignes courbes algébriques (Introduction to the Analysis of Algebraic Curves) : “I believe I may have found a convenient and general rule for any given number of equations and unknowns that do not have a degree higher than one … ” [Translation] Although Cramer came to be known mainly for this rule, credit rightly belongs to Colin Maclaurin (1698-1746), a Scottish mathematician who described the rule in his Treatise of Algebra, which was published in 1748, two years after his death.
*Source: Jean-Paul Collette, Histoire des mathématiques, Volume 2, pp. 101-104.