2201NSC
Matrices
Part II
Recall the three row operations permitted in Gaussian elimination:
These operations can be represented by elementary matrices, $E_{i}.$ There is one elementary matrix for each operation.
The operation is achieved by multiplying a given matrix on the left by $E_{i}.$
The steps in Gaussian elimination can then be written as a product sequence:
$A \rightarrow E_{1}A $ $ \rightarrow E_{2}E_{1}A \rightarrow$ $\cdots \rightarrow E_{k}E_{k-1}\cdots E_{2}E_{1}A$
1. Interchanging two rows: Identity matrix with two off-diagonal 1s
$\begin{pmatrix} \color{red}0 & \color{red}1 & \color{blue}0 \\ \color{red}1 & \color{red}0 & \color{blue} 0 \\ \color{blue}0 & \color{blue}0 & \color{blue}1 \end{pmatrix}$ $\begin{pmatrix} 0 & -4 & 8 & 4 \\ 1 & -1 & 1 & 0 \\ 2 & 2 & 3 & 4 \end{pmatrix} $ $ = \begin{pmatrix} 1 & -1 & 1 & 0 \\ 0 & -4 & 8 & 4 \\ 2 & 2 & 3 & 4 \end{pmatrix}$
2. Rescaling one row: Identity matrix with one non-unit diagonal term
$\begin{pmatrix} \color{blue}1 & \color{blue}0 & \color{blue}0 \\ \color{blue}0 & \color{red}{-1/4} & \color{blue}0 \\ \color{blue}0 & \color{blue}0 & \color{blue}1 \end{pmatrix} $ $ \begin{pmatrix} 1 & -1 & 1 & 0 \\ 0 & -4 & 8 & 4 \\ 2 & 2 & 3 & 4 \end{pmatrix} $ $= \begin{pmatrix} 1 & -1 & 1 & 0 \\ 0 & 1 & -2 & -1 \\ 2 & 2 & 3 & 4 \end{pmatrix}$
3. Adding a multiple of one row to another: identity matrix with extra off-diagonal term
$\begin{pmatrix} \color{blue}1 & \color{blue}0 & \color{blue}0 \\ \color{blue}0 & \color{blue}1 & \color{blue}0 \\ \color{red}{-2} & \color{blue}0 & \color{blue}1 \end{pmatrix} $ $ \begin{pmatrix} 1 & -1 & 1 & 0 \\ 0 & 1 & -2 & -1 \\ 2 & 2 & 3 & 4 \end{pmatrix} $ $= \begin{pmatrix} 1 & -1 & 1 & 0 \\ 0 & 1 & -2 & -1 \\ 0 & 4 & 1 & 4 \end{pmatrix}$
$\begin{pmatrix} \color{blue}1 & \color{blue}0 & \color{blue}0 \\ \color{blue}0 & \color{blue}1 & \color{blue}0 \\ \color{red}{-2} & \color{blue}0 & \color{blue}1 \end{pmatrix} $ $\begin{pmatrix} \color{blue}1 & \color{blue}0 & \color{blue}0 \\ \color{blue}0 & \color{red}{-1/4} & \color{blue}0 \\ \color{blue}0 & \color{blue}0 & \color{blue}1 \end{pmatrix} $ $\begin{pmatrix} \color{red}0 & \color{red}1 & \color{blue}0 \\ \color{red}1 & \color{red}0 & \color{blue} 0 \\ \color{blue}0 & \color{blue}0 & \color{blue}1 \end{pmatrix}$ $\begin{pmatrix} 0 & -4 & 8 & 4 \\ 1 & -1 & 1 & 0 \\ 2 & 2 & 3 & 4 \end{pmatrix} $ $= \begin{pmatrix} 1 & -1 & 1 & 0 \\ 0 & 1 & -2 & -1 \\ 0 & 4 & 1 & 4 \end{pmatrix}$
$A\rightarrow$ $E_3$ $E_2$ $E_1$ $A\qquad $
We can systematically write out row reduction on an augmented matrix:
$ \left( \begin{array}{cccc|c} a_{11} & a_{12} & \cdots & a_{1n} & q_{1}\\ a_{21} & a_{22} & \cdots & a_{2n} & q_{2} \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} & q_{n} \\ \end{array} \right) $ $\rightarrow \left( \begin{array}{cccc|c} b_{11} & b_{12} & \cdots & b_{1n} & r_{1}\\ 0 & b_{22} & \cdots & b_{2n} & r_{2} \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & b_{nn} & r_{n} \\ \end{array} \right) $ $\rightarrow \left( \begin{array}{cccc|c} 1 & 0 & \cdots & 0 & s_{1}\\ 0 & 1 & \cdots & 0 & s_{2} \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & 1 & s_{n} \\ \end{array} \right) $
$\big(A \mid \mathbf q\big) $ $\quad\quad \rightarrow \qquad\quad \big(B \mid \mathbf r\big)$ $\quad\;\; \rightarrow \qquad \big(I \mid \mathbf s\big)$
From our initial augmented matrix $\big(A \mid \mathbf q\big)$ we obtain the upper-triangular form:
$\big(B \mid \mathbf r\big) $ $= E_{k}\cdots E_{1}\big(A \mid \mathbf q\big) $ $ = \big(E_{k}\cdots E_{1}A \mid E_{k}\cdots E_{1}\mathbf q\big)$
...and eventually the reduced row echelon solution:
$\big(I \mid \mathbf s\big) $ $= \big(E_{m}\cdots E_{k+1}\big)E_{k}\cdots E_{1}\big(A \mid \mathbf q\big)$ $ = \big(E_{m}\cdots E_{1}A \mid E_{m}\cdots E_{1}\mathbf q\big) $
We have just seen that the reduction process creates the tracking identity:
$$\big(I \mid \mathbf s\big) = \big(E_{m}\cdots E_{1}A \mid E_{m}\cdots E_{1}\mathbf q\big)$$
Which explicitly means that:
It follows directly that if we start with the identity matrix inside the augmented side:
$E_{m}\cdots E_{1}\big(A \mid I\big) $ $=\big (E_{m}\cdots E_{1}A \mid E_{m}\cdots E_{1}I\big) $ $= \big(I \mid A^{-1}\big)$
Conclusion: We can use standard row reduction on the augmented matrix $\big(A \mid I\big)$ to safely find the inverse matrix $A^{-1}.$
Find the inverse of $A = \left(\begin{array}{cc} 2 & 1 \\ 1 & 1 \end{array}\right). $
$ \left(\begin{array}{cc|cc} 2 & 1 & 1 & 0 \\ 1 & 1 & 0 & 1 \end{array}\right) \begin{array}{c} R1 \\ R2 \end{array} $ $\rightarrow \left(\begin{array}{cc|cc} 1 & \frac{1}{2} & \frac{1}{2} & 0 \\ 1 & 1 & 0 & 1 \end{array}\right) \begin{array}{r} \frac{1}{2}R1 \\ R2 \end{array} \qquad \qquad\qquad\qquad $
$ \rightarrow \left( \begin{array}{cc|cc} 1 & \frac{1}{2} & \frac{1}{2} & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} & 1 \end{array} \right) \begin{array}{l} R1 \\ R1-R2 \end{array} $ $ \rightarrow \left( \begin{array}{cc|cc} 1 & 0 & 1 & -1 \\ 0 & 1 & -1 & 2 \end{array} \right) \begin{array}{l} R1-R2 \\ 2R2 \end{array} $
$$\Rightarrow A^{-1} = \begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix}$$
Check: $\begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix} $ $= \begin{pmatrix} 2-1 & -2+2 \\ 1-1 & -1+2 \end{pmatrix} $ $ = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$ ✅
Show that the inverse of $ A= \begin{pmatrix} 3&2&-1\\ 3&1&-1\\ 3&2&1 \end{pmatrix} $ is $ A^{-1}= \begin{pmatrix} -\frac12&\frac23&\frac16\\ 1&-1&0\\ -\frac12&0&\frac12 \end{pmatrix}. $
$ \left( \begin{array}{ccc|ccc} 3&2&-1&1&0&0\\ 3&1&-1&0&1&0\\ 3&2&1&0&0&1 \end{array} \right) \begin{array}{c} R1\\ R2\\ R3 \end{array} $ $ \rightarrow \left( \begin{array}{ccc|ccc} 3&2&-1&1&0&0\\ 0&-1&0&-1&1&0\\ 0&0&2&-1&0&1 \end{array} \right) \begin{array}{l} R1\\ R2-R1\\ R3-R1 \end{array}\qquad\qquad \qquad $
$ \rightarrow \left( \begin{array}{ccc|ccc} 3&0&-1&-1&2&0\\ 0&-1&0&-1&1&0\\ 0&0&1&-\frac12&0&\frac12 \end{array} \right) \begin{array}{l} R1+2R2\\ R2\\ \frac12R3 \end{array} $ $ \rightarrow \left( \begin{array}{ccc|ccc} 3&0&0&-\frac32&2&\frac12\\ 0&1&0&1&-1&0\\ 0&0&1&-\frac12&0&\frac12 \end{array} \right) \begin{array}{l} R1+R3\\ -R2\\ R3 \end{array} $
$ \rightarrow \left( \begin{array}{ccc|ccc} 1&0&0&-\frac12&\frac23&\frac16\\ 0&1&0&1&-1&0\\ 0&0&1&-\frac12&0&\frac12 \end{array} \right) \begin{array}{c} \frac13R1\\ R2\\ R3 \end{array} $ $ \Rightarrow A^{-1}= \begin{pmatrix} -\frac12&\frac23&\frac16\\ 1&-1&0\\ -\frac12&0&\frac12 \end{pmatrix} $
We can confirm our results very easily via Octave or Matlab, using the inv command:
>> inv([2 1; 1 2])
ans =
1.00000 -1.00000
-1.00000 2.00000
>> inv([3 2 -1;3 1 -1;3 2 1])
ans =
-0.50000 0.66667 0.16667
1.00000 -1.00000 -0.00000
-0.50000 0.00000 0.50000
The following statements about $A \in \mathbb{R}^{n \times n}$ are equivalent:
Proof Outline:
Show that $A \Rightarrow B \Rightarrow C \Rightarrow A.$
For $A \Rightarrow B$: If $A$ is invertible and $A\mathbf x=\mathbf 0,$
then $\;\mathbf x = I\mathbf x $ $= \left(A^{-1}A\right)\mathbf x$ $ = A^{-1}\left(A\mathbf x\right) $ $= A^{-1}\mathbf 0 $ $= \mathbf 0.$
So $\mathbf x=\mathbf 0$ is the only solution.
Statements: A ($A$ is invertible), B ($A\mathbf x=\mathbf 0 \Rightarrow \mathbf x=\mathbf 0$), C ($A$ is row-equivalent to $I$).
For $B \Rightarrow C$: Suppose $\mathbf x=\mathbf 0$ is the only solution to $A\mathbf x=\mathbf 0.$ Reduce the augmented matrix $(A \mid \mathbf 0)$ to $(U \mid \mathbf 0)$ where $U$ is in reduced row echelon form.
If $U$ contains a zero row, then there is a family of solutions. But $\mathbf x=\mathbf 0$ is the only solution, so $U$ has no zero rows.
Since $A$ is an $n \times n$ matrix, $U = I.$ So there exist elementary matrices $E_1, E_2, \dots, E_m$ such that $E_m \dots E_1 A = I.$ Hence $A$ is row-equivalent to $I.$
Statements: A ($A$ is invertible), B ($A\mathbf x=\mathbf 0 \Rightarrow \mathbf x=\mathbf 0$), C ($A$ is row-equivalent to $I$).
For $C \Rightarrow A$: If $A$ is row-equivalent to $I,$ then there exist elementary matrices $E_1, E_2, \dots, E_m$ such that $E_m \dots E_1 A = I.$
Therefore, $A^{-1} = E_m \dots E_1.$ So $A^{-1}$ exists, and hence $A$ is invertible.
Corollary (Uniqueness of solutions for linear systems) The linear system \(A\mathbf x=\mathbf b\) with \(n\) equations in \(n\) unknowns has a unique solution iff \(A\) is nonsingular.
Thus, if \(A\) is singular, the system \(A\mathbf x=\mathbf b\) cannot have a unique solution: it has either no solution or at least two distinct solutions.
We have just seen that:
$A \text{ is nonsingular} \iff A\mathbf x=\mathbf b \text{ has a unique solution}$
We would like a measurable property of the matrix itself that distinguishes singular from nonsingular matrices.
To achieve this, we introduce a quantity known as the determinant.
So how do we calculate $\det A$?
A $1 \times 1$ matrix $$A = (a_{11})$$ will have an inverse if and only if $a_{11} \neq 0.$
We therefore define $\det( A )= a_{11}$ for a $1 \times 1$ matrix.
$ \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} \begin{array}{l} R1 \\ R2\end{array} $ $ \rightarrow \begin{pmatrix} a_{11} & a_{12} \\ 0 & a_{11}a_{22}- a_{12}a_{21} \end{pmatrix} \begin{array}{l} R1 \\ a_{11}R2- a_{21}R1 \end{array} $
$\begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} \rightarrow \begin{pmatrix} a_{21} & a_{22} \\ 0 & a_{12} \end{pmatrix}$
We therefore define: $\det (A) = a_{11}a_{22} - a_{12}a_{21}$ for a $ 2 \times 2$ matrix.
$\begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix} \rightarrow \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ 0 & a_{11}a_{22}-a_{21}a_{12} & a_{11}a_{23}-a_{21}a_{13} \\ 0 & a_{11}a_{32}-a_{31}a_{12} & a_{11}a_{33}-a_{31}a_{13} \end{pmatrix}$
$\det \begin{pmatrix} a_{11}a_{22}-a_{21}a_{12} & a_{11}a_{23}-a_{21}a_{13} \\ a_{11}a_{32}-a_{31}a_{12} & a_{11}a_{33}-a_{31}a_{13} \end{pmatrix} \neq 0$
$\left| \begin{array}{cc} a_{11}a_{22}-a_{21}a_{12} & a_{11}a_{23}-a_{21}a_{13} \\ a_{11}a_{32}-a_{31}a_{12} & a_{11}a_{33}-a_{31}a_{13} \end{array} \right|$
$= [a_{11}a_{22}-a_{21}a_{12}][a_{11}a_{33}-a_{31}a_{13}] - [a_{11}a_{32}-a_{31}a_{12}][a_{11}a_{23}-a_{21}a_{13}]$
$= \dots$
$= a_{11}[a_{11}a_{22}a_{33}-a_{22}a_{31}a_{13}-a_{21}a_{12}a_{33}-a_{11}a_{32}a_{23}+a_{32}a_{21}a_{13}+a_{31}a_{12}a_{23}]$
In analogy with the $2 \times 2$ case, for a $3 \times 3$ matrix we could propose:
$$\det (A) = a_{11}a_{22}a_{33}-a_{22}a_{31}a_{13}-a_{21}a_{12}a_{33}-a_{11}a_{32}a_{23}+a_{32}a_{21}a_{13}+a_{31}a_{12}a_{23}$$
But what about the cases where $a_{11}=0$, etc.?
Just as in the $2 \times 2$ case, the $3 \times 3$ definition for $\det A$ works in all the special cases where $a_{11}$, $a_{21}$ or $a_{31}$ are zero.
We therefore define the determinant of a $3 \times 3$ matrix as:
$$\det(A)= a_{11}a_{22}a_{33}-a_{22}a_{31}a_{13}-a_{21}a_{12}a_{33}-a_{11}a_{32}a_{23}+a_{32}a_{21}a_{13}+a_{31}a_{12}a_{23}$$
But remembering a formula like this is difficult... and it won't get any easier as our matrices get bigger.
Is there a better way to calculate the determinant?
The formula to compute the determinant of a $3 \times 3$ matrix is starting to get complicated:
$\det (A) = a_{11}a_{22}a_{33}-a_{22}a_{31}a_{13}-a_{21}a_{12}a_{33}-a_{11}a_{32}a_{23}+a_{32}a_{21}a_{13}+a_{31}a_{12}a_{23}$
Remembering this formula will be difficult and will not get easier as our matrices get bigger!
For a $2\times2$ matrix $ A= \left( \begin{array}{cc} a_{11} & a_{12}\\ a_{21} & a_{22} \end{array} \right). $
Choose the first row.
$ \left( \begin{array}{cc} \color{red}{a_{11}} & \color{red}{a_{12}}\\ a_{21} & a_{22} \end{array} \right) $
For a $2\times2$ matrix $ A= \left( \begin{array}{cc} a_{11} & a_{12}\\ a_{21} & a_{22} \end{array} \right). $
Cross out the row and column containing each selected element.
The remaining $1\times1$ matrix has determinant equal to its
single entry.
$ \left( \begin{array}{cc} \color{red}{a_{11}} & \color{lightgrey}{a_{12}}\\ \color{lightgrey}{a_{21}} & \color{blue}{a_{22}} \end{array} \right) \quad \left( \begin{array}{cc} \color{lightgrey}{a_{11}} & \color{red}{a_{12}}\\ \color{blue}{a_{21}} & \color{lightgrey}{a_{22}} \end{array} \right)\qquad \qquad $
$ \;\;\color{red}{a_{11}}\det(\color{blue}{a_{22}})\;\;\;\; $ $ \color{red}{a_{12}}\det(\color{blue}{a_{21}})\qquad\qquad $
For a $2\times2$ matrix $ A= \left( \begin{array}{cc} a_{11} & a_{12}\\ a_{21} & a_{22} \end{array} \right). $
Apply the alternating sign pattern: $ \left( \begin{array}{cc} + & -\\ - & + \end{array} \right). $
$ \left( \begin{array}{cc} \color{red}{a_{11}} & \color{lightgrey}{a_{12}}\\ \color{lightgrey}{a_{21}} & \color{blue}{a_{22}} \end{array} \right) \quad \left( \begin{array}{cc} \color{lightgrey}{a_{11}} & \color{red}{a_{12}}\\ \color{blue}{a_{21}} & \color{lightgrey}{a_{22}} \end{array} \right)\qquad \qquad $
$\text{det}\left(A\right)=$ $+$ $ \color{red}{a_{11}}\det(\color{blue}{a_{22}})\; $ $-\,$ $ \color{red}{a_{12}}\det(\color{blue}{a_{21}}) $ $ = a_{11}a_{22} - a_{12}a_{21}\quad$
For a $2\times2$ matrix $ A= \left( \begin{array}{cc} a_{11} & a_{12}\\ a_{21} & a_{22} \end{array} \right). $ The determinant is given by:
$\large \text{det}\left(A\right)= a_{11}a_{22} - a_{12}a_{21}$
This same pattern extends to larger matrices, where the remaining matrix is no longer $1\times1.$
For a $3\times3$ matrix:
$ \det(A)= a_{11}a_{22}a_{33} - a_{22}a_{31}a_{13} - a_{21}a_{12}a_{33} - a_{11}a_{32}a_{23} + a_{32}a_{21}a_{13} + a_{31}a_{12}a_{23} \;\; $
$ \det(A)= \color{red}{a_{11}}a_{22}a_{33} - a_{22}a_{31}\color{red}{a_{13}} - a_{21}\color{red}{a_{12}}a_{33} - \color{red}{a_{11}}a_{32}a_{23} + a_{32}a_{21}\color{red}{a_{13}} + a_{31}\color{red}{a_{12}}a_{23} \;\; $
$ = \color{red}{a_{11}} \left( \color{blue}{a_{22}a_{33}} - \color{blue}{a_{32}a_{23}} \right) - \color{red}{a_{12}} \left( \color{blue}{a_{21}a_{33}} - \color{blue}{a_{31}a_{23}} \right) + \color{red}{a_{13}} \left( \color{blue}{a_{21}a_{32}} - \color{blue}{a_{31}a_{22}} \right) $
$ = \color{red}{a_{11}} \det\!\left( \begin{array}{cc} \color{blue}{a_{22}} & \color{blue}{a_{23}}\\ \color{blue}{a_{32}} & \color{blue}{a_{33}} \end{array} \right) - \color{red}{a_{12}} \det\!\left( \begin{array}{cc} \color{blue}{a_{21}} & \color{blue}{a_{23}}\\ \color{blue}{a_{31}} & \color{blue}{a_{33}} \end{array} \right) + \color{red}{a_{13}} \det\!\left( \begin{array}{cc} \color{blue}{a_{21}} & \color{blue}{a_{22}}\\ \color{blue}{a_{31}} & \color{blue}{a_{32}} \end{array} \right)\;\, $
$ \left( \begin{array}{ccc} \color{red}{a_{11}} & \color{lightgray}{a_{12}} & \color{lightgray}{a_{13}}\\ \color{lightgray}{a_{21}} & \color{blue}{a_{22}} & \color{blue}{a_{23}}\\ \color{lightgray}{a_{31}} & \color{blue}{a_{32}} & \color{blue}{a_{33}} \end{array} \right) \qquad \left( \begin{array}{ccc} \color{lightgray}{a_{11}} & \color{red}{a_{12}} & \color{lightgray}{a_{13}}\\ \color{blue}{a_{21}} & \color{lightgray}{a_{22}} & \color{blue}{a_{23}}\\ \color{blue}{a_{31}} & \color{lightgray}{a_{32}} & \color{blue}{a_{33}} \end{array} \right) \qquad \left( \begin{array}{ccc} \color{lightgray}{a_{11}} & \color{lightgray}{a_{12}} & \color{red}{a_{13}}\\ \color{blue}{a_{21}} & \color{blue}{a_{22}} & \color{lightgray}{a_{23}}\\ \color{blue}{a_{31}} & \color{blue}{a_{32}} & \color{lightgray}{a_{33}} \end{array} \right) $
For any matrix $A$, we define the minor $M_{ij}$ to be the matrix comprising the elements remaining once the row and column containing $a_{ij}$ are removed.
Example: For a $4 \times 4$ matrix, removing row 2 and column 3 yields $M_{23}$:
$A = \begin{pmatrix} a_{11} & a_{12} & a_{13} & a_{14} \\ a_{21} & a_{22} & a_{23} & a_{24} \\ a_{31} & a_{32} & a_{33} & a_{34} \\ a_{41} & a_{42} & a_{43} & a_{44} \end{pmatrix}\qquad\qquad \qquad\qquad \qquad\quad\, $
$A = \begin{pmatrix} a_{11} & a_{12} & \color{red}{a_{13}} & a_{14} \\ \color{red}{a_{21}} & \color{red}{a_{22}} & \color{red}{a_{23}} & \color{red}{a_{24}} \\ a_{31} & a_{32} & \color{red}{a_{33}} & a_{34} \\ a_{41} & a_{42} & \color{red}{a_{43}} & a_{44} \end{pmatrix}\qquad\qquad \qquad\qquad \qquad\quad\, $
$A = \begin{pmatrix} a_{11} & a_{12} & \color{red}{a_{13}} & a_{14} \\ \color{red}{a_{21}} & \color{red}{a_{22}} & \color{red}{a_{23}} & \color{red}{a_{24}} \\ a_{31} & a_{32} & \color{red}{a_{33}} & a_{34} \\ a_{41} & a_{42} & \color{red}{a_{43}} & a_{44} \end{pmatrix} \implies M_{23} = \begin{pmatrix} a_{11} & a_{12} & a_{14} \\ a_{31} & a_{32} & a_{34} \\ a_{41} & a_{42} & a_{44} \end{pmatrix}$
We then define the cofactor $C_{ij}$ as:
$$\large C_{ij} = \left(-1\right)^{i+j} \det M_{ij}$$The determinant of a square matrix $A \in \mathbb{R}^{n \times n}$ is defined inductively by:
$$\det (A )= \begin{cases} a_{11} & \text{if } n=1 \\ \sum_{i=1}^{n} a_{1i} C_{1i} & \text{if } n>1 \end{cases}$$where $C_{1i}$ is the cofactor of the corresponding element $a_{1i}$ in the first row.
We are not forced to sum the terms $a_{ij}C_{ij}$ along the top row only!
Example: We can expand down the first column to take advantage of the zeros:
$ \begin{vmatrix} 0 & 2 & 3 & 0 \\ 0 & 4 & 5 & 0 \\ 0 & 1 & 0 & 3 \\ 2 & 0 & 1 & 3 \end{vmatrix} \color{white}{= 0 - 0 + 0 - 2 \begin{vmatrix} 2 & 3 & 0 \\ 4 & 5 & 0 \\ 1 & 0 & 3 \end{vmatrix}} $
$ \begin{vmatrix} \color{red}{0} & 2 & 3 & 0 \\ \color{red}{0} & 4 & 5 & 0 \\ \color{red}{0} & 1 & 0 & 3 \\ \color{red}{2} & 0 & 1 & 3 \end{vmatrix} \color{white}{= 0 - 0 + 0 - 2 \begin{vmatrix} 2 & 3 & 0 \\ 4 & 5 & 0 \\ 1 & 0 & 3 \end{vmatrix}} $
$ \begin{vmatrix} \color{red}{0} & 2 & 3 & 0 \\ \color{red}{0} & 4 & 5 & 0 \\ \color{red}{0} & 1 & 0 & 3 \\ \color{red}{2} & 0 & 1 & 3 \end{vmatrix} = 0 - 0 + 0 - 2 \begin{vmatrix} 2 & 3 & 0 \\ 4 & 5 & 0 \\ 1 & 0 & 3 \end{vmatrix} $
$ \begin{vmatrix} \color{red}{0} & 2 & 3 & 0 \\ \color{red}{0} & 4 & 5 & 0 \\ \color{red}{0} & 1 & 0 & 3 \\ \color{red}{2} & 0 & 1 & 3 \end{vmatrix} = 0 - 0 + 0 - 2 \begin{vmatrix} 2 & 3 & \color{blue}{0} \\ 4 & 5 & \color{blue}{0} \\ 1 & 0 & \color{blue}{3} \end{vmatrix} $
Now, expanding down the last column of the remaining $3 \times 3$ matrix:
$= -2 \left( 0 - 0 + 3 \begin{vmatrix} 2 & 3 \\ 4 & 5 \end{vmatrix} \right)$ $= -2 \times 3 \times (10 - 12) $ $ = 12.$
Use Cramer's rule to solve the system:
$ \begin{aligned} x + 2y + z &= 5 \\ 2x + 2y + z &= 6 \\ x + 2y + 3z &= 9 \end{aligned} $
$ \begin{aligned} x + 2y + z &= 5 \\ 2x + 2y + z &= 6 \\ x + 2y + 3z &= 9 \end{aligned} \rightarrow \left( \begin{array}{cccc} 1 & 2 & 1 \\ 2 & 2 & 1 \\ 1 & 2 & 3 \\ \end{array} \right) \left( \begin{array}{cccc} x \\ y \\ z \\ \end{array} \right) = \left( \begin{array}{cccc} 5 \\ 6 \\ 9 \\ \end{array} \right) $
$ \begin{aligned} x + 2y + z &= 5 \\ 2x + 2y + z &= 6 \\ x + 2y + 3z &= 9 \end{aligned} \rightarrow \left( \color{blue}{ \begin{array}{cccc} 1 & 2 & 1 \\ 2 & 2 & 1 \\ 1 & 2 & 3 \\ \end{array} } \right) \left( \begin{array}{cccc} x \\ y \\ z \\ \end{array} \right) = \left( \begin{array}{cccc} 5 \\ 6 \\ 9 \\ \end{array} \right) $
$ \begin{aligned} x + 2y + z &= 5 \\ 2x + 2y + z &= 6 \\ x + 2y + 3z &= 9 \end{aligned} \rightarrow \left( \begin{array}{cccc} 1 & 2 & 1 \\ 2 & 2 & 1 \\ 1 & 2 & 3 \\ \end{array} \right) \left( \begin{array}{cccc} x \\ y \\ z \\ \end{array} \right) = \left( \begin{array}{cccc} \color{red}5 \\ \color{red}6 \\ \color{red}9 \\ \end{array} \right) $
The determinant of the coefficient matrix is $\det M= -4.$
Cramer's rule yields:
In general, given a system $M\mathbf x = \mathbf y$ where $\det M \neq 0$, the unique solution for each variable $x_i$ can be calculated by replacing the $i$-th column of $M$ with the vector $\mathbf y$: $$x_i = \frac{\det(M_i)}{\det(M)}$$
Where $M_i$ is constructed as:$$M_i = \begin{pmatrix} M_{11} & \dots & M_{1(i-1)} & \color{red}{y_1} & M_{1(i+1)} & \dots & M_{1n} \\ M_{21} & \dots & M_{2(i-1)} & \color{red}{y_2} & M_{2(i+1)} & \dots & M_{2n} \\ \vdots & & \vdots & \vdots & \vdots & & \vdots \\ M_{n1} & \dots & M_{n(i-1)} & \color{red}{y_n} & M_{n(i+1)} & \dots & M_{nn} \end{pmatrix}$$
First, we observe an important property of cofactor expansion identity:
Next, we define the adjoint matrix ($\text{adj } A$) as the transpose of the cofactor matrix:
$$\text{adj } A = \begin{pmatrix} C_{11} & C_{21} & \dots & C_{n1} \\ C_{12} & C_{22} & \dots & C_{n2} \\ \vdots & \vdots & \ddots & \vdots \\ C_{1n} & C_{2n} & \dots & C_{nn} \end{pmatrix}$$
From this property, it follows that: $A\left(\text{adj } A\right) $ $ = \left(\det A\right)I$ $ \Ra A^{-1} = \dfrac{1}{\det A}\text{adj } A.$
If $\mathbf x$ is the unique solution to the linear system $A\mathbf x=\mathbf b$, we can isolate $\mathbf x$ using the adjoint matrix inverse:
$$\mathbf x = A^{-1}\mathbf b = \frac{1}{\det A}(\text{adj } A)\mathbf b$$
Evaluating for an individual component entry $x_i$ gives:
$\ds x_i = \frac{b_1 C_{1i} + b_2 C_{2i} + \dots + b_n C_{ni}}{\det A}$ $ =\ds \frac{\det A_i}{\det A}$
This holds because the expression $b_1 C_{1i} + b_2 C_{2i} + \dots + b_n C_{ni}$ acts exactly as the cofactor expansion down the $i$-th column of a modified matrix $A_i$, where the original $i$-th column elements of $A$ have been replaced by the vector elements of $\mathbf b$: $$A_i = \begin{pmatrix} a_{11} & \dots & b_1 & \dots & a_{1n} \\ a_{21} & \dots & b_2 & \dots & a_{2n} \\ \vdots & & \vdots & & \vdots \\ a_{n1} & \dots & b_n & \dots & a_{nn} \end{pmatrix}$$
A highly convenient method to evaluate the cross product of two 3D vectors is via a symbolic determinant:
It follows directly that the scalar triple product can be computed as:
Conceptual Questions:
Main Points Covered
Where to Next?