Matrices: Matrices
The adjoint matrix and Cramer's Rule
Let \(A\) be an ( \(n\times n\) ) matrix. For any index \((i,j)\) you can create the ( \((n-1)\times(n-1)\) ) matrix \(M_{ij}\) by deleting the \(i\)-th row and \(j\)-th column in \(A\). The determinant \(\det(M_{ij})\) is called the (\(i,j\)) minor of the element \(a_{ij}\) of \(A\). The cofactor of the element \(a_{ij}\), denoted \(A_{ij}\), is the (\(i,j\)) minor with a sign: \[A_{ij}=(-1)^{i+j}\cdot\det(M_{ij})\] If we combine these cofactors in a matrix and take the transpose of this matrix, we get the adjoint matrix \[\mathrm{adj}(A)=\matrix{A_{11} & A_{21} & \cdots & A_{n1} \\ A_{12} & A_{22} & \cdots & A_{n2}\\ \vdots & \vdots &\ddots & \vdots \\ A_{1n} & A_{2n} & \cdots & A_{nn}}\]
\(\mathrm{adj}(A)={}\) \(\matrix{6 & 2 & 4 \\ 2 & 1 & 0 \\ 0 & 0 & 2 \\ }\)
Consider the matrix \(A=\matrix{1 & -2 & -2 \\ -2 & 6 & 4 \\ 0 & 0 & 1 \\ }\). The cofactors of the nine elements of \(A\) are: \[\small\begin{array}{rclcrrclcrrclcr}
A_{11}&=&{+}\begin{vmatrix}6 & 4 \\ 0 & 1 \end{vmatrix}&=&6,
&A_{12}&=&{-}\begin{vmatrix}-2 & 4 \\ 0 & 1 \end{vmatrix}&=&2,
&A_{13}&=&{+}\begin{vmatrix}-2 & 6 \\ 0 & 0 \end{vmatrix}&=&0\\
A_{21}&=&{-}\begin{vmatrix}-2 & 6 \\ 0 & 0 \end{vmatrix}&=&2,
&A_{22}&=&{+}\begin{vmatrix}1 & -2 \\ 0 & 1 \end{vmatrix}&=&1,
&A_{23}&=&{-}\begin{vmatrix}1 & -2 \\ 0 & 0 \end{vmatrix}&=&0\\
A_{31}&=&{+}\begin{vmatrix}-2 & -2 \\ 6 & 4 \end{vmatrix}&=&4,
&A_{32}&=&{-}\begin{vmatrix}1 & -2 \\ -2 & 4 \end{vmatrix}&=&0,
&A_{33}&=&{+}\begin{vmatrix}1 & -2 \\ -2 & 6 \end{vmatrix}&=&-2
\end{array} \]
We take the transform of the matrix of cofactors to obtain the adjoint matrix \[\mathrm{adj}(A)=\matrix{6 & 2 & 4 \\ 2 & 1 & 0 \\ 0 & 0 & 2 \\ }\]
We can calculate the determinant of the matrix \(A\) via Laplace expansion; for example \[\begin{aligned} |A| & =a_{11}\cdot A_{11}+a_{12}\cdot A_{12}+a_{13}\cdot A_{13} \\[0.25cm] &= 1\times 6 -2\times 2-2\times 0\\[0.25cm] &= 2\end{aligned}\] Note that \[\begin{aligned}A\cdot \mathrm{adj}(A)&=\matrix{1 & -2 & -2 \\ -2 & 6 & 4 \\ 0 & 0 & 1 \\ }\cdot \matrix{6 & 2 & 4 \\ 2 & 1 & 0 \\ 0 & 0 & 2 \\ }\\[0.25cm] &= \matrix{ 2 & 0 & 0\\ 0 & 2 & 0\\ 0 & 0 & 2}\\[0.25cm] &=2 \matrix{ 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1}\\[0.25cm] &=|A|\,I\end{aligned}\] where \(I\) is the \((3\times 3)\) identity matrix.
So: \[A^{-1}=\frac{1}{|A|}\,\mathrm{adj}(A)=\matrix{3 & 1 & 2 \\ 1 & {{1}\over{2}} & 0 \\ 0 & 0 & 1 \\ }\]
Cramer's Rule We consider a system of \(n\) linear equations in \(n\) unknowns: \[\left\{\;\begin{array}{llllllllll} a_{11}x_1 \!\!\!\!&+&\!\! a_{12}x_2 \!\!\!\!&+&\!\!\!\! \cdots \!\!\!\!&+&\!\!\!\! a_{1n}x_n\!\!\!\!&=&\!\!\!\!b_1\\ a_{21}x_1 \!\!&+&\!\! a_{22}x_2 \!\!&+&\!\! \cdots \!\!&+&\!\!\!\! a_{2n}x_n\!\!\!\!&=&\!\!\!\!b_2\\ \vdots &&\vdots &&&& \vdots&&\!\!\!\!\vdots\\ a_{n1}x_1 \!\!\!\!&+&\!\!\!\! a_{n2}x_2 \!\!\!\!&+&\!\!\!\! \cdots \!\!\!\!&+&\!\!\!\! a_{nn}x_n\!\!\!\!&=&\!\!\!\!b_n\end{array}\right.\] This can also be written using matrix-vector multiplication as:\[\begin{pmatrix} a_{11} & \cdots & a_{1n} \\ \vdots & & \vdots \\ a_{n1} & \cdots & a_{nn} \end{pmatrix}\!\!\begin{pmatrix}x_1\\ \vdots \\ x_n\end{pmatrix}= \begin{pmatrix}b_1\\ \vdots \\ b_n\end{pmatrix}\] or simply as \[A\vec{x}=\vec{b}\] with \[A=\begin{pmatrix} a_{11} & \cdots & a_{1n} \\ \vdots & & \vdots \\ a_{n1} & \cdots & a_{nn} \end{pmatrix}, \qquad \vec{x}=\begin{pmatrix}x_1\\ \vdots \\ x_n\end{pmatrix},\qquad \vec{b}=\begin{pmatrix}b_1\\ \vdots \\ b_n\end{pmatrix}\] We assume that the determinant of \(A\), denoted by \(D=|A|\), is unequal to is zero so that the matrix \(A\) is invertible and there is exactly one solution of the system of equation, namely \[\vec{x}=A^{-1}\vec{b}=\frac{1}{D}\mathrm{adj}(A)\,\vec{b}\] Now suppose that \(A_j(\vec{b})\) is the matrix obtained from \(A\) by replacing the \(j\) -th column of \(A\) with the column vector \(\vec{b}\). Suppose \(D_j\) is the determinant of \(A_j(\vec{b})\), that is, \(D_j=|A_j(\vec{b})|\). Then the unique solution of the system of linear equations is given by \[x_1=\frac{D_1}{D},\quad x_2=\frac{D_2}{D}, \quad\ldots\quad x_n=\frac{D_n}{D}\]
The corresponding matrix \(A\) is equal to \[\left(\begin{array}{cc}
2 &-2 \\
-4 &1
\end{array}\right)\]
The determinant \(D\) of \(A\) can easily be computed: \[D=(2)\times (1) - (-2)\times (-4)=-6\]
Replace the first column in \(A\) by \(\cv{-2\\-2}\): \(A_1\left(\cv{-2\\-2}\right)=\left(\begin{array}{cc} -2 &-2 \\ -2 &1
\end{array}\right)\)
So: \(D_1=\left|\begin{array}{cc} -2 &-2 \\ -2 &1
\end{array}\right|=(-2)\times (1) - (-2)\times (-2)=-6\)
Replace the second column in \(A\) by \(\cv{-2\\-2}\): \(A_2\left(\cv{-2\\-2}\right)=\left(\begin{array}{cc} 2 &-2 \\ -4 &-2
\end{array}\right)\)
Thus: \(D_2=\left|\begin{array}{cc} 2 &-2 \\ -4 &-2
\end{array}\right|=(2)\times (-2) - (-2)\times (-4)=-12\)
According to Cramer's Rule: \[x=\frac{D_1}{D}=\frac{-6}{-6}=1\quad\text{and}\quad y=\frac{D_2}{D}=\frac{-12}{-6}=2\] So the solution is \[\cv{x\\y} = \cv{1\\2}\]