Problem
In Problems 1-4, two matrices \(A\) and \(B\) and two numbers \(c\) and \(d\) are given. Compute the matrix \(cA+dB\)\[ A=\begin {bmatrix} 5 & 0\\ 0 & 7\\ 3 & -1 \end {bmatrix} ,B=\begin {bmatrix} -4 & 5\\ 3 & 2\\ 7 & 4 \end {bmatrix} ,c=-2,d=4 \] Solution\begin {align*} cA+dB & =-2\begin {bmatrix} 5 & 0\\ 0 & 7\\ 3 & -1 \end {bmatrix} +4\begin {bmatrix} -4 & 5\\ 3 & 2\\ 7 & 4 \end {bmatrix} \\ & =\begin {bmatrix} -10 & 0\\ 0 & -14\\ -6 & 2 \end {bmatrix} +\begin {bmatrix} -16 & 20\\ 12 & 8\\ 28 & 16 \end {bmatrix} \\ & =\begin {bmatrix} -26 & 20\\ 12 & -6\\ 22 & 18 \end {bmatrix} \end {align*}
Problem
In Problems 5-12, two matrices \(A\) and \(B\) are given. Calculate whichever of the matrices \(AB\) and \(BA\) is defined.\[ A=\begin {bmatrix} 2 & -1\\ 3 & 2 \end {bmatrix} ,B=\begin {bmatrix} -4 & 2\\ 1 & 3 \end {bmatrix} \] Solution
\(A\) dimension is \(2\times 2\) and \(B\) dimension is \(2\times 2\). So inner dimensions agree. Both \(AB\) and \(BA\) are defined. Using definition of matrix multiplication we obtain\begin {align*} AB & =\begin {bmatrix} 2 & -1\\ 3 & 2 \end {bmatrix}\begin {bmatrix} -4 & 2\\ 1 & 3 \end {bmatrix} \\ & =\begin {bmatrix} -9 & 1\\ -10 & 12 \end {bmatrix} \end {align*}
And\begin {align*} BA & =\begin {bmatrix} -4 & 2\\ 1 & 3 \end {bmatrix}\begin {bmatrix} 2 & -1\\ 3 & 2 \end {bmatrix} \\ & =\begin {bmatrix} -2 & 8\\ 11 & 5 \end {bmatrix} \end {align*}
Problem\[ A=\begin {bmatrix} 1 & 0 & 3\\ 2 & -5 & 4 \end {bmatrix} ,B=\begin {bmatrix} 3 & 0\\ -1 & 4\\ 6 & 5 \end {bmatrix} \] Solution
\(A\) dimension is \(2\times 3\) and \(B\) dimension is \(3\times 2\). Hence \(AB\) is \(\left ( 2\times 3\right ) \left ( 3\times 2\right ) =2\times 2\) matrix. Therefore inner dimensions agree. And \(BA\) is define since\(\ \left ( 3\times 2\right ) \left ( 2\times 3\right ) =3\times 3\). Therefore inner dimensions agree.\begin {align*} AB & =\begin {bmatrix} 1 & 0 & 3\\ 2 & -5 & 4 \end {bmatrix}\begin {bmatrix} 3 & 0\\ -1 & 4\\ 6 & 5 \end {bmatrix} \\ & =\begin {bmatrix} 21 & 15\\ 35 & 0 \end {bmatrix} \end {align*}
And\begin {align*} BA & =\begin {bmatrix} 3 & 0\\ -1 & 4\\ 6 & 5 \end {bmatrix}\begin {bmatrix} 1 & 0 & 3\\ 2 & -5 & 4 \end {bmatrix} \\ & =\begin {bmatrix} 3 & 0 & 9\\ 7 & -20 & 13\\ 16 & -25 & 38 \end {bmatrix} \end {align*}
Problem\[ A=\begin {bmatrix} 3 & -5 \end {bmatrix} ,B=\begin {bmatrix} 2 & 7 & 5 & 6\\ -1 & 4 & 2 & 3 \end {bmatrix} \] Solution
\(A\) dimension is \(1\times 2\) and \(B\) dimension is \(2\times 4\). Hence \(AB\) is \(\left ( 1\times 2\right ) \left ( 2\times 4\right ) =1\times 4\) matrix. Therefore inner dimensions agree. And \(BA\) is not defined since\(\ \left ( 2\times 4\right ) \left ( 1\times 2\right ) \). Therefore inner dimensions do not agree. So only \(AB\) is defined here.\begin {align*} AB & =\begin {bmatrix} 3 & -5 \end {bmatrix}\begin {bmatrix} 2 & 7 & 5 & 6\\ -1 & 4 & 2 & 3 \end {bmatrix} \\ & =\begin {bmatrix} 11 & 1 & 5 & 3 \end {bmatrix} \end {align*}
Problem
In Problems 1-8, first apply the formulas in (9) to find \(A^{-1}\). Then use \(A^{-1}\) (as in Example 5) to solve the system \(Ax=b\).\[ A=\begin {bmatrix} 6 & 7\\ 5 & 6 \end {bmatrix} ,b=\begin {bmatrix} 2\\ -3 \end {bmatrix} \] Solution
Formula (9) is \begin {align*} A & =\begin {bmatrix} a & b\\ c & d \end {bmatrix} \\ A^{-1} & =\frac {1}{ad-bc}\begin {bmatrix} d & -b\\ -c & a \end {bmatrix} \end {align*}
Therefore\begin {align*} \begin {bmatrix} 6 & 7\\ 5 & 6 \end {bmatrix} ^{-1} & =\frac {1}{36-35}\begin {bmatrix} 6 & -7\\ -5 & 6 \end {bmatrix} \\ & =\begin {bmatrix} 6 & -7\\ -5 & 6 \end {bmatrix} \end {align*}
Hence \begin {align*} x & =A^{-1}b\\ & =\begin {bmatrix} 6 & -7\\ -5 & 6 \end {bmatrix}\begin {bmatrix} 2\\ -3 \end {bmatrix} \\ & =\begin {bmatrix} 33\\ -28 \end {bmatrix} \end {align*}
Problem
In Problems 9-22, use the method of Example 7 to find the inverse \(A^{-1}\) of each given matrix \(A\).\[ A=\begin {bmatrix} 5 & 7\\ 4 & 6 \end {bmatrix} \] Solution
The augmented matrix is\[\begin {bmatrix} 5 & 7 & 1 & 0\\ 4 & 6 & 0 & 1 \end {bmatrix} \] \(R_{1}\rightarrow R_{1}-R_{2}\) gives\[\begin {bmatrix} 1 & 1 & 1 & -1\\ 4 & 6 & 0 & 1 \end {bmatrix} \] \(R_{2}\rightarrow -4R_{1}+R_{2}\) gives\[\begin {bmatrix} 1 & 1 & 1 & -1\\ 0 & 2 & -4 & 5 \end {bmatrix} \] \(R_{2}\rightarrow \frac {1}{2}R_{2}\) gives\[\begin {bmatrix} 1 & 1 & 1 & -1\\ 0 & 1 & -2 & \frac {5}{2}\end {bmatrix} \] \(R_{1}\rightarrow R_{1}-R_{2}\) gives\[\begin {bmatrix} 1 & 0 & 3 & -\frac {7}{2}\\ 0 & 1 & -2 & \frac {5}{2}\end {bmatrix} \] Since the left side of the augments matrix is now the identity matrix, then we read \(A^{-1}\) from the right side. Hence\begin {align*} A^{-1} & =\begin {bmatrix} 3 & -\frac {7}{2}\\ -2 & \frac {5}{2}\end {bmatrix} \\ & =\frac {1}{2}\begin {bmatrix} 6 & -7\\ -4 & 5 \end {bmatrix} \end {align*}
Problem\[ A=\begin {bmatrix} 1 & -3 & -3\\ -1 & 1 & 2\\ 2 & -3 & -3 \end {bmatrix} \] Solution
The augmented matrix is\[ A=\begin {bmatrix} 1 & -3 & -3 & 1 & 0 & 0\\ -1 & 1 & 2 & 0 & 1 & 0\\ 2 & -3 & -3 & 0 & 0 & 1 \end {bmatrix} \] \(R_{2}\rightarrow R_{1}+R_{2}\) gives\[ A=\begin {bmatrix} 1 & -3 & -3 & 1 & 0 & 0\\ 0 & -2 & -1 & 1 & 1 & 0\\ 2 & -3 & -3 & 0 & 0 & 1 \end {bmatrix} \] \(R_{2}\rightarrow -\left ( 2\right ) R_{1}+R_{3}\) gives\[ A=\begin {bmatrix} 1 & -3 & -3 & 1 & 0 & 0\\ 0 & -2 & -1 & 1 & 1 & 0\\ 0 & 3 & 3 & -2 & 0 & 1 \end {bmatrix} \] \(R_{2}\rightarrow 3R_{2}\) and \(R_{3}\rightarrow 2R_{3}\) gives\[ A=\begin {bmatrix} 1 & -3 & -3 & 1 & 0 & 0\\ 0 & -6 & -3 & 3 & 3 & 0\\ 0 & 6 & 6 & -4 & 0 & 2 \end {bmatrix} \] \(R_{3}\rightarrow R_{2}+R_{3}\) gives\[ A=\begin {bmatrix} 1 & -3 & -3 & 1 & 0 & 0\\ 0 & -6 & -3 & 3 & 3 & 0\\ 0 & 0 & 3 & -1 & 3 & 2 \end {bmatrix} \] \(R_{2}\rightarrow R_{2}+R_{3}\) gives\[ A=\begin {bmatrix} 1 & -3 & -3 & 1 & 0 & 0\\ 0 & -6 & 0 & 2 & 6 & 2\\ 0 & 0 & 3 & -1 & 3 & 2 \end {bmatrix} \] \(R_{1}\rightarrow R_{1}+R_{3}\) gives\[ A=\begin {bmatrix} 1 & -3 & 0 & 0 & 3 & 2\\ 0 & -6 & 0 & 2 & 6 & 2\\ 0 & 0 & 3 & -1 & 3 & 2 \end {bmatrix} \] \(R_{1}\rightarrow R_{1}-\frac {1}{2}R_{2}\) gives\[ A=\begin {bmatrix} 1 & 0 & 0 & -1 & 0 & 1\\ 0 & -6 & 0 & 2 & 6 & 2\\ 0 & 0 & 3 & -1 & 3 & 2 \end {bmatrix} \] \(R_{2}\rightarrow \frac {-1}{6}R_{2}\) gives\[ A=\begin {bmatrix} 1 & 0 & 0 & -1 & 0 & 1\\ 0 & 1 & 0 & -\frac {1}{3} & -1 & \frac {-1}{3}\\ 0 & 0 & 3 & -1 & 3 & 2 \end {bmatrix} \] \(R_{3}\rightarrow \frac {1}{3}R_{3}\) gives\[ A=\begin {bmatrix} 1 & 0 & 0 & -1 & 0 & 1\\ 0 & 1 & 0 & -\frac {1}{3} & -1 & \frac {-1}{3}\\ 0 & 0 & 1 & -\frac {1}{3} & 1 & \frac {2}{3}\end {bmatrix} \] Since the left side of the augments matrix is now the identity matrix, then we read \(A^{-1}\) from the right side. Hence\begin {align*} A^{-1} & =\begin {bmatrix} -1 & 0 & 1\\ -\frac {1}{3} & -1 & \frac {-1}{3}\\ -\frac {1}{3} & 1 & \frac {2}{3}\end {bmatrix} \\ & =\frac {1}{3}\begin {bmatrix} -3 & 0 & 3\\ -1 & -3 & -1\\ -1 & 3 & 2 \end {bmatrix} \end {align*}
Problem
Use cofactor expansions to evaluate the determinants in Problems 1-6. Expand along the row or column that minimizes the
amount of computation that is required.\[ A=\begin {bmatrix} 5 & 11 & 8 & 7\\ 3 & -2 & 6 & 23\\ 0 & 0 & 0 & -3\\ 0 & 4 & 0 & 17 \end {bmatrix} \] Solution
Row \(4\) has most zeros. Hence expansion is on row 4. \begin {align*} \left \vert A\right \vert & =\left ( -\right ) \left ( -3\right ) \begin {vmatrix} 5 & 11 & 8\\ 3 & -2 & 6\\ 0 & 4 & 0 \end {vmatrix} \\ & =3\begin {vmatrix} 5 & 11 & 8\\ 3 & -2 & 6\\ 0 & 4 & 0 \end {vmatrix} \end {align*}
For \(\begin {vmatrix} 5 & 11 & 8\\ 3 & -2 & 6\\ 0 & 4 & 0 \end {vmatrix} \) we expand on 3rd row. The above becomes\begin {align*} \left \vert A\right \vert & =3\left ( \left ( -\right ) 4\begin {vmatrix} 5 & 8\\ 3 & 6 \end {vmatrix} \right ) \\ & =-12\begin {vmatrix} 5 & 8\\ 3 & 6 \end {vmatrix} \\ & =-12\left ( 30-24\right ) \end {align*}
Therefore\[ \left \vert A\right \vert =-72 \]
Problem
In Problems 7-12, evaluate each given determinant after first simplifying the computation (as in Example 6) by adding an appropriate multiple of some row or column to another.\[ A=\begin {bmatrix} 3 & -2 & 5\\ 0 & 5 & 17\\ 6 & -4 & 12 \end {bmatrix} \] Solution
Adding multiple of some row to another row does not change the determinant of a matrix. Same for adding multiple of some column to another column. We can take advantage of this to add more zeros to the matrix before applying the cofactor method to reduce the computation needed.
Let \(R_{3}\rightarrow -2R_{1}+R_{3}\) gives\[ A=\begin {bmatrix} 3 & -2 & 5\\ 0 & 5 & 17\\ 0 & 0 & 2 \end {bmatrix} \] Expansion on third row now gives\begin {align*} \left \vert A\right \vert & =\left ( +\right ) 2\begin {vmatrix} 3 & -2\\ 0 & 5 \end {vmatrix} \\ & =2\left ( 15\right ) \end {align*}
Therefore\[ \left \vert A\right \vert =30 \]
Problem
Use Cramer’s rule to solve the systems in Problems 21-32.\begin {align*} 3x+4y & =2\\ 5x+7y & =1 \end {align*}
Solution
The system in matrix form is\[\begin {bmatrix} 3 & 4\\ 5 & 7 \end {bmatrix}\begin {bmatrix} x\\ y \end {bmatrix} =\begin {bmatrix} 2\\ 1 \end {bmatrix} \] Hence using Cramer’s rule\[ x=\frac {\begin {vmatrix} 2 & 4\\ 1 & 7 \end {vmatrix} }{\begin {vmatrix} 3 & 4\\ 5 & 7 \end {vmatrix} }=\frac {14-4}{21-20}=10 \] And\[ y=\frac {\begin {vmatrix} 3 & 2\\ 5 & 1 \end {vmatrix} }{\begin {vmatrix} 3 & 4\\ 5 & 7 \end {vmatrix} }=\frac {3-10}{21-20}=-7 \] Hence the solution is\[\begin {bmatrix} x\\ y \end {bmatrix} =\begin {bmatrix} 10\\ -7 \end {bmatrix} \]
Problem
Give an example of matrices \(A\) and \(B\) where \(AB=BA\)
Solution
Let \(A=\begin {bmatrix} a & b\\ c & d \end {bmatrix} ,B=\begin {bmatrix} e & f\\ g & h \end {bmatrix} \). Then\begin {align} AB & =\begin {bmatrix} a & b\\ c & d \end {bmatrix}\begin {bmatrix} e & f\\ g & h \end {bmatrix} \nonumber \\ & =\begin {bmatrix} ae+bg & af+bh\\ ce+dg & cf+dh \end {bmatrix} \tag {1} \end {align}
And\begin {align} BA & =\begin {bmatrix} e & f\\ g & h \end {bmatrix}\begin {bmatrix} a & b\\ c & d \end {bmatrix} \nonumber \\ & =\begin {bmatrix} ae+cf & be+df\\ ag+ch & bg+dh \end {bmatrix} \tag {2} \end {align}
For (1,2) to be equal implies that\begin {align*} ae+bg & =ae+cf\\ af+bh & =be+df\\ ce+dg & =ag+ch\\ cf+dh & =bg+dh \end {align*}
Simplifying gives\begin {align*} bg & =cf\\ af+bh & =be+df\\ ce+dg & =ag+ch\\ cf & =bg \end {align*}
First equation is the same as the fourth. Hence the above becomes\begin {align*} bg & =cf\\ af+bh & =be+df\\ ce+dg & =ag+ch \end {align*}
Let \(a=1,b=2,c=3,d=4,e=5,f=6\). The above becomes\begin {align*} 2g & =18\\ 6+2h & =10+24\\ 15+4g & =g+3h \end {align*}
or\begin {align*} g & =9\\ h & =14 \end {align*}
Hence and example is\begin {align*} A & =\begin {bmatrix} a & b\\ c & d \end {bmatrix} =\begin {bmatrix} 1 & 2\\ 3 & 4 \end {bmatrix} \\ B & =\begin {bmatrix} e & f\\ g & h \end {bmatrix} =\begin {bmatrix} 5 & 6\\ 9 & 14 \end {bmatrix} \end {align*}
To verify\begin {align*} AB & =\begin {bmatrix} 1 & 2\\ 3 & 4 \end {bmatrix}\begin {bmatrix} 5 & 6\\ 9 & 14 \end {bmatrix} =\begin {bmatrix} 23 & 34\\ 51 & 74 \end {bmatrix} \\ BA & =\begin {bmatrix} 5 & 6\\ 9 & 14 \end {bmatrix}\begin {bmatrix} 1 & 2\\ 3 & 4 \end {bmatrix} =\begin {bmatrix} 23 & 34\\ 51 & 74 \end {bmatrix} \end {align*}
Problem
Give an example of matrices \(C\) and \(D\) where \(CD\) \(\neq DC.\)
Solution
From the last problem, we found a solution that makes \(CD\) \(=DC\) to be \begin {align*} g & =9\\ h & =14 \end {align*}
So any other value will make \(CD\) \(\neq DC\). Hence an example is\begin {align*} C & =\begin {bmatrix} a & b\\ c & d \end {bmatrix} =\begin {bmatrix} 1 & 2\\ 3 & 4 \end {bmatrix} \\ D & =\begin {bmatrix} e & f+1\\ g & h \end {bmatrix} =\begin {bmatrix} 5 & 6+1\\ 9 & 14 \end {bmatrix} =\begin {bmatrix} 5 & 7\\ 9 & 14 \end {bmatrix} \end {align*}
To verify\[ CD=\begin {bmatrix} 1 & 2\\ 3 & 4 \end {bmatrix}\begin {bmatrix} 5 & 7\\ 9 & 14 \end {bmatrix} =\begin {bmatrix} 23 & 35\\ 51 & 77 \end {bmatrix} \] But\[ DC=\begin {bmatrix} 5 & 7\\ 9 & 14 \end {bmatrix}\begin {bmatrix} 1 & 2\\ 3 & 4 \end {bmatrix} =\begin {bmatrix} 26 & 38\\ 51 & 74 \end {bmatrix} \] Hence \(CD\) \(\neq DC\)
Problem
Let \(A;B\), and \(C\) be invertible \(n\times n\) matrices. Is the product \(ABC\) invertible? If it is invertible, what is \(\left ( ABC\right ) ^{-1}\)?
Solution
Let \(ABC=D\). Premultiplying both sides by \(A^{-1}\) gives\begin {align*} A^{-1}ABC & =A^{-1}D\\ BC & =A^{-1}D \end {align*}
Premultiplying both sides by \(B^{-1}\) gives\begin {align*} B^{-1}BC & =B^{-1}A^{-1}D\\ B & =B^{-1}A^{-1}D \end {align*}
Premultiplying both sides by \(C^{-1}\) gives\begin {equation} I=\left ( C^{-1}B^{-1}A^{-1}\right ) D \tag {1} \end {equation} Starting with \(ABC=D\) again, but now post multiplying both sides by \(C^{-1}\) gives\begin {align*} ABCC^{-1} & =DC^{-1}\\ AB & =DC^{-1} \end {align*}
Post multiplying both sides by \(B^{-1}\) gives\begin {align*} ABB^{-1} & =DC^{-1}B^{-1}\\ A & =DC^{-1}B^{-1} \end {align*}
Post multiplying both sides by \(A^{-1}\) gives\begin {equation} I=D\left ( C^{-1}B^{-1}A^{-1}\right ) \tag {2} \end {equation} Comparing (1,2) we see that\begin {equation} \left ( C^{-1}B^{-1}A^{-1}\right ) D=D\left ( C^{-1}B^{-1}A^{-1}\right ) =I \tag {3} \end {equation} This means \(C^{-1}B^{-1}A^{-1}\) is the inverse of \(D\) by definition (page 177 of book) which says if \(AB=BA=I\) then \(B\) is the inverse of \(A\).
But \(D\) is the product of \(ABC\). Hence the product is invertible. And from (3), its inverse is given by \[ \left ( ABC\right ) ^{-1}=C^{-1}B^{-1}A^{-1}\]
Problem
Let \(T=\begin {bmatrix} t_{1} & 0 & 0\\ 0 & t_{2} & 0\\ 0 & 0 & t_{3}\end {bmatrix} \) be diagonal matrix. What is \(\det \left ( T\right ) \)?
Solution
The determinant of a diagonal matrix is the product of the elements on the diagonal. Hence\[ \det \left ( T\right ) =t_{1}t_{2}t_{3}\] This comes from expansion over any row or column. For example, expansion along row 1 gives\begin {align*} \det \left ( T\right ) & =t_{1}\begin {vmatrix} t_{2} & 0\\ 0 & t_{3}\end {vmatrix} \\ & =t_{1}t_{2}\det (\begin {bmatrix} t_{3}\end {bmatrix} \\ & =t_{1}t_{2}t_{3} \end {align*}
Note that the sign of the elements are all positive for \(3\times 3\) since \(n\) is odd here.\[\begin {bmatrix} + & - & +\\ - & + & -\\ + & - & + \end {bmatrix} \]
Problem
Optional: Consider an \(n\times n\) diagonal matrix \(T\). What is \(det\left ( T\right ) \)? The required part of this problem asks you to answer this question for the case where \(n=3\).
Solution\[ T=\begin {bmatrix} t_{1} & 0 & 0 & \cdots & \cdots & 0\\ 0 & t_{2} & 0 & \cdots & \cdots & 0\\ 0 & 0 & t_{3} & \cdots & \cdots & 0\\ 0 & \cdots & \cdots & \ddots & \cdots & 0\\ 0 & \cdots & \cdots & \cdots & \ddots & 0\\ 0 & \cdots & \cdots & \cdots & \cdots & t_{n}\end {bmatrix} \] \(\det \left ( T\right ) \) is the product of all elements on the diagonal. This comes from expansion over any row. For example, expansion on row 1 gives\begin {align*} \det \left ( T\right ) & =t_{1}\begin {vmatrix} t_{2} & 0 & \cdots & \cdots & 0\\ 0 & t_{3} & \cdots & \cdots & 0\\ \cdots & \cdots & \ddots & \cdots & 0\\ \cdots & \cdots & \cdots & \ddots & 0\\ \cdots & \cdots & \cdots & \cdots & t_{n}\end {vmatrix} \\ & =t_{1}t_{2}\begin {vmatrix} t_{3} & \cdots & \cdots & 0\\ \cdots & t_{4} & \cdots & 0\\ \cdots & \cdots & \ddots & 0\\ \cdots & \cdots & \cdots & t_{n}\end {vmatrix} \\ & =t_{1}t_{2}t_{3}\begin {vmatrix} t_{4} & \cdots & 0\\ \cdots & \ddots & 0\\ \cdots & \cdots & t_{n}\end {vmatrix} \end {align*}
And so on until the last entry\begin {align*} \det \left ( T\right ) & =t_{1}t_{2}t_{3}\cdots t_{n}\\ & ={\displaystyle \prod \limits _{i=1}^{n}} t_{n} \end {align*}
Note on the sign. In expansion, we have to take account of sign changes. If \(n\) is odd, then the sign of the elements are all positive on the diagonal as in case \(n=3\) above. So we do not need to worry about this case.
For even \(n\), the sign on diagoanl also remains positive, since the formula is \(\left ( -1\right ) ^{i+j}\) where \(i,j\) are the index of the diagonal elements, and this always adds to even number since \(i=j\) on the diagonal. For an example for \(n=4\)\[\begin {bmatrix} + & - & + & -\\ - & + & - & +\\ + & - & + & -\\ - & + & - & + \end {bmatrix} \] We see that product on the diagonal always has positive signs.