Linear Algebra – Determinants – Other applications

Cramer's rule

Definition: If \(A\) is an \(n\times n\) matrix and \(\mathbf{b}\in\mathbb{R}^n\), then \(A_i(\mathbf{b})\) is the matrix that is obtained from \(A\) by replacing the \(i^{th}\) column by \(\mathbf{b}\).

Theorem: Let \(A\) be an invertible \(n\times n\) matrix. Then for each \(\mathbf{b}\in\mathbb{R}^n\) the unique solution \(\mathbf{x}=\begin{pmatrix}x_1\\x_2\\\vdots\\x_n\end{pmatrix}\) of \(A\mathbf{x}=\mathbf{b}\) is given by:

\[x_i=\frac{\det(A_i(\mathbf{b}))}{\det(A)},\quad i=1,2,\ldots,n.\]

Proof: Let \(A=\Bigg(\mathbf{a}_1 \ldots \mathbf{a}_n\Bigg)\) and \(I=\Bigg(\mathbf{e}_1 \ldots \mathbf{e}_n\Bigg)\), then we have using \(A\mathbf{x}=\mathbf{b}\):

\[A\,I_i(\mathbf{x})=A\Bigg(\mathbf{e}_1 \ldots \mathbf{x} \ldots \mathbf{e}_n\Bigg)=\Bigg(A\mathbf{e}_1 \ldots A\mathbf{x} \ldots A\mathbf{e}_n\Bigg) =\Bigg(\mathbf{a}_1 \ldots \mathbf{b} \ldots \mathbf{a}_n\Bigg)=A_i(\mathbf{b}).\]

Since \(\det(I_i(\mathbf{x}))=x_i\) this implies that \(\det(A)x_i=\det(A)\det(I_i(\mathbf{x}))=\det(A_i(\mathbf{b}))\) for \(i=1,2,\ldots,n\). Because \(A\) is invertible, we have \(\det(A)\neq0\), which proves the result.

Examples:

Consider \(A\mathbf{x}=\mathbf{b}\) with \(A=\begin{pmatrix}3&1\\4&2\end{pmatrix}\) and \(\mathbf{b}=\begin{pmatrix}5\\6\end{pmatrix}\). Note that \(\det(A)=\begin{vmatrix}3&1\\4&2\end{vmatrix}=6-4=2\neq0\). Then we have:

\[x_1=\frac{\det(A_1(\mathbf{b}))}{\det(A)}=\frac{\begin{vmatrix}5&1\\6&2\end{vmatrix}}{\begin{vmatrix}3&1\\4&2\end{vmatrix}}=\frac{10-6}{6-4}=2\quad\text{and}\quad x_2=\frac{\det(A_2(\mathbf{b}))}{\det(A)}=\frac{\begin{vmatrix}3&5\\4&6\end{vmatrix}}{\begin{vmatrix}3&1\\4&2\end{vmatrix}}=\frac{18-20}{6-4}=-1.\]

Consider \(A\mathbf{x}=\mathbf{b}\) with \(A=\begin{pmatrix}1&-2\\-3&4\end{pmatrix}\) and \(\mathbf{b}=\begin{pmatrix}-7\\17\end{pmatrix}\). Note that \(\det(A)=\begin{vmatrix}1&-2\\-3&4\end{vmatrix}=4-6=-2\neq0\). Then we have:

\[x_1=\frac{\det(A_1(\mathbf{b}))}{\det(A)}=\frac{\begin{vmatrix}-7&-2\\17&4\end{vmatrix}}{\begin{vmatrix}1&-2\\-3&4\end{vmatrix}}=\frac{-28+34}{4-6}=-3\quad\text{and}\quad x_2=\frac{\det(A_2(\mathbf{b}))}{\det(A)}=\frac{\begin{vmatrix}1&-7\\-3&17\end{vmatrix}}{\begin{vmatrix}1&-2\\-3&4\end{vmatrix}}=\frac{17-21}{4-6}=2.\]

A formula for the inverse of a matrix

Definition: Let \(A=(a_{ij})\) be an \(m\times n\) matrix, then the \(m\times n\) matrix \(A_{\text{cof}}=(C_{ij})\), whose entries are the cofactors of \(A\), is called the cofactor matrix of \(A\).

Theorem: Let \(A\) be an invertible matrix. Then we have: \(A^{-1}=\frac{1}{\det(A)}A_{\text{cof}}^T\) with \(A_{\text{cof}}^T\) the transpose of the cofactor matrix of \(A\).

Proof: If \(A\) is invertible, then the \(j^{th}\) column of \(A^{-1}\) is the vector \(\mathbf{x}\) for which \(A\mathbf{x}=\mathbf{e}_j\) with \(\mathbf{e}_j\) the \(j^{th}\) column of the identity matrix \(I\). Let \(A^{-1}=C=(c_{ij})\), then we have using Cramer's rule that:

\[c_{ij}=x_i=\frac{\det(A_i(\mathbf{e}_j))}{\det(A)}.\]

Since \(A_{ji}\) is the submatrix of \(A\), that is obtained from \(A\) by deleting the \(j^{th}\) row and the \(i^{th}\) column, it follows using the cofactor expansion across the \(i^{th}\) column of \(A_i(\mathbf{e}_j)\) that

\[\det(A_i(\mathbf{e}_j))=(-1)^{j+i}A_{ji}=C_{ji}.\]

This proves the formula.

In the special case of \(A=\begin{pmatrix}a&b\\c&d\end{pmatrix}\) we have that \(A_{\text{cof}}=\begin{pmatrix}d&-c\\-b&a\end{pmatrix}\). Hence: if \(\det(A)=ad-bc\neq0\), then we have that

\[A^{-1}=\frac{1}{\det(A)}A_{\text{cof}}^T=\frac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}.\]

Example: Consider \(A=\begin{pmatrix}5&-1&2\\3&-2&-1\\-2&1&0\end{pmatrix}\), then we have

\[\det(A)=\begin{vmatrix}5&-1&2\\3&-2&-1\\-2&1&0\end{vmatrix}=\begin{vmatrix}11&-5&0\\3&-2&-1\\-2&1&0\end{vmatrix} =\begin{vmatrix}11&-5\\-2&1\end{vmatrix}=11-10=1\neq0.\]

Further we have: \(C_{11}=\begin{vmatrix}-2&-1\\1&0\end{vmatrix}=1\), \(C_{12}=-\begin{vmatrix}3&-1\\-2&0\end{vmatrix}=2\), \(C_{13}=\begin{vmatrix}3&-2\\-2&1\end{vmatrix}=-1\), \(C_{21}=-\begin{vmatrix}-1&2\\1&0\end{vmatrix}=2\), \(C_{22}=\begin{vmatrix}5&2\\-2&0\end{vmatrix}=4\), \(C_{23}=-\begin{vmatrix}5&-1\\-2&1\end{vmatrix}=-3\), \(C_{31}=\begin{vmatrix}-1&2\\-2&-1\end{vmatrix}=5\), \(C_{32}=-\begin{vmatrix}5&2\\3&-1\end{vmatrix}=11\), \(C_{33}=\begin{vmatrix}5&-1\\3&-2\end{vmatrix}=-7\) and therefore: \(A_{\text{cof}}=\begin{pmatrix}1&2&-1\\2&4&-3\\5&11&-7\end{pmatrix}\).

Hence: \(A^{-1}=\displaystyle\frac{1}{\det(A)}A_{\text{cof}}^T=\begin{pmatrix}1&2&5\\2&4&11\\-1&-3&-7\end{pmatrix}\).

Fibonacci

We have seen that if we define the sequence of Fibonacci numbers by \(F_{n+2}=F_n+F_{n+1}\) for \(n=0,1,2,\ldots\) with \(F_0=0\) and \(F_1=1\), then we have:

\[\begin{pmatrix}F_{n+1}&F_n\\F_n&F_{n-1}\end{pmatrix}=\begin{pmatrix}1&1\\1&0\end{pmatrix}^n,\quad n=1,2,3,\ldots.\]

Taking determinants we obtain Cassini's identity: \(F_{n+1}F_{n-1}-F_n^2=(-1)^n\) for \(n=1,2,3,\ldots\). This leads to \(F_{n+2}F_n-F_{n+1}^2=(-1)^{n+1}\) or \(F_{n+1}^2-(-1)^n=F_nF_{n+2}\) for \(n=0,1,2,\ldots\). This can be used to show that

\begin{align*} \prod_{n=1}^{\infty}\left(1-\frac{(-1)^n}{F_{n+1}^2}\right)&=\prod_{n=1}^{\infty}\frac{F_{n+1}^2-(-1)^n}{F_{n+1}^2} =\prod_{n=1}^{\infty}\frac{F_nF_{n+2}}{F_{n+1}^2}=\lim\limits_{N\to\infty}\prod_{n=1}^N\frac{F_nF_{n+2}}{F_{n+1}^2}\\[2.5mm] &=\lim\limits_{N\to\infty}\frac{F_1F_3}{F_2F_2}\frac{F_2F_4}{F_3F_3}\cdots\frac{F_NF_{N+2}}{F_{N+1}F_{N+1}} =\lim\limits_{N\to\infty}\frac{F_1}{F_2}\frac{F_{N+2}}{F_{N+1}}=1\cdot\varphi=\frac{1+\sqrt{5}}{2}. \end{align*}

Here \(\displaystyle\lim\limits_{n\to\infty}\frac{F_{n+1}}{F_n}=\varphi=\frac{1+\sqrt{5}}{2}\) denotes the golden ratio.


Last modified on March 22, 2021
© Roelof Koekoek

Metamenu