From 0af1456e8c83bbb1e453bf24ae07e10d097da174 Mon Sep 17 00:00:00 2001 From: kes0195 Date: Thu, 10 Apr 2025 19:59:53 -0500 Subject: [PATCH 01/11] Started. --- linear-algebra/inverses.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index 2e8687e2d..75bfebb23 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -1 +1,6 @@ # Matrix inversion +Gauss-Jordan elimination works well for solving (\underline{A}) (\underline{x}) = (\underline{b}) but the process needs to be repeated for every new (\underline{b}). + +Is there an alternative if we need to solve (\underline{A}) (\underline{x}) = (\underline{b}) for many different (\underline{b}) + +(\underline{matrix inverse}). For a square (nxn) matrix (\underline{A}), the inverse (\underline{A}) \ No newline at end of file From 38bcf2db2b4aa0d5b0ff1b71fb373ee34a5d76dc Mon Sep 17 00:00:00 2001 From: kes0195 Date: Thu, 10 Apr 2025 21:39:43 -0500 Subject: [PATCH 02/11] Chenges #2 --- linear-algebra/inverses.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index 75bfebb23..2b03c1a01 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -3,4 +3,34 @@ Gauss-Jordan elimination works well for solving (\underline{A}) (\underline{x}) Is there an alternative if we need to solve (\underline{A}) (\underline{x}) = (\underline{b}) for many different (\underline{b}) -(\underline{matrix inverse}). For a square (nxn) matrix (\underline{A}), the inverse (\underline{A}) \ No newline at end of file +(\underline{matrix inverse}). For a square (nxn) matrix (\underline{A}), the inverse (\underline{A}) satisfies + +(\underline{A})(\underline{A}) = (\underline{A})(\underline{A}) = (\underline{I}) where (\underline{I}) is the nxn identity matrix + +begin{array}{ccc} +1 & 0 \\ +0 & 1 +\end{array} +\right] + +A matrix is "nonsingular" if it has an inverse, and "singular" if it does not. + +If the inverse exists, it is unique and can be used to solve (\underline{A}) (\underline{x}) = (\underline{b}) + +*****insert eq here****8 + + + + + +Two questions: +1. How do we know if (\underline{A}) exists ((\underline{A}) is non singular)? +****arrow***** Determinants + +2. How do we compute (\underline{A})? +****arrow***** Gauss-Jordan elimination + + + + +2. Inverse \ No newline at end of file From 33fc0223c304de2a2cf19688cd28a24b0dccf3c9 Mon Sep 17 00:00:00 2001 From: kes0195 Date: Sun, 13 Apr 2025 11:38:56 -0500 Subject: [PATCH 03/11] Change #3 --- linear-algebra/inverses.md | 121 +++++++++++++++++++++++++++++++------ 1 file changed, 104 insertions(+), 17 deletions(-) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index 2b03c1a01..6597abc06 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -1,11 +1,11 @@ # Matrix inversion -Gauss-Jordan elimination works well for solving (\underline{A}) (\underline{x}) = (\underline{b}) but the process needs to be repeated for every new (\underline{b}). +Gauss-Jordan elimination works well for solving \( Ax = b \) but the process needs to be repeated for every new b. -Is there an alternative if we need to solve (\underline{A}) (\underline{x}) = (\underline{b}) for many different (\underline{b}) +Is there an alternative if we need to solve \( Ax = b \) for many different b? -(\underline{matrix inverse}). For a square (nxn) matrix (\underline{A}), the inverse (\underline{A}) satisfies +Matrix inverse. For a square (nxn) matrix A, the inverse A^{-1} satisfies -(\underline{A})(\underline{A}) = (\underline{A})(\underline{A}) = (\underline{I}) where (\underline{I}) is the nxn identity matrix +\(A*A^{-1}= A^{-1}*A = I \) where I is the nxn identity matrix begin{array}{ccc} 1 & 0 \\ @@ -15,22 +15,109 @@ begin{array}{ccc} A matrix is "nonsingular" if it has an inverse, and "singular" if it does not. -If the inverse exists, it is unique and can be used to solve (\underline{A}) (\underline{x}) = (\underline{b}) - -*****insert eq here****8 +If the inverse exists, it is unique and can be used to solve \( Ax = b \) +\( Ax = b \) \( A \rightarrow B \) \((A^{-1}A)x = A^(-1)b\) \( A \rightarrow B \) +\[ +\boxed{x=A^{-1}b} +\] +(\(Ib = b\) if the multiplication is defined.) Two questions: -1. How do we know if (\underline{A}) exists ((\underline{A}) is non singular)? -****arrow***** Determinants - -2. How do we compute (\underline{A})? -****arrow***** Gauss-Jordan elimination - - - - -2. Inverse \ No newline at end of file +1. How do we know if A^{-1} exists (A is non singular)? + \( A \rightarrow B \) Determinants + +2. How do we compute A^{-1}? +\( A \rightarrow B \) Gauss-Jordan elimination + + + + +2. Inverse + +Finding the inverse of a is usually hard. There is a general definition using coafactors that we will not cover becuase it is hard to apply. There are also serveral numeric techniques, but we will not cover them because they are computationally intensive. Instead we will cover two options: + +For a 2x2 matrix + +A = \[ +\begin{bmatrix} +a & b \\ +c & d +\end{bmatrix} +\], + +\[ +\boxed{A^{-1} = \frac{1}{|A|} \[ +\begin{bmatrix} +a & b \\ +c & d +\end{bmatrix} +\]}\] + +(flip a+d, change signs of b+c) + +Ex: + +A = \[ +\begin{bmatrix} +3 & 1 \\ +2 & 4 +\end{bmatrix} +\] + +\[A^{-1} = \frac{1}{10} +\begin{bmatrix} +4 & -1 \\ +-2 & 3 +\end{bmatrix} += +\begin{bmatrix} +0.4 & -0.1 \\ +-0.2 & 0.3 +\end{bmatrix} +\] + +|A| = 12-2 = 10 + +Verify: + +\[ +A \cdot A^{-1} = \frac{1}{10} +\begin{bmatrix} +4 & -1 \\ +-2 & 3 +\end{bmatrix} +\begin{bmatrix} +3 & 1 \\ +2 & 4 +\end{bmatrix} += \frac{1}{10} +\begin{bmatrix} +12-2 & 4-4 \\ +-6+6 & -2+12 +\end{bmatrix} += +\begin{bmatrix} +1 & 0 \\ +0 & 1 +\end{bmatrix} +\] + +For bigger matricies, use the Gauss-Jordan methos to solve + +\( A \cdot A^{-1} = I \) (generalization of \( Ax = b \)) + +\begin{itemize} + \item Form augmentd matrix \[ +[A \; | \; I] +\] (nx2n) + \item Perform row operations to bring left side to I, so \[ +[I \; | \; A^{-1}] +\] + \item May be helpful to check \[ +|A| \neq 0 +\] first in case A is not invertable. +\end{itemize} \ No newline at end of file From acd4c7e2274138026bda0014c31a870b66e559dd Mon Sep 17 00:00:00 2001 From: kes0195 Date: Sun, 13 Apr 2025 12:03:37 -0500 Subject: [PATCH 04/11] Changes 4 --- linear-algebra/inverses.md | 113 ++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 57 deletions(-) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index 6597abc06..e8b7b97ba 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -1,25 +1,27 @@ # Matrix inversion -Gauss-Jordan elimination works well for solving \( Ax = b \) but the process needs to be repeated for every new b. +Gauss-Jordan elimination works well for solving Ax = b but the process needs to be repeated for every new b. -Is there an alternative if we need to solve \( Ax = b \) for many different b? +Is there an alternative if we need to solve Ax = b for many different b? -Matrix inverse. For a square (nxn) matrix A, the inverse A^{-1} satisfies +Matrix inverse. For a square (nxn) matrix A, the inverse \(A^{-1}\) satisfies -\(A*A^{-1}= A^{-1}*A = I \) where I is the nxn identity matrix +\[ +A A^{-1} = A^{-1} A = I +\] where I is the nxn identity matrix -begin{array}{ccc} +\[ +\begin{bmatrix} 1 & 0 \\ 0 & 1 -\end{array} -\right] +\end{bmatrix} +\] A matrix is "nonsingular" if it has an inverse, and "singular" if it does not. -If the inverse exists, it is unique and can be used to solve \( Ax = b \) +If the inverse exists, it is unique and can be used to solve Ax = b -\( Ax = b \) \( A \rightarrow B \) \((A^{-1}A)x = A^(-1)b\) \( A \rightarrow B \) \[ -\boxed{x=A^{-1}b} +Ax = b \quad \Rightarrow \quad (A^{-1} \cdot A) x = A^{-1} \cdot b \quad \Rightarrow \quad \boxed{x = A^{-1} b} \] (\(Ib = b\) if the multiplication is defined.) @@ -28,15 +30,16 @@ If the inverse exists, it is unique and can be used to solve \( Ax = b \) Two questions: 1. How do we know if A^{-1} exists (A is non singular)? - \( A \rightarrow B \) Determinants + \( \rightarrow Determinants \) 2. How do we compute A^{-1}? -\( A \rightarrow B \) Gauss-Jordan elimination +\( \rightarrow Gauss-Jordan elimination \) -2. Inverse + +2: Inverse Finding the inverse of a is usually hard. There is a general definition using coafactors that we will not cover becuase it is hard to apply. There are also serveral numeric techniques, but we will not cover them because they are computationally intensive. Instead we will cover two options: @@ -49,43 +52,31 @@ c & d \end{bmatrix} \], +\begin{itemize} + \item For a $2 \times 2$ matrix $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$, + \[ + A^{-1} = \frac{1}{|A|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} + \quad \text{(flip $a$ and $d$, change signs of $b$ and $c$)} + \] +\end{itemize} + +\textbf{Example:} \[ -\boxed{A^{-1} = \frac{1}{|A|} \[ -\begin{bmatrix} -a & b \\ -c & d -\end{bmatrix} -\]}\] - -(flip a+d, change signs of b+c) - -Ex: - -A = \[ -\begin{bmatrix} -3 & 1 \\ -2 & 4 -\end{bmatrix} +A = \begin{bmatrix} 3 & 1 \\ 2 & 4 \end{bmatrix} \] -\[A^{-1} = \frac{1}{10} -\begin{bmatrix} -4 & -1 \\ --2 & 3 -\end{bmatrix} -= -\begin{bmatrix} -0.4 & -0.1 \\ --0.2 & 0.3 -\end{bmatrix} +\[ +|A| = 3 \cdot 4 - 2 \cdot 1 = 12 - 2 = 10 +\] +\[ +A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} += \begin{bmatrix} 0.4 & -0.1 \\ -0.2 & 0.3 \end{bmatrix} \] -|A| = 12-2 = 10 - -Verify: +\textbf{Verify:} \[ -A \cdot A^{-1} = \frac{1}{10} +A^{-1}A = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 @@ -96,8 +87,18 @@ A \cdot A^{-1} = \frac{1}{10} \end{bmatrix} = \frac{1}{10} \begin{bmatrix} -12-2 & 4-4 \\ --6+6 & -2+12 +4 \cdot 3 + (-1) \cdot 2 & 4 \cdot 1 + (-1) \cdot 4 \\ +-2 \cdot 3 + 3 \cdot 2 & -2 \cdot 1 + 3 \cdot 4 +\end{bmatrix} += \frac{1}{10} +\begin{bmatrix} +12 - 2 & 4 - 4 \\ +-6 + 6 & -2 + 12 +\end{bmatrix} += \frac{1}{10} +\begin{bmatrix} +10 & 0 \\ +0 & 10 \end{bmatrix} = \begin{bmatrix} @@ -106,18 +107,16 @@ A \cdot A^{-1} = \frac{1}{10} \end{bmatrix} \] -For bigger matricies, use the Gauss-Jordan methos to solve - -\( A \cdot A^{-1} = I \) (generalization of \( Ax = b \)) +For larger matrices, use the \textbf{Gauss-Jordan method} to solve +\[ +AA^{-1} = I \quad \text{(Generalization of } Ax = b \text{)} +\] \begin{itemize} - \item Form augmentd matrix \[ -[A \; | \; I] -\] (nx2n) - \item Perform row operations to bring left side to I, so \[ -[I \; | \; A^{-1}] -\] - \item May be helpful to check \[ -|A| \neq 0 -\] first in case A is not invertable. + \item Form augmented matrix $\left[ A \,|\, I \right]$ \quad (an $n \times 2n$ matrix) + \item Perform row operations to bring the left side to $I$, so that: + \[ + \left[ I \,|\, A^{-1} \right] + \] + \item It may be helpful to check that $|A| \neq 0$ first, in case $A$ is not invertible. \end{itemize} \ No newline at end of file From 5abbf527d4dcc936cc3708d91a0384b1c0ac5239 Mon Sep 17 00:00:00 2001 From: kes0195 Date: Sun, 13 Apr 2025 12:54:03 -0500 Subject: [PATCH 05/11] Changes #5 --- linear-algebra/inverses.md | 54 ++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index e8b7b97ba..163436337 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -3,25 +3,26 @@ Gauss-Jordan elimination works well for solving Ax = b but the process needs t Is there an alternative if we need to solve Ax = b for many different b? -Matrix inverse. For a square (nxn) matrix A, the inverse \(A^{-1}\) satisfies +Matrix inverse. For a square (nxn) matrix A, the inverse $A^{-1}$ satisfies \[ -A A^{-1} = A^{-1} A = I +A $A^{-1}$ = $A^{-1}$ A = I \] where I is the nxn identity matrix -\[ +\ \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} -\] +\ A matrix is "nonsingular" if it has an inverse, and "singular" if it does not. -If the inverse exists, it is unique and can be used to solve Ax = b + +If the inverse exists, it is \textit{unique} and can be used to solve $Ax = b$! \[ -Ax = b \quad \Rightarrow \quad (A^{-1} \cdot A) x = A^{-1} \cdot b \quad \Rightarrow \quad \boxed{x = A^{-1} b} +Ax = b \Rightarrow (A^{-1}A)x = A^{-1}b \Rightarrow \boxed{x = A^{-1}b} \] (\(Ib = b\) if the multiplication is defined.) @@ -29,11 +30,11 @@ Ax = b \quad \Rightarrow \quad (A^{-1} \cdot A) x = A^{-1} \cdot b \quad \Righta Two questions: -1. How do we know if A^{-1} exists (A is non singular)? - \( \rightarrow Determinants \) +1. How do we know if $A^{-1}$ exists (A is non singular)? +\xrightarrow{\text{Determinants}} -2. How do we compute A^{-1}? -\( \rightarrow Gauss-Jordan elimination \) +2. How do we compute $A^{-1}$? +\xrightarrow{\text{Gauss-Jordan Elimination}} @@ -45,15 +46,16 @@ Finding the inverse of a is usually hard. There is a general definition using co For a 2x2 matrix -A = \[ +A = \ \begin{bmatrix} a & b \\ c & d \end{bmatrix} -\], +\$A^{-1}$ + + -\begin{itemize} - \item For a $2 \times 2$ matrix $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$, + \item For a $2 \times 2$ matrix $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$, \[ A^{-1} = \frac{1}{|A|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} \quad \text{(flip $a$ and $d$, change signs of $b$ and $c$)} @@ -67,7 +69,8 @@ A = \begin{bmatrix} 3 & 1 \\ 2 & 4 \end{bmatrix} \[ |A| = 3 \cdot 4 - 2 \cdot 1 = 12 - 2 = 10 -\] +\] + \[ A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} = \begin{bmatrix} 0.4 & -0.1 \\ -0.2 & 0.3 \end{bmatrix} @@ -76,7 +79,7 @@ A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} \textbf{Verify:} \[ -A^{-1}A = \frac{1}{10} +A^{-1}*A = 1/10 \begin{bmatrix} 4 & -1 \\ -2 & 3 @@ -85,17 +88,17 @@ A^{-1}A = \frac{1}{10} 3 & 1 \\ 2 & 4 \end{bmatrix} -= \frac{1}{10} += 1/10 \begin{bmatrix} 4 \cdot 3 + (-1) \cdot 2 & 4 \cdot 1 + (-1) \cdot 4 \\ -2 \cdot 3 + 3 \cdot 2 & -2 \cdot 1 + 3 \cdot 4 \end{bmatrix} -= \frac{1}{10} += 1/10 \begin{bmatrix} 12 - 2 & 4 - 4 \\ -6 + 6 & -2 + 12 \end{bmatrix} -= \frac{1}{10} += 1/10 \begin{bmatrix} 10 & 0 \\ 0 & 10 @@ -105,18 +108,17 @@ A^{-1}A = \frac{1}{10} 1 & 0 \\ 0 & 1 \end{bmatrix} -\] +\ For larger matrices, use the \textbf{Gauss-Jordan method} to solve \[ AA^{-1} = I \quad \text{(Generalization of } Ax = b \text{)} \] -\begin{itemize} - \item Form augmented matrix $\left[ A \,|\, I \right]$ \quad (an $n \times 2n$ matrix) - \item Perform row operations to bring the left side to $I$, so that: + + Form augmented matrix $\left[ A \,|\, I \right]$ (an $n \times 2n$ matrix) + Perform row operations to bring the left side to $I$, so that: \[ - \left[ I \,|\, A^{-1} \right] + \left[ I \,\middle|\, A^{-1} \right] \] - \item It may be helpful to check that $|A| \neq 0$ first, in case $A$ is not invertible. -\end{itemize} \ No newline at end of file + \item It may be helpful to check that $|A| \neq 0$ first, in case $A$ is not invertible. \ No newline at end of file From 71225cb8554e4bd5b654a38beb1358311e59f30f Mon Sep 17 00:00:00 2001 From: kes0195 Date: Sun, 13 Apr 2025 13:47:17 -0500 Subject: [PATCH 06/11] Changes #6 --- linear-algebra/inverses.md | 116 ++++++++++++++----------------------- 1 file changed, 45 insertions(+), 71 deletions(-) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index 163436337..95712a478 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -1,40 +1,44 @@ # Matrix inversion -Gauss-Jordan elimination works well for solving Ax = b but the process needs to be repeated for every new b. +Gauss-Jordan elimination works well for solving $Ax = b$ but the process needs to be repeated for every new b. Is there an alternative if we need to solve Ax = b for many different b? Matrix inverse. For a square (nxn) matrix A, the inverse $A^{-1}$ satisfies \[ -A $A^{-1}$ = $A^{-1}$ A = I +$A$ $A^{-1}$ = $A^{-1}$ $A$ = I \] where I is the nxn identity matrix -\ + \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} -\ + A matrix is "nonsingular" if it has an inverse, and "singular" if it does not. -If the inverse exists, it is \textit{unique} and can be used to solve $Ax = b$! +If the inverse exists, it is unique and can be used to solve $Ax = b$. \[ -Ax = b \Rightarrow (A^{-1}A)x = A^{-1}b \Rightarrow \boxed{x = A^{-1}b} +Ax = b +\xrightarrow{} (A^{-1}A)x = A^{-1}b +\xrightarrow{} \boxed{x = A^{-1}b} \] -(\(Ib = b\) if the multiplication is defined.) +(\(Ib = b\) if the multiplication is defined.) -Two questions: -1. How do we know if $A^{-1}$ exists (A is non singular)? -\xrightarrow{\text{Determinants}} -2. How do we compute $A^{-1}$? -\xrightarrow{\text{Gauss-Jordan Elimination}} +\textbf{Two questions:} +\begin{enumerate} + \item How do we know if $A^{-1}$ exists ($A$ is nonsingular)?\\ + \hspace*{1em} \(\Rightarrow\) Determinants + \item How do we compute $A^{-1}$?\\ + \hspace*{1em} \(\Rightarrow\) Gauss-Jordan Elimination +\end{enumerate} @@ -44,81 +48,51 @@ Two questions: Finding the inverse of a is usually hard. There is a general definition using coafactors that we will not cover becuase it is hard to apply. There are also serveral numeric techniques, but we will not cover them because they are computationally intensive. Instead we will cover two options: -For a 2x2 matrix - -A = \ -\begin{bmatrix} -a & b \\ -c & d -\end{bmatrix} -\$A^{-1}$ +### Inverse of a 2×2 Matrix +For a 2×2 matrix +\[ +A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, +\] +the inverse is given by: +\[ +A^{-1} = \frac{1}{|A|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} +\] +*(flip a & d, change signs of b & c)* +--- - \item For a $2 \times 2$ matrix $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$, - \[ - A^{-1} = \frac{1}{|A|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} - \quad \text{(flip $a$ and $d$, change signs of $b$ and $c$)} - \] -\end{itemize} +### Example: -\textbf{Example:} +Let \[ A = \begin{bmatrix} 3 & 1 \\ 2 & 4 \end{bmatrix} \] +Compute the determinant: \[ -|A| = 3 \cdot 4 - 2 \cdot 1 = 12 - 2 = 10 +|A| = (3)(4) - (2)(1) = 12 - 2 = 10 \] +So the inverse is: \[ A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} = \begin{bmatrix} 0.4 & -0.1 \\ -0.2 & 0.3 \end{bmatrix} \] - -\textbf{Verify:} -\[ -A^{-1}*A = 1/10 -\begin{bmatrix} -4 & -1 \\ --2 & 3 -\end{bmatrix} -\begin{bmatrix} -3 & 1 \\ -2 & 4 -\end{bmatrix} -= 1/10 -\begin{bmatrix} -4 \cdot 3 + (-1) \cdot 2 & 4 \cdot 1 + (-1) \cdot 4 \\ --2 \cdot 3 + 3 \cdot 2 & -2 \cdot 1 + 3 \cdot 4 -\end{bmatrix} -= 1/10 -\begin{bmatrix} -12 - 2 & 4 - 4 \\ --6 + 6 & -2 + 12 -\end{bmatrix} -= 1/10 -\begin{bmatrix} -10 & 0 \\ -0 & 10 -\end{bmatrix} -= -\begin{bmatrix} -1 & 0 \\ -0 & 1 -\end{bmatrix} -\ - -For larger matrices, use the \textbf{Gauss-Jordan method} to solve -\[ +For larger matrices, use the **Gauss–Jordan method** to solve +$$ AA^{-1} = I \quad \text{(Generalization of } Ax = b \text{)} -\] +$$ + +- Form augmented matrix + $$ + \left[ A \,\middle|\, I \right] \quad \text{(}n \times 2n\text{)} + $$ +- Perform row operations to bring left side to $I$, so + $$ + \left[ I \,\middle|\, A^{-1} \right] + $$ - Form augmented matrix $\left[ A \,|\, I \right]$ (an $n \times 2n$ matrix) - Perform row operations to bring the left side to $I$, so that: - \[ - \left[ I \,\middle|\, A^{-1} \right] - \] - \item It may be helpful to check that $|A| \neq 0$ first, in case $A$ is not invertible. \ No newline at end of file +- It may be helpful to check $|A| \neq 0$ first, in case $A$ is not invertible. \ No newline at end of file From e78dee3d9dcdcda0c4ea9a0c37f7c7008ee2a6a3 Mon Sep 17 00:00:00 2001 From: kes0195 Date: Sun, 13 Apr 2025 14:02:19 -0500 Subject: [PATCH 07/11] Changes #6 --- linear-algebra/inverses.md | 67 ++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index 95712a478..6c19349b3 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -21,24 +21,21 @@ A matrix is "nonsingular" if it has an inverse, and "singular" if it does not. If the inverse exists, it is unique and can be used to solve $Ax = b$. -\[ +$$ Ax = b \xrightarrow{} (A^{-1}A)x = A^{-1}b \xrightarrow{} \boxed{x = A^{-1}b} -\] - +$$ -(\(Ib = b\) if the multiplication is defined.) +(*Note: \(Ib = b\) if the multiplication is defined.*) +**Two questions:** +1. How do we know if \( A^{-1} \) exists (i.e., \( A \) is nonsingular)? + ⇒ Determinants -\textbf{Two questions:} -\begin{enumerate} - \item How do we know if $A^{-1}$ exists ($A$ is nonsingular)?\\ - \hspace*{1em} \(\Rightarrow\) Determinants - \item How do we compute $A^{-1}$?\\ - \hspace*{1em} \(\Rightarrow\) Gauss-Jordan Elimination -\end{enumerate} +2. How do we compute \( A^{-1} \)? + ⇒ Gauss-Jordan Elimination @@ -48,51 +45,51 @@ Ax = b Finding the inverse of a is usually hard. There is a general definition using coafactors that we will not cover becuase it is hard to apply. There are also serveral numeric techniques, but we will not cover them because they are computationally intensive. Instead we will cover two options: -### Inverse of a 2×2 Matrix +Inverse of a $2 \times 2$ Matrix -For a 2×2 matrix -\[ +For a $2 \times 2$ matrix +$$ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, -\] -the inverse is given by: -\[ -A^{-1} = \frac{1}{|A|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} -\] -*(flip a & d, change signs of b & c)* +$$ +the inverse is given by +$$ +A^{-1} = \frac{1}{\lvert A \rvert} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} +$$ +*(Flip $a$ and $d$, change the signs of $b$ and $c$)* ---- -### Example: +--- + Example: Let -\[ +$ A = \begin{bmatrix} 3 & 1 \\ 2 & 4 \end{bmatrix} -\] +$ Compute the determinant: -\[ +$ |A| = (3)(4) - (2)(1) = 12 - 2 = 10 -\] +$ So the inverse is: -\[ -A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} +$ +A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} = \begin{bmatrix} 0.4 & -0.1 \\ -0.2 & 0.3 \end{bmatrix} -\] +$ For larger matrices, use the **Gauss–Jordan method** to solve -$$ +$ AA^{-1} = I \quad \text{(Generalization of } Ax = b \text{)} -$$ +$ - Form augmented matrix - $$ + $ \left[ A \,\middle|\, I \right] \quad \text{(}n \times 2n\text{)} - $$ + $ - Perform row operations to bring left side to $I$, so - $$ + $ \left[ I \,\middle|\, A^{-1} \right] - $$ + $ - It may be helpful to check $|A| \neq 0$ first, in case $A$ is not invertible. \ No newline at end of file From 315a6c920d4bad192b3b0ea77a792fb6281fe125 Mon Sep 17 00:00:00 2001 From: kes0195 Date: Sun, 13 Apr 2025 14:09:06 -0500 Subject: [PATCH 08/11] Changes #7 --- linear-algebra/inverses.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index 6c19349b3..d649cfbca 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -31,10 +31,10 @@ $$ **Two questions:** -1. How do we know if \( A^{-1} \) exists (i.e., \( A \) is nonsingular)? +1. How do we know if \( $A^{-1}$ \) exists (i.e., \( A \) is nonsingular)? ⇒ Determinants -2. How do we compute \( A^{-1} \)? +2. How do we compute \( $A^{-1}$ \)? ⇒ Gauss-Jordan Elimination @@ -48,14 +48,12 @@ Finding the inverse of a is usually hard. There is a general definition using co Inverse of a $2 \times 2$ Matrix For a $2 \times 2$ matrix -$$ +$ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, $$ -the inverse is given by -$$ -A^{-1} = \frac{1}{\lvert A \rvert} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} + = \frac{1}{\lvert A \rvert} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} $$ -*(Flip $a$ and $d$, change the signs of $b$ and $c$)* +(Flip `a` and `d`, change the signs of `b` and `c`) --- From 863e0c7225a11d2c488ba386862639af6ebcbc82 Mon Sep 17 00:00:00 2001 From: Michael Howard Date: Sat, 19 Apr 2025 21:04:23 -0500 Subject: [PATCH 09/11] Run pre-commit --- linear-algebra/inverses.md | 49 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index d649cfbca..8122f6d52 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -1,5 +1,7 @@ # Matrix inversion -Gauss-Jordan elimination works well for solving $Ax = b$ but the process needs to be repeated for every new b. + +Gauss-Jordan elimination works well for solving $Ax = b$ but the process needs +to be repeated for every new b. Is there an alternative if we need to solve Ax = b for many different b? @@ -7,23 +9,22 @@ Matrix inverse. For a square (nxn) matrix A, the inverse $A^{-1}$ satisfies \[ $A$ $A^{-1}$ = $A^{-1}$ $A$ = I -\] where I is the nxn identity matrix +\] +where I is the nxn identity matrix \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} - A matrix is "nonsingular" if it has an inverse, and "singular" if it does not. - If the inverse exists, it is unique and can be used to solve $Ax = b$. $$ -Ax = b -\xrightarrow{} (A^{-1}A)x = A^{-1}b +Ax = b +\xrightarrow{} (A^{-1}A)x = A^{-1}b \xrightarrow{} \boxed{x = A^{-1}b} $$ @@ -31,63 +32,61 @@ $$ **Two questions:** -1. How do we know if \( $A^{-1}$ \) exists (i.e., \( A \) is nonsingular)? +1. How do we know if \( $A^{-1}$ \) exists (i.e., \( A \) is nonsingular)? ⇒ Determinants -2. How do we compute \( $A^{-1}$ \)? +2. How do we compute \( $A^{-1}$ \)? ⇒ Gauss-Jordan Elimination - - - - 2: Inverse -Finding the inverse of a is usually hard. There is a general definition using coafactors that we will not cover becuase it is hard to apply. There are also serveral numeric techniques, but we will not cover them because they are computationally intensive. Instead we will cover two options: +Finding the inverse of a is usually hard. There is a general definition using +coafactors that we will not cover becuase it is hard to apply. There are also +serveral numeric techniques, but we will not cover them because they are +computationally intensive. Instead we will cover two options: Inverse of a $2 \times 2$ Matrix -For a $2 \times 2$ matrix +For a $2 \times 2$ matrix $ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, -$$ +$$ = \frac{1}{\lvert A \rvert} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} -$$ +$$ (Flip `a` and `d`, change the signs of `b` and `c`) - --- Example: -Let +Let $ A = \begin{bmatrix} 3 & 1 \\ 2 & 4 \end{bmatrix} $ -Compute the determinant: +Compute the determinant: $ |A| = (3)(4) - (2)(1) = 12 - 2 = 10 $ -So the inverse is: +So the inverse is: $ -A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} +A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} = \begin{bmatrix} 0.4 & -0.1 \\ -0.2 & 0.3 \end{bmatrix} $ -For larger matrices, use the **Gauss–Jordan method** to solve +For larger matrices, use the **Gauss–Jordan method** to solve $ AA^{-1} = I \quad \text{(Generalization of } Ax = b \text{)} $ -- Form augmented matrix +- Form augmented matrix $ \left[ A \,\middle|\, I \right] \quad \text{(}n \times 2n\text{)} $ -- Perform row operations to bring left side to $I$, so +- Perform row operations to bring left side to $I$, so $ \left[ I \,\middle|\, A^{-1} \right] $ -- It may be helpful to check $|A| \neq 0$ first, in case $A$ is not invertible. \ No newline at end of file +- It may be helpful to check $|A| \neq 0$ first, in case $A$ is not invertible. From 6d72f6bf5f4beabcf81aad7d57829c26efad27e8 Mon Sep 17 00:00:00 2001 From: Michael Howard Date: Sat, 19 Apr 2025 21:27:31 -0500 Subject: [PATCH 10/11] Revise some text and formatting --- linear-algebra/inverses.md | 129 ++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 65 deletions(-) diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index 8122f6d52..ca6230666 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -1,92 +1,91 @@ # Matrix inversion -Gauss-Jordan elimination works well for solving $Ax = b$ but the process needs -to be repeated for every new b. +## Motivation and definition -Is there an alternative if we need to solve Ax = b for many different b? +Gauss-Jordan elimination works well for solving **Ax** = **b**, but the process +needs to be repeated for every new **b**. Is there an alternative if we need to +solve **Ax** = **b** for many different **b**? -Matrix inverse. For a square (nxn) matrix A, the inverse $A^{-1}$ satisfies +```{topic} Matrix inverse +For a square (*n* x *n*) matrix **A**, the inverse $\vv{A}^{-1}$ satisfies -\[ -$A$ $A^{-1}$ = $A^{-1}$ $A$ = I -\] +\begin{equation} +\vv{A} \vv{A}^{-1} = \vv{A}^{-1} \vv{A} = \vv{I} +\end{equation} -where I is the nxn identity matrix +where **I** is the *n* x *n* identity matrix. +``` -\begin{bmatrix} -1 & 0 \\ -0 & 1 -\end{bmatrix} +A matrix is called *nonsingular* or *invertible* if it has an inverse, but +*singular* if it does not. -A matrix is "nonsingular" if it has an inverse, and "singular" if it does not. +```{topic} Invertible matrix theorem -If the inverse exists, it is unique and can be used to solve $Ax = b$. +**A** is invertible if and only if the determinant of **A** is nonzero. -$$ -Ax = b -\xrightarrow{} (A^{-1}A)x = A^{-1}b -\xrightarrow{} \boxed{x = A^{-1}b} -$$ +(There are many more such conditions!) -(*Note: \(Ib = b\) if the multiplication is defined.*) +``` -**Two questions:** +If the inverse of **A** exists, it is unique and can be used to +solve **Ax** = **b**. -1. How do we know if \( $A^{-1}$ \) exists (i.e., \( A \) is nonsingular)? - ⇒ Determinants +\begin{align} +\vv{A} \vv{x} &= \vv{b} \\ +\vv{A}^{-1} \vv{A} \vv{x} &= \vv{A}^{-1} \vv{b} \\ +\vv{x} &= \vv{A}^{-1} \vv{b} +\end{align} -2. How do we compute \( $A^{-1}$ \)? - ⇒ Gauss-Jordan Elimination +Finding the inverse of **A** is usually hard. There is a general definition +based on cofactors, as well as advanced numerical methods, that we will not +cover. Instead, we focus on two options: a formula for 2 x 2 matrices, and +use of Gauss-Jordan elimination for larger matrices. -2: Inverse +## Inverse of a 2 x 2 matrix -Finding the inverse of a is usually hard. There is a general definition using -coafactors that we will not cover becuase it is hard to apply. There are also -serveral numeric techniques, but we will not cover them because they are -computationally intensive. Instead we will cover two options: +For a 2 x 2 matrix, -Inverse of a $2 \times 2$ Matrix +\begin{equation} +\vv{A} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, +\end{equation} -For a $2 \times 2$ matrix -$ -A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, -$$ - = \frac{1}{\lvert A \rvert} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} -$$ -(Flip `a` and `d`, change the signs of `b` and `c`) +the matrix inverse is ---- - Example: +\begin{equation} +\vv{A}^{-1} = \frac{1}{|\vv{A}|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} +\end{equation} -Let -$ -A = \begin{bmatrix} 3 & 1 \\ 2 & 4 \end{bmatrix} -$ +(Flip *a* and *d*, change the signs of *b* and *c*.) -Compute the determinant: -$ -|A| = (3)(4) - (2)(1) = 12 - 2 = 10 -$ +```{example} 2 x 2 inverse +To find the inverse of -So the inverse is: -$ -A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} +\begin{equation} +\vv{A} = \begin{bmatrix} 3 & 1 \\ 2 & 4 \end{bmatrix} +\end{equation} + +First, compute its determinant: + +\begin{equation} +|\vv{A}| = 3 \times 4 - 2 \times 1 = 12 - 2 = 10 +\end{equation} + +Then, compute its inverse + +\begin{equation} +\vv{A}^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} = \begin{bmatrix} 0.4 & -0.1 \\ -0.2 & 0.3 \end{bmatrix} -$ +\end{equation} + +``` + +## Inverses using Gauss-Jordan elimination -For larger matrices, use the **Gauss–Jordan method** to solve -$ -AA^{-1} = I \quad \text{(Generalization of } Ax = b \text{)} -$ +For larger matrices, we can use [Gauss–Jordan elimination](gauss-jordan.md) to +solve $\vv{A} \vv{A}^{-1} = \vv{I}$ as a generalization of **Ax** = **b**. -- Form augmented matrix - $ - \left[ A \,\middle|\, I \right] \quad \text{(}n \times 2n\text{)} - $ +- Check that $|\vv{A}| \ne 0$ (i.e., **A** is invertible). -- Perform row operations to bring left side to $I$, so - $ - \left[ I \,\middle|\, A^{-1} \right] - $ +- Form the 2*n* x *n* augmented matrix $[ \vv{A} \, | \, \vv{I} ]$ -- It may be helpful to check $|A| \neq 0$ first, in case $A$ is not invertible. +- Perform row operations to bring to $[ \vv{I} \, | \, \vv{A}^{-1} ]$. From 0c333ba0a3c05dddf700f975da707f5abfc3a043 Mon Sep 17 00:00:00 2001 From: Michael Howard Date: Sat, 19 Apr 2025 21:29:53 -0500 Subject: [PATCH 11/11] Add Katie Sorensen to credits --- credits.md | 1 + linear-algebra/inverses.md | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/credits.md b/credits.md index d25cdaea5..086fda702 100644 --- a/credits.md +++ b/credits.md @@ -10,6 +10,7 @@ This work (c) 2025 is licensed under - Michael P. Howard - Evan M. Hughes - Michelle Schindler +- Katie Sorensen ## Attributions diff --git a/linear-algebra/inverses.md b/linear-algebra/inverses.md index ca6230666..56796f01f 100644 --- a/linear-algebra/inverses.md +++ b/linear-algebra/inverses.md @@ -24,7 +24,6 @@ A matrix is called *nonsingular* or *invertible* if it has an inverse, but **A** is invertible if and only if the determinant of **A** is nonzero. (There are many more such conditions!) - ``` If the inverse of **A** exists, it is unique and can be used to @@ -76,7 +75,6 @@ Then, compute its inverse \vv{A}^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix} = \begin{bmatrix} 0.4 & -0.1 \\ -0.2 & 0.3 \end{bmatrix} \end{equation} - ``` ## Inverses using Gauss-Jordan elimination