logo

Proof of Cramer's Rule 📂Matrix Algebra

Proof of Cramer's Rule

Overview

Cramer’s Rule is not efficient for solving systems of equations, but if AjA_{j} is an invertible matrix or AA itself is given under conditions that make it convenient to calculate determinants, it can be sufficiently useful to directly find the necessary answers.

Theorem

Let’s assume the system of equations Ax=bA \mathbf{x} = \mathbf{b} consists of an invertible matrix A=[a11a12a1na21a22a2nan1an2ann] A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{bmatrix} and two vectors x=[x1x2xn],b=[b1b2bn] \mathbf{x} = \begin{bmatrix} x_{1} \\ x_{2} \\ \vdots \\ x_{n} \end{bmatrix}, \mathbf{b} = \begin{bmatrix} b_{1} \\ b_{2} \\ \vdots \\ b_{n} \end{bmatrix} . Then, if we replace the jj-th column of AA with b\mathbf{b}, the matrix is called AjA_{j}, xj=detAjdetA x_{j} = {{ \det A_{j} } \over { \det A }}

Proof

Let’s call the cofactor of AA of i,ji,j as CijC_{ij}.

For the selected jjth column, detA=j=1naijCij\displaystyle \det A = \sum_{j=1}^{n} a_{ij} C_{ij}

Since the jjth column of AA is a1j,a2j,,anja_{1j} , a_{2j} , \cdots , a_{nj}, based on the Laplace expansion,

detA=a1jC1j+a2jC2j++anjCnj \det A = a_{1j} C_{1j} + a_{2j} C_{2j} + \cdots + a_{nj} C_{nj}

Meanwhile, the kjk \ne j column of AA is a1k,a2k,,anka_{1k} , a_{2k} , \cdots , a_{nk}, and a1kC1j+a2kC2j++ankCnja_{1k} C_{1j} + a_{2k} C_{2j} + \cdots + a_{nk} C_{nj} is equal to the determinant of the matrix with at least two identical columns of a1k,a2k,,anka_{1k} , a_{2k} , \cdots , a_{nk},

a1kC1j+a2kC2j++ankCnj=0 a_{1k} C_{1j} + a_{2k} C_{2j} + \cdots + a_{nk} C_{nj} = 0

Breaking down the system of equations Ax=bA \mathbf{x} = \mathbf{b},

a11x1+a12x2++a1jxj++a1nxn=b1a21x1+a22x2++a2jxj++a2nxn=b2an1x1+an2x2++anjxj++annxn=bn \begin{align*} a_{11} x_{1} + a_{12} x_{2} + \cdots + a_{1j} x_{j} + \cdots + a_{1n} x_{n} =& b_{1} \\ a_{21} x_{1} + a_{22} x_{2} + \cdots + a_{2j} x_{j} + \cdots + a_{2n} x_{n} =& b_{2} \\ &\vdots \\ a_{n1} x_{1} + a_{n2} x_{2} + \cdots + a_{nj} x_{j} + \cdots + a_{nn} x_{n} =& b_{n} \end{align*}

By multiplying both sides of each iith equation by CijC_{ij},

a11x1C1j+a12x2C1j++a1jxjC1j++a1nxnC1j=b1C1ja21x1C2j+a22x2C2j++a2jxjC2j++a2nxnC2j=b2C2jan1x1Cnj+an2x2Cnj++anjxjCnj++annxnCnj=bnCnj \begin{align*} a_{11} x_{1} C_{1j} + a_{12} x_{2} C_{1j} + \cdots + a_{1j} x_{j} C_{1j} + \cdots + a_{1n} x_{n} C_{1j} =& b_{1} C_{1j} \\ a_{21} x_{1} C_{2j} + a_{22} x_{2} C_{2j} + \cdots + a_{2j} x_{j} C_{2j}+ \cdots + a_{2n} x_{n} C_{2j} &= b_{2} C_{2j} \\ &\vdots \\ a_{n1} x_{1} C_{nj} + a_{n2} x_{2} C_{nj} + \cdots + a_{nj} x_{j} C_{nj} + \cdots + a_{nn} x_{n} C_{nj} &= b_{n} C_{nj} \end{align*}

Summing all the left sides, except for the middle’s i=1naijxjCij=detA\displaystyle \sum_{i=1}^{n} a_{ij} x_{j} C_{ij} = \det A, vanishes into i=1naikxjCik=0\displaystyle \sum_{i=1}^{n} a_{ik} x_{j} C_{ik} = 0,

i=1naijxjCij=b1C1j+b2C2j++bnCnj \sum_{i=1}^{n} a_{ij} x_{j} C_{ij} = b_{1} C_{1j} + b_{2} C_{2j} + \cdots + b_{n} C_{nj} is obtained. But since AjA_{j} is the matrix with the jjth column replaced by b1,b2,,bnb_{1} , b_{2} , \cdots , b_{n},

detAj=b1C1j+b2C2j++bnCnj \det A_{j} = b_{1} C_{1j} + b_{2} C_{2j} + \cdots + b_{n} C_{nj}

Taking xjx_{j} out as i=1n\displaystyle \sum_{i=1}^{n},

xji=1naijCij=detAj x_{j} \sum_{i=1}^{n} a_{ij} C_{ij} = \det A_{j}

Therefore, summarizing it as xjdetA=detAj\displaystyle x_{j} \det A = \det A_{j}, and since AA is assumed to be an invertible matrix, detA0\det A \ne 0 is true. Therefore,

xj=detAjdetA x_{j} = {{ \det A_{j} } \over {\det A}}