| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| lecture_15_slides [2017/03/27 17:16] – [Example: using EROs to find the determinant] rupert | lecture_15_slides [2017/03/27 17:31] (current) – [Example: $n=3$] rupert |
|---|
| |
| * Also, these properties all hold if you change "row" into "column" throughout. | * Also, these properties all hold if you change "row" into "column" throughout. |
| |
| ==== Using EROs to find the determinant ==== | |
| |
| * Can use EROs to put a matrix into upper triangular form | |
| * Then finding the determinant is easy: just multiply the diagonal entries together. | |
| * Just have to keep track of how the determinant is changed by any row swaps and row scalings. | |
| |
| |
| |
| |
| * $\det(A_{Ri\leftrightarrow Rj})=-\det(A)$, so $\def\vm#1{\left|\begin{smallmatrix}#1\end{smallmatrix}\right|}\vm{0&0&2\\0&3&15\\4&23&2} = -\vm{4&23&2\\0&3&15\\0&0&2}=-4\cdot 3\cdot 2 = -24$. | * $\det(A_{Ri\leftrightarrow Rj})=-\det(A)$, so $\def\vm#1{\left|\begin{smallmatrix}#1\end{smallmatrix}\right|}\vm{0&0&2\\0&3&15\\4&23&2} = -\vm{4&23&2\\0&3&15\\0&0&2}=-4\cdot 3\cdot 2 = -24$. |
| * $\det(A_{Ri\to c Ri})=c\det(A)$, and the same for columns. So \begin{align*}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\vm{ 2&4&6&10\\5&0&0&-10\\9&0&81&99\\1&2&3&4} &= 2\vm{ 1&2&3&5\\5&0&0&-10\\9&0&81&99\\1&2&3&4} = 2\cdot 5\vm{ 1&2&3&5\\1&0&0&-2\\9&0&81&99\\1&2&3&4}\\&= 2\cdot 5\cdot 9 \vm{ 1&2&3&5\\1&0&0&-2\\1&0&9&11\\1&2&3&4}=2\cdot 5\cdot 9\cdot 2 \vm{ 1&1&3&5\\1&0&0&-2\\1&0&9&11\\1&1&3&4}\\&=2\cdot 5\cdot 9\cdot 2\cdot 3 \vm{ 1&1&1&5\\1&0&0&-2\\1&0&3&11\\1&1&1&4}.\end{align*} | * $\det(A_{Ri\to c Ri})=c\det(A)$, and the same for columns. So \begin{align*}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\vm{ \color{red}2&\color{red}4&\color{red}6&\color{red}{10}\\\color{blue}5&\color{blue}0&\color{blue}0&-\color{blue}{10}\\\color{orange}9&\color{orange}0&\color{orange}{81}&\color{orange}{99}\\1&2&3&4} &= \color{red}2\cdot \color{blue}5\cdot \color{orange}9 \vm{ 1&\color{green}2&\color{pink}3&5\\1&\color{green}0&\color{pink}0&-2\\1&\color{green}0&\color{pink}9&11\\1&\color{green}2&\color{pink}3&4}\\&=2\cdot 5\cdot 9\cdot \color{green}2\cdot\color{pink} 3 \vm{ 1&1&1&5\\1&0&0&-2\\1&0&3&11\\1&1&1&4}.\end{align*} |
| |
| ==== ==== | ==== ==== |
| ==== Example: using EROs to find the determinant ==== | ==== Example: using EROs to find the determinant ==== |
| |
| \begin{align*}\vm{1&3&1&3\\\color{red}4&\color{red}8&\color{red}0&\color{red}{12}\\0&1&3&6\\2&2&1&6}&= \color{red}{4}\vm{1&3&1&\color{blue}3\\1&2&0&\color{blue}3\\0&1&3&\color{blue}6\\2&2&1&\color{blue}6}=4\cdot \color{blue}3\vm{\color{green}1&3&1&1\\\color{red}1&2&0&1\\\color{red}0&1&3&2\\\color{red}2&2&1&2} | \begin{align*}\def\vm#1{\left|\begin{smallmatrix}#1\end{smallmatrix}\right|}\vm{1&3&1&3\\\color{red}4&\color{red}8&\color{red}0&\color{red}{12}\\0&1&3&6\\2&2&1&6}&= \color{red}{4}\vm{1&3&1&\color{blue}3\\1&2&0&\color{blue}3\\0&1&3&\color{blue}6\\2&2&1&\color{blue}6}=4\cdot \color{blue}3\vm{\color{green}1&3&1&1\\\color{red}1&2&0&1\\\color{red}0&1&3&2\\\color{red}2&2&1&2} |
| \\&=12\vm{1&3&1&1\\\color{blue}0&\color{blue}{-1}&\color{blue}{-1}&\color{blue}{0}\\\color{blue}0&\color{blue}1&\color{blue}3&\color{blue}2\\0&-4&-1&-0} | \\&=12\vm{1&3&1&1\\\color{blue}0&\color{blue}{-1}&\color{blue}{-1}&\color{blue}{0}\\\color{blue}0&\color{blue}1&\color{blue}3&\color{blue}2\\0&-4&-1&-0} |
| =\color{blue}{-}12\vm{1&3&1&1\\0&\color{green}1&3&2\\0&\color{red}{-1}&{-1}&{0}\\0&\color{red}{-4}&-1&0} | =\color{blue}{-}12\vm{1&3&1&1\\0&\color{green}1&3&2\\0&\color{red}{-1}&{-1}&{0}\\0&\color{red}{-4}&-1&0} |
| \\&=-12\vm{1&3&1&1\\0&1&3&2\\0&0&\color{green}2&2\\0&0&\color{red}{11}&8} | \\&=-12\vm{1&3&1&1\\0&1&3&2\\0&0&\color{green}2&2\\0&0&\color{red}{11}&8} |
| =-12\vm{1&3&1&1\\0&1&3&2\\0&0&2&2\\0&0&0&-3} | =-12\vm{1&3&1&1\\0&1&3&2\\0&0&2&2\\0&0&0&-3} |
| \\&=-12(1)(1)(2)(-3)=72. | \\&=-12(1\times1\times2\times(-3))=72. |
| \end{align*} | \end{align*} |
| | |
| |
| ===== Finding the inverse of an invertible $n\times n$ matrix ===== | ===== Finding the inverse of an invertible $n\times n$ matrix ===== |
| ==== Example: $n=3$ ==== | ==== Example: $n=3$ ==== |
| |
| Let $\def\mat#1{\left[\begin{smallmatrix}#1\end{smallmatrix}\right]}A=\mat{3&1&0\\-2&-4&3\\5&4&-2}$. | Find $J$, the adjoint of $\def\mat#1{\left[\begin{smallmatrix}#1\end{smallmatrix}\right]}A=\mat{3&1&0\\-2&-4&3\\5&4&-2}$, and compute $A^{-1}$. |
| * Matrix of signs: $\mat{+&-&+\\-&+&-\\+&-&+}$ | * Matrix of signs: $\mat{+&-&+\\-&+&-\\+&-&+}$ |
| * Matrix of cofactors: $C=\mat{\vm{-4&3\\4&-2}&-\vm{-2&3\\5&-2}&\vm{-2&-4\\5&4}\\-\vm{1&0\\4&-2}&\vm{3&0\\5&-2}&-\vm{3&1\\5&4}\\\vm{1&0\\-4&3}&-\vm{3&0\\-2&3}&\vm{3&1\\-2&-4}}= \mat{-4&11&12\\2&-6&-7\\3&-9&-10}$ | * Matrix of cofactors: $C=\def\vm#1{\left|\begin{smallmatrix}#1\end{smallmatrix}\right|}\mat{\vm{-4&3\\4&-2}&-\vm{-2&3\\5&-2}&\vm{-2&-4\\5&4}\\-\vm{1&0\\4&-2}&\vm{3&0\\5&-2}&-\vm{3&1\\5&4}\\\vm{1&0\\-4&3}&-\vm{3&0\\-2&3}&\vm{3&1\\-2&-4}}= \mat{-4&11&12\\2&-6&-7\\3&-9&-10}$ |
| * So the adjoint of $A$ is $J=C^T=\mat{-4&2&3\\11&-6&-9\\12&-7&-10}$. | |
| |
| ==== ==== | ==== ==== |
| * Adjoint of $A=\mat{3&1&0\\-2&-4&3\\5&4&-2}$ is $J=\mat{-4&2&3\\11&-6&-9\\12&-7&-10}$ | * Adjoint of $A=\mat{3&1&0\\-2&-4&3\\5&4&-2}$ is $J=C^T=\mat{-4&2&3\\11&-6&-9\\12&-7&-10}$ |
| * $AJ=\mat{3&1&0\\-2&-4&3\\5&4&-2}\mat{-4&2&3\\11&-6&-9\\12&-7&-10}=\mat{-1&0&0\\0&-1&0\\0&0&-1}=-1\cdot I_3$ | * $AJ=\mat{3&1&0\\-2&-4&3\\5&4&-2}\mat{-4&2&3\\11&-6&-9\\12&-7&-10}=\mat{-1&0&0\\0&-1&0\\0&0&-1}=-1\cdot I_3$ |
| * $JA=\mat{-4&2&3\\11&-6&-9\\12&-7&-10}\mat{3&1&0\\-2&-4&3\\5&4&-2}=\mat{-1&0&0\\0&-1&0\\0&0&-1}=-1\cdot I_3$ | * $JA=\mat{-4&2&3\\11&-6&-9\\12&-7&-10}\mat{3&1&0\\-2&-4&3\\5&4&-2}=\mat{-1&0&0\\0&-1&0\\0&0&-1}=-1\cdot I_3$ |
| ==== Corollary: a formula for the inverse of a square matrix ==== | ==== Corollary: a formula for the inverse of a square matrix ==== |
| |
| If $A$ is any $n\times n$ matrix with $\det(A)\ne 0$, then $A$ is invertible and \[A^{-1}=\frac1{\det A}J\] where $J$ is the adjoint of $A$. | If $A$ is any $n\times n$ matrix with $\det(A)\ne 0$, then $A$ is invertible, and $A^{-1}=\frac1{\det A}J$ where $J$ is the adjoint of $A$. |
| |
| === Proof === | === Proof === |
| |
| * Divide the equation $AJ=(\det A)I_n=JA$ by $\det A$. ■ | * Divide the equation $AJ=(\det A)I_n=JA$ by $\det A$. |
| | * $A(\frac1{\det A}J)=I_n=(\frac1{\det A})JA$ |
| | * So $A^{-1}=\frac1{\det A} J$. ■ |
| | |
| | ==== Example ($n=4$) ==== |
| | |
| | Let $A=\mat{1&0&0&0\\1&2&0&0\\1&2&3&0\\1&2&3&4}$. |
| | |
| | * Reminder: repeated row or zero row gives determinant zero |
| | * $C=\mat{+\vm{2&0&0\\2&3&0\\2&3&4}&-\vm{1&0&0\\1&3&0\\1&3&4}&+0&-0\\-0&+\vm{1&0&0\\1&3&0\\1&3&4}&-\vm{1&0&0\\1&2&0\\1&2&4}&+0\\+0&-0&+\vm{1&0&0\\1&2&0\\1&2&4}&-\vm{1&0&0\\1&2&0\\1&2&3}\\-0&+0&-0&+\vm{1&0&0\\1&2&0\\1&2&3}}=\mat{24&-12&0&0\\0&12&-8&0\\0&0&8&-6\\0&0&0&6}$ |
| | ==== Example ($n=4$) ==== |
| | |
| | Let $A=\mat{1&0&0&0\\1&2&0&0\\1&2&3&0\\1&2&3&4}$. |
| | |
| | * $C=\mat{24&-12&0&0\\0&12&-8&0\\0&0&8&-6\\0&0&0&6}$ so $J=C^T=\mat{24&0&0&0\\-12&12&0&0\\0&-8&8&0\\0&0&-6&6}$. |
| | * So $A^{-1}=\frac1{\det A}J = \frac1{24}\mat{24&0&0&0\\-12&12&0&0\\0&-8&8&0\\0&0&-6&6}=\mat{1&0&0&0\\-1/2&1/2&0&0\\0&-1/3&1/3&0\\0&0&-1/4&1/4}$. |
| | * (Easy to check that $AA^{-1}=I_4=A^{-1}A$.) |
| | |
| |
| ==== Example ==== | |
| |
| If again we take $A=\mat{3&1&0\\-2&-4&3\\5&4&-2}$, then $J=\mat{-4&2&3\\11&-6&-9\\12&-7&-10}$ and $\det(A)=-1$, so $A$ is invertible and $A^{-1}=\frac1{-1}J=-J=\mat{4&-2&-3\\-11&6&9\\-12&7&10}$. | |
| |