Matrix Multiplication and Inverses
Definition of Inner Product
The inner product of a row of matrix A with a column of matrix B is defined, if and only if the number of columns of matrix A equals the number of rows of matrix B, as the following real number: multiply each element of the row of A by the corresponding element of the column of B and sum the results. Thus:
\[ \begin{array}{cccc}&\cdots\cdots\cdots&\quad&b_{1j}\\a_{i}\cdot b_{j}=\quad a_{i1}a_{i2}\cdot\cdots a_{ip}\cdot&\cdots&\quad&b_{2j}\\\quad\cdots\cdots\cdots&\cdots&\quad&\cdots\quad\cdots\\&&b_{pj}&\end{array}\quad\cdots\quad=a_{i1}b_{1j}+a_{i2}b_{2j}+\cdots+a_{ip}b_{pj} \]
EXAMPLE 35.1 Find the inner product of row 1 of $ \[\begin{bmatrix}3 & 4 \\ 6 & -2\end{bmatrix}\] $ with column 2 of $ \[\begin{bmatrix}5 & 9 & 2 \\ 0 & 7 & 8\end{bmatrix}\]$ .
\[ \left[3\quad4\right]\cdot\left[\begin{aligned}9\\ 7\end{aligned}\right]=3(9)+4(7)=55 \]
Multiplication of Matrices
The product of two matrices is defined, if and only if the number of columns of matrix A equals the number of rows of matrix B, as the following matrix AB: Assuming A is an $ m p $ matrix and B is a $ p n $ matrix, then C = AB is an $ m n $ matrix with the element in row i, column j, being the inner product of row i of matrix A with column j of matrix B.
EXAMPLE 35.2 Let $ A = \[\begin{bmatrix} 3 & 4 \\ 6 & -2 \end{bmatrix}\] $ and $ B = \[\begin{bmatrix} 5 & 9 & 2 \\ 0 & 7 & 8 \end{bmatrix}\]$ . Find AB.
First note that A is a $ 2 $ matrix and B is a $ 2 $ matrix, hence AB is defined and is a $ 2 $ matrix. The element in row 1, column 1 of AB is the inner product of row 1 of A with column 1 of B, thus:
\[ \left[3\quad4\right]\cdot\left[\begin{aligned}5\\ 0\end{aligned}\right]=3(5)+4(0)=15 \]
Continuing in this manner, form
\[ AB=\begin{bmatrix}3(5)&+4(0)&3(9)&+4(7)&3(2)&+4(8)\\ 6(5)+(-2)(0)&6(9)+(-2)(7)&6(2)+(-2)(8)\end{bmatrix}=\begin{bmatrix}15&55&38\\ 30&40&-4\end{bmatrix} \]
Properties of Matrix Multiplication
In general, matrix multiplication is not commutative, that is, there is no guarantee that AB should equal BA. In case the two results are equal, the matrices A and B are said to commute. The following properties can be proved for matrices A, B, and C when all products are defined:
ASSOCIATIVE LAW: $ A(BC) = (AB)C $
LEFT DISTRIBUTIVE LAW: $ A(B + C) = AB + AC $
RIGHT DISTRIBUTIVE LAW: $ (B + C)A = BA + CA $
I dentity Matrix
An $ n n $ square matrix with all main diagonal elements equal to 1, and all other elements equal to 0, is called an identity matrix, and is denoted $ I_{n} $ , or, if the dimension is clear from the context, I. For any $ n n $ square matrix A,
\[ A I_{n}=I_{n}A=A \]
EXAMPLE 35.3 $ I_{2}= \[\begin{bmatrix}1&0\\ 0&1\end{bmatrix}\] $ . $ I_{3}= \[\begin{bmatrix}1&0&0\\ 0&1&0\\ 0&0&1\end{bmatrix}\]$ .
I nverses of Matrices
If A is a square matrix, there may exist another square matrix of the same size, B, such that AB = BA = I. If this is the case, B is called the (multiplicative) inverse of A; the notation $ A^{-1} $ is used for B, thus,
\[ A A^{-1}=A^{-1}A=I \]
Not every square matrix has an inverse; a matrix that has an inverse is called nonsingular; a matrix that has no inverse is called singular. If an inverse can be found for a matrix, this inverse is unique; any other inverse is equal to this one.
EXAMPLE 35.4 Show that $ B = \[\begin{bmatrix} -5 & 2 \\ 3 & -1 \end{bmatrix}\] $ is an inverse for $ A = \[\begin{bmatrix} 1 & 2 \\ 3 & 5 \end{bmatrix}\]$ .
Multiply the matrices to find AB and BA:
\[ AB=\begin{bmatrix}{{{1}}}&{{{2}}} \\{{{3}}}&{{{5}}}\end{bmatrix}\begin{bmatrix}{{{-5}}}&{{{2}}} \\{{{3}}}&{{{-1}}}\end{bmatrix}=\begin{bmatrix}{{{1(-5)+2(3)}}}&{{{1(2)+2(-1)}}} \\{{{3(-5)+5(3)}}}&{{{3(2)+5(-1)}}}\end{bmatrix}=\begin{bmatrix}{{{1}}}&{{{0}}} \\{{{0}}}&{{{1}}}\end{bmatrix}=I \]
\[ BA=\begin{bmatrix}{{{-5}}}&{{{2}}} \\{{{3}}}&{{{-1}}}\end{bmatrix}\begin{bmatrix}{{{1}}}&{{{2}}} \\{{{3}}}&{{{5}}}\end{bmatrix}=\begin{bmatrix}{{{(-5)1+2(3)}}}&{{{(-5)2+2(5)}}} \\{{{3(1)+(-1)3}}}&{{{3(2)+(-1)5}}}\end{bmatrix}=\begin{bmatrix}{{{1}}}&{{{0}}} \\{{{0}}}&{{{1}}}\end{bmatrix}=I \]
Since AB = BA = I, $ B = A^{-1} $
Calculating the Inverse of a Given Matrix
To find the inverse of a given nonsingular square matrix A, perform the following operations:
Adjoin to A the identity matrix of the same dimension to form a matrix schematically indicated by: $ [A I] $ .
Perform row operations on this matrix as in Gauss-Jordan elimination until the portion to the left of the vertical bar has been reduced to I. (If this is not possible, a row of zeros will appear, and the original matrix A was in fact singular.)
The entire matrix will now appear as $ [I|A^{-1}] $ and the matrix $ A^{-1} $ can be read at the right of the vertical bar.
EXAMPLE 35.5 Find the inverse for the matrix \(A = \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}\).
First, form the matrix \(\begin{bmatrix} 1 & 0 & | & 1 & 0 \\ 1 & 1 & | & 0 & 1 \end{bmatrix}\). One operation: \(R_{2} + (-1)R_{1} \rightarrow R_{2}\), transforms the portion to the left of the bar into \(I_{2}\) and yields \(\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} - 1 \begin{bmatrix} 1 & 0 \\ -1 & 1 \end{bmatrix}\). Then \(A^{-1} = \begin{bmatrix} 1 & 0 \\ -1 & 1 \end{bmatrix}\) is read from the right side of the bar. Checking, note that \(AA^{-1} = \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ -1 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\) and \(A^{-1}A = \begin{bmatrix} 1 & 0 \\ -1 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\).
SOLVED PROBLEMS
35.1. Given \(A = [3 \ 8]\) and \(B = \begin{bmatrix} 5 \\ 2 \end{bmatrix}\), find the inner product of each row of \(A\) with each column of \(B\).
There is only one row of \(A\) and only one column of \(B\). The inner product required is given by \(3 \cdot 5 + 8 \cdot 2 = 31\).
35.2. Given \(A = \begin{bmatrix} 2 & 1 & 4 \\ -3 & -1 & 6 \end{bmatrix}\) and \(B = \begin{bmatrix} 9 \\ 5 \\ -2 \end{bmatrix}\), find the inner product of each row of \(A\) with each column of \(B\).
There is only one column of \(B\).
The inner product of row 1 of \(A\) with this column is given by \(2 \cdot 9 + 1 \cdot 5 + 4(-2) = 15\). The inner product of row 2 of \(A\) with the column is given by \((-3)9 + (-1)5 + 6(-2) = -44\).
35.3. Find the order of AB and BA, given the following dimensions for A and B:
A: $ 2 $ , B: $ 3 $
A: $ 2 $ , B: $ 3 $
A: $ 2 $ , B: $ 4 $
A: $ 3 $ , B: $ 3 $
A: $ 3 $ , B: $ 3 $
A: $ 1 $ , B: $ 2 $
A $ 2 $ matrix multiplied times a $ 3 $ matrix yields a $ 2 $ matrix for AB. A $ 3 $ matrix multiplied times a $ 2 $ matrix yields a $ 3 $ matrix for BA.
A $ 2 $ matrix multiplied times a $ 3 $ matrix yields a $ 2 $ matrix for AB. A $ 3 $ matrix can only be multiplied times a matrix with three rows, thus BA is not defined.
A $ 2 $ matrix multiplied times a $ 4 $ matrix yields a $ 2 $ matrix for AB. A $ 4 $ matrix can only be multiplied times a matrix with three rows, thus BA is not defined.
A $ 3 $ matrix can only be multiplied times a matrix with two rows, thus neither AB nor BA is defined.
A $ 3 $ matrix multiplied times a $ 3 $ matrix yields a $ 3 $ matrix for both AB and BA.
A $ 1 $ matrix can only be multiplied times a matrix with three rows, thus AB is not defined. A $ 2 $ matrix can only be multiplied times a matrix with two rows, thus BA is not defined.
$ , find AB and BA.
Since \(A\) is a \(2 \times 3\) matrix and \(B\) is a \(3 \times 1\) matrix, \(AB\) is defined and is a \(2 \times 1\) matrix. The element in row 1, column 1 of \(AB\) is the inner product of row 1 of \(A\) with column 1 of \(B\). This was found in Problem 35.2 to be 15. The element in row 2, column 1 of \(AB\) is the inner product of row 2 of \(A\) with column 1 of \(B\). This was found in Problem 35.2 to be \(-44\). Hence
\[ AB=\begin{bmatrix}15\\ -44\end{bmatrix} \]
Since \(B\) is a \(3 \times 1\) matrix, it can only be multiplied times a matrix with 1 row, thus \(BA\) is not defined.
35.5. Given $ A = \[\begin{bmatrix} 5 & 2 \\ 3 & 1 \end{bmatrix}\] $ and $ B = \[\begin{bmatrix} 1 & 6 \\ -8 & 4 \end{bmatrix}\]$ , find AB and BA.
Since A is a $ 2 $ matrix and B is a $ 2 $ matrix, AB is defined and is a $ 2 $ matrix. Find the inner product of each row of A with each column of B and form AB:
\[ AB=\begin{bmatrix}5(1)+2(-8)&\quad5(6)+2(4)\\ 3(1)+1(-8)&\quad3(6)+1(4)\end{bmatrix}=\begin{bmatrix}-11&\quad38\\ -5&\quad22\end{bmatrix} \]
Since B is a $ 2 $ matrix and A is a $ 2 $ matrix, BA is defined and is a $ 2 $ matrix. Find the inner product of each row of B with each column of A and form BA:
\[ BA=\begin{bmatrix}{{{1(5)+6(3)}}}&{{{1(2)+6(1)}}} \\{{{(-8)5+4(3)}}}&{{{(-8)2+4(1)}}}\end{bmatrix}=\begin{bmatrix}{{{23}}}&{{{8}}} \\{{{-28}}}&{{{-12}}}\end{bmatrix} \]
Note that $ AB BA $ .
35.6. Explain why there is no commutative law for matrix multiplication.
Given two matrices A and B, there are a number of ways in which AB can fail to equal BA. First, either AB or BA may fail to be defined (for example, if A is a $ 2 $ matrix and B is a $ 2 $ matrix, AB is undefined, while BA is defined). Second, both AB and BA may be defined, but be of different dimensions (for example, if A is a $ 2 $ matrix and B is a $ 3 $ matrix, AB is a $ 2 $ matrix and BA is a $ 3 $ matrix). Finally, both AB and BA may be defined and of the same dimension, as in the previous problem, but because AB involves the inner product of the rows of A with the columns of B, while BA involves the inner product of the rows of B with the columns of A, $ AB BA $ .
35.7. Given $ A = \[\begin{bmatrix} 2 & 1 & 0 \\ 3 & -2 & 5 \\ -2 & 5 & 0 \end{bmatrix}\] $ and $ B = \[\begin{bmatrix} 4 & 4 & -1 \\ -3 & 0 & 2 \end{bmatrix}\]$ , find AB and BA.
Since A is a $ 3 $ matrix and B is a $ 2 $ matrix, AB is not defined.
Since \(B\) is a \(2\times3\) matrix and \(A\) is a \(3\times3\) matrix, \(BA\) is defined and has dimension \(2\times3\). Find the inner product of each row of \(B\) with each column of \(A\) and form \(BA\):
\[ BA=\begin{bmatrix}{{{4(2)+4(3)+(-1)(-2)}}}&{{{4(1)+4(-2)+(-1)5}}}&{{{4(0)+4(5)+(-1)0}}} \\{{{(-3)(2)+0(3)+2(-2)}}}&{{{(-3)(1)+0(-2)+2(5)}}}&{{{(-3)0+0(5)+2(0)}}}\end{bmatrix}=\begin{bmatrix}{{{22}}}&{{{-9}}}&{{{20}}} \\{{{-10}}}&{{{7}}}&{{{0}}}\end{bmatrix} \]
35.8. Given $ A = \[\begin{bmatrix} 3 & 1 \\ 0 & -3 \end{bmatrix}\] $ , $ B = \[\begin{bmatrix} 8 & 3 \\ 3 & 8 \end{bmatrix}\] $ , and $ C = \[\begin{bmatrix} -5 & -1 \\ 4 & 2 \end{bmatrix}\]$ , verify the associative law for matrix multiplication $ (AB)C = A(BC) $ .
First find AB and BC:
\[ AB=\begin{bmatrix}{{{3}}}&{{{1}}} \\{{{0}}}&{{{-3}}}\end{bmatrix}\begin{bmatrix}{{{8}}}&{{{3}}} \\{{{3}}}&{{{8}}}\end{bmatrix}=\begin{bmatrix}{{{27}}}&{{{17}}} \\{{{-9}}}&{{{-24}}}\end{bmatrix}\quad and\quad BC=\begin{bmatrix}{{{8}}}&{{{3}}} \\{{{3}}}&{{{8}}}\end{bmatrix}\begin{bmatrix}{{{-5}}}&{{{-1}}} \\{{{4}}}&{{{2}}}\end{bmatrix}=\begin{bmatrix}{{{-28}}}&{{{-2}}} \\{{{17}}}&{{{13}}}\end{bmatrix} \]
Hence
\[ (AB)C=\begin{bmatrix}{{{27}}}&{{{17}}} \\{{{-9}}}&{{{-24}}}\end{bmatrix}\begin{bmatrix}{{{-5}}}&{{{-1}}} \\{{{4}}}&{{{2}}}\end{bmatrix}=\begin{bmatrix}{{{-67}}}&{{{7}}} \\{{{-51}}}&{{{-39}}}\end{bmatrix}\quad and\quad A(BC)=\begin{bmatrix}{{{3}}}&{{{1}}} \\{{{0}}}&{{{-3}}}\end{bmatrix}\begin{bmatrix}{{{-28}}}&{{{-2}}} \\{{{17}}}&{{{13}}}\end{bmatrix}=\begin{bmatrix}{{{-67}}}&{{{7}}} \\{{{-51}}}&{{{-39}}}\end{bmatrix}. \]
Thus (AB)C = A(BC).
35.9. Given $ A = \[\begin{bmatrix} 3 & 1 \\ 0 & -3 \end{bmatrix}\] $ , $ B = \[\begin{bmatrix} 8 & 3 \\ 3 & 8 \end{bmatrix}\] $ , and $ C = \[\begin{bmatrix} -5 & -1 \\ 4 & 2 \end{bmatrix}\]$ , verify the left distributive law for matrix multiplication $ A(B + C) = AB + AC $ .
First find $ B + C $ and AC. (AB was found in the previous problem.)
\[ B+C=\begin{bmatrix}{{{8}}}&{{{3}}} \\{{{3}}}&{{{8}}}\end{bmatrix}+\begin{bmatrix}{{{-5}}}&{{{-1}}} \\{{{4}}}&{{{2}}}\end{bmatrix}=\begin{bmatrix}{{{3}}}&{{{2}}} \\{{{7}}}&{{{10}}}\end{bmatrix}\quad and\quad AC=\begin{bmatrix}{{{3}}}&{{{1}}} \\{{{0}}}&{{{-3}}}\end{bmatrix}\begin{bmatrix}{{{-5}}}&{{{-1}}} \\{{{4}}}&{{{2}}}\end{bmatrix}=\begin{bmatrix}{{{-11}}}&{{{-1}}} \\{{{-12}}}&{{{-6}}}\end{bmatrix} \]
Hence
\[ A(B+C)=\begin{bmatrix}{{{3}}}&{{{1}}} \\{{{0}}}&{{{-3}}}\end{bmatrix}\begin{bmatrix}{{{3}}}&{{{2}}} \\{{{7}}}&{{{10}}}\end{bmatrix}=\begin{bmatrix}{{{16}}}&{{{16}}} \\{{{-21}}}&{{{-30}}}\end{bmatrix}\quad and\quad AB+AC=\begin{bmatrix}{{{27}}}&{{{17}}} \\{{{-9}}}&{{{-24}}}\end{bmatrix}+\begin{bmatrix}{{{-11}}}&{{{-1}}} \\{{{-12}}}&{{{-6}}}\end{bmatrix}=\begin{bmatrix}{{{16}}}&{{{16}}} \\{{{-21}}}&{{{-30}}}\end{bmatrix}. \]
Thus $ A(B + C) = AB + AC. $
35.10. Verify that $ I_{3}A = A $ for any $ 3 $ matrix A.
\[ Let A=\begin{bmatrix}a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33}\end{bmatrix}. \]
Then
\[ I_{3}A=\begin{bmatrix}{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{1}}}\end{bmatrix}\begin{bmatrix}{{{a_{11}}}}&{{{a_{12}}}}&{{{a_{13}}}} \\{{{a_{21}}}}&{{{a_{22}}}}&{{{a_{23}}}} \\{{{a_{31}}}}&{{{a_{32}}}}&{{{a_{33}}}}\end{bmatrix}=\begin{bmatrix}{{{1a_{11}+0a_{21}+0a_{31}}}}&{{{1a_{12}+0a_{22}+0a_{32}}}}&{{{1a_{13}+0a_{23}+0a_{33}}}} \\{{{0a_{11}+1a_{21}+0a_{31}}}}&{{{0a_{12}+1a_{22}+0a_{32}}}}&{{{0a_{13}+1a_{23}+0a_{33}}}} \\{{{0a_{11}+0a_{21}+1a_{31}}}}&{{{0a_{12}+0a_{22}+1a_{32}}}}&{{{0a_{13}+0a_{23}+1a_{33}}}}\end{bmatrix} \]
\[ =\begin{bmatrix}a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33}\end{bmatrix} \]
Thus $ I_{3}A = A $ .
35.11. Show that $ I_{n}X = X $ for any $ n $ matrix X.
Since $ I_{n}A = A $ for any $ n n $ matrix A, multiplying by I must leave each column of A unchanged. Since each column of A can be viewed as an $ n $ matrix, multiplying by $ I_{n} $ must leave any $ n $ matrix unchanged. Thus $ I_{n}X = X $ .
35.12. Show that if $ A = [a_{11}] $ is a $ 1 $ matrix with $ a_{11} $ , then $ A^{-1} = [1/a_{11}] $ .
Since $ [a_{11}][1/a_{11}]=[a_{11}(1/a_{11})]=[1]=I_{1} $ and $ [1/a_{11}][a_{11}]=[(1/a_{11})a_{11}]=[1]=I_{1} $ , it follows that $ [1/a_{11}]=[a_{11}]^{-1} $ .
35.13. Find $ A^{-1} $ given $ A = \[\begin{bmatrix} 1 & 3 \\ 4 & 11 \end{bmatrix}\]$ .
Form the matrix
\[ \left[A\mid I\right]=\left[\begin{aligned}1\quad&3\left|\begin{aligned}1\quad&0\end{aligned}\right.\\ 4\quad&11\left|\begin{aligned}0\quad&1\end{aligned}\right.\end{aligned}\right] \]
Apply row operations on this matrix until the portion to the left of the vertical bar has been reduced to I.
\[ \begin{bmatrix}{{{1}}}&{{{3}}} \\{{{4}}}&{{{11}}}\end{bmatrix}\begin{aligned}1\quad0\\ 0\quad1\end{aligned}\quad-4R_{1}+R_{2}\rightarrow R_{2}\quad\begin{bmatrix}{{{1}}}&{{{3}}} \\{{{0}}}&{{{-1}}}\end{bmatrix}\begin{aligned}1\quad0\\ -4\quad1\end{aligned}\quad3R_{2}+R_{1}\rightarrow R_{1}\quad\begin{bmatrix}{{{1}}}&{{{0}}} \\{{{0}}}&{{{-1}}}\end{bmatrix}\begin{aligned}-11\quad3\\ -4\quad1\end{aligned} \]
\[ -R_{2}\rightarrow R_{2}\begin{bmatrix}{{{1}}}&{{{0}}} \\{{{0}}}&{{{1}}}\end{bmatrix}\begin{aligned}-11&\quad3\\ 4&-1\end{aligned}=[I|A^{-1}] \]
Thus $ A^{-1}= \[\begin{bmatrix}-11&3\\ 4&-1\end{bmatrix}\]$
35.14. Show that the matrix $ A = \[\begin{bmatrix} 2 & 5 \\ 4 & 10 \end{bmatrix}\]$ has no multiplicative inverse.
Form the matrix
\[ \left[A\vert I\right]=\left[\begin{aligned}2\quad&5\quad&1\quad&0\\ 4\quad&10\quad&0\quad&1\end{aligned}\right] \]
Applying row operations on this matrix to attempt to reduce the portion to the left of the vertical bar to I yields
\[ \begin{bmatrix}{{{2}}}&{{{5}}} \\{{{4}}}&{{{10}}}\end{bmatrix}\begin{array}{cc}{{{1}}}&{{{0}}} \\{{{0}}}&{{{1}}}\end{array}\begin{aligned}-2R_{1}+R_{2}\rightarrow R_{2}\begin{bmatrix}{{{2}}}&{{{5}}} \\{{{0}}}&{{{0}}}\end{bmatrix}\begin{array}{cc}{{{1}}}&{{{0}}} \\{{{-2}}}&{{{1}}}\end{array}\end{aligned} \]
There is no way to produce a 1 in row 2, column 2 without destroying the 0 in row 2, column 1. Thus the portion to the left of the vertical bar cannot be reduced to I and there is no inverse for A.
35.15. Show that if an inverse B exists for a given matrix A, this inverse is unique, that is, any other inverse C is equal to B. Assume that both B and C are inverses of A, then BA = I and CA = I; hence BA = CA. Multiply both sides of this true statement by B, then
\[ (BA)B=(CA)B \]
By the associative law for matrix multiplication,
\[ B(AB)=C(AB) \]
But, since B is an inverse for A, AB = I; hence BI = CI, thus, B = C.
35.16. Find $ A^{-1} $ given $ A = \[\begin{bmatrix} 5 & 3 & 4 \\ 2 & 2 & 3 \\ 2 & 0 & 0 \end{bmatrix}\]$ .
Form the matrix
\[ \left[A\mid I\right]=\begin{bmatrix}{{{5}}}&{{{3}}}&{{{4}}} \\{{{2}}}&{{{2}}}&{{{3}}} \\{{{2}}}&{{{0}}}&{{{0}}}\end{bmatrix}\begin{array}{l}{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{1}}}\end{array} \]
Apply row operations on this matrix until the portion to the left of the vertical bar has been reduced to I.
\[ \begin{bmatrix}{{{5}}}&{{{3}}}&{{{4}}}&{{{1}}}&{{{0}}}&{{{0}}} \\{{{2}}}&{{{2}}}&{{{3}}}&{{{0}}}&{{{1}}}&{{{0}}} \\{{{2}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}}\end{bmatrix}\\\boldsymbol{R}_{1}\leftrightarrow\boldsymbol{R}_{3}\begin{bmatrix}{{{2}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}} \\{{{2}}}&{{{2}}}&{{{3}}}&{{{0}}}&{{{1}}}&{{{0}}} \\{{{5}}}&{{{3}}}&{{{4}}}&{{{1}}}&{{{0}}}&{{{0}}}\end{bmatrix}\\\frac{1}{2}\boldsymbol{R}_{1}\rightarrow\boldsymbol{R}_{1}\begin{bmatrix}{{{1}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1/2}}} \\{{{2}}}&{{{2}}}&{{{3}}}&{{{0}}}&{{{1}}}&{{{0}}} \\{{{5}}}&{{{3}}}&{{{4}}}&{{{1}}}&{{{0}}}&{{{0}}}\end{bmatrix} \]
\[ \begin{aligned}R_{2}+(-2)R_{1}&\rightarrow R_{2}\\R_{3}+(-5)R_{1}&\rightarrow R_{3}\begin{bmatrix}{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{2}}}&{{{3}}} \\{{{0}}}&{{{3}}}&{{{4}}}\end{bmatrix}\begin{vmatrix}{{{0}}}&{{{0}}}&{{{1/2}}} \\{{{0}}}&{{{1}}}&{{{-1}}} \\{{{1}}}&{{{0}}}&{{{-5/2}}}\end{vmatrix}\frac{1}{2}R_{2}\rightarrow R_{2}\begin{bmatrix}{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{3/2}}} \\{{{0}}}&{{{3}}}&{{{4}}}\end{bmatrix}\begin{vmatrix}{{{0}}}&{{{0}}}&{{{1/2}}} \\{{{0}}}&{{{1/2}}}&{{{-1/2}}} \\{{{1}}}&{{{0}}}&{{{-5/2}}}\end{vmatrix}\end{aligned} \]
\[ R_{3}+(-3)R_{2}\rightarrow R_{3}\begin{bmatrix}{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{3/2}}} \\{{{0}}}&{{{0}}}&{{{-1/2}}}\end{bmatrix}\begin{array}{r r r r}{{{0}}}&{{{0}}}&{{{1/2}}} \\{{{0}}}&{{{1/2}}}&{{{-1/2}}} \\{{{1}}}&{{{-3/2}}}&{{{-1}}}\end{array}R_{2}+3R_{3}\rightarrow R_{2}\begin{bmatrix}{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{-1/2}}}\end{bmatrix}\begin{array}{r r r r}{{{0}}}&{{{0}}}&{{{1/2}}} \\{{{3}}}&{{{-4}}}&{{{-7/2}}} \\{{{1}}}&{{{-3/2}}}&{{{-1}}}\end{array} \]
\[ (-2)\boldsymbol{R}_{3}\rightarrow\boldsymbol{R}_{3}\begin{bmatrix}{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{1}}}\end{bmatrix}\begin{aligned}0\quad0\quad1/2\\ 3\quad-4\quad-7/2\\ -2\quad3\quad2\end{aligned}=[I|A^{-1}] \]
\[ Thus A^{-1}=\begin{bmatrix}0&0&1/2\\ 3&-4&-7/2\\ -2&3&2\end{bmatrix} \]
35.17. Show that any system of m linear equations in n variables:
\[ \begin{aligned}&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}\\&\cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\\&a_{m1}x_{1}+a_{m2}x_{2}+\cdots+a_{mn}x_{n}=b_{m}\\ \end{aligned} \]
can be written as AX = B, where A is called the coefficient matrix of the system, and A, X, and B are given respectively by:
\[ A=\left[\begin{array}{cccc}a_{11}&a_{12}&a_{13}&\cdots&a_{1n}\\a_{21}&a_{22}&a_{23}&\cdots&a_{2n}\\\cdots&\cdots&\cdots&\cdots&\cdots\\a_{m1}&a_{m2}&a_{m3}&\cdots&a_{mn}\end{array}\right]\qquad X=\left[\begin{array}{c}x_{1}\\x_{2}\\\cdots\\x_{n}\end{array}\right]\qquad B=\left[\begin{array}{c}b_{1}\\b_{2}\\\cdots\\b_{m}\end{array}\right] \]
With \(A\) as the \(m\times n\) matrix shown and \(X\) as the \(n\times1\) matrix shown, the product \(AX\) is the \(m\times1\) matrix:
\[ \begin{bmatrix}a_{11}x_{1}+a_{12}x_{2}+\cdots+a_{1n}x_{n}\\ a_{21}x_{1}+a_{22}x_{2}+\cdots+a_{2n}x_{n}\\ \cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\\ a_{m1}x_{1}+a_{m2}x_{2}+\cdots+a_{mn}x_{n}\end{bmatrix} \]
Thus, by the definition of matrix equality, the matrix equation AX = B holds if and only if each entry of AX is equal to the corresponding element of the $ m $ matrix B, that is, if and only if the system of equations is satisfied. That is, the matrix equation is simply the system of equations written in matrix notation.
35.18. Show that if A is a nonsingular square matrix, then the matrix X that satisfies the matrix equation AX = B is given by $ X = A^{-1}B $ , where
\[ \boldsymbol{X}=\left[\begin{array}{c}x_{1}\\ x_{2}\\ \cdots\\ x_{n}\end{array}\right]\qquad and\qquad\boldsymbol{B}=\left[\begin{array}{c}b_{1}\\ b_{2}\\ \cdots\\ b_{n}\end{array}\right] \]
Let AX = B. Then, since A is nonsingular, $ A^{-1} $ exists; multiplying both sides of this equation by $ A^{-1} $ yields:
\[ \begin{aligned}A^{-1}AX&=A^{-1}B\\IX&=A^{-1}B\\X&=A^{-1}B\end{aligned} \]
35.19. Use the result of the previous problem to solve the system of equations
\[ \begin{aligned}x_{1}+x_{2}+x_{3}&=b_{1}\\x_{1}+2x_{2}+3x_{3}&=b_{2}\\x_{1}+x_{2}+2x_{3}&=b_{3}\end{aligned} \]
given (a) $ b_{1}=3, b_{2}=4, b_{3}=5 $ ; (b) $ b_{1}=-7, b_{2}=9, b_{3}=-6 $ .
The given system of equations can be written as AX = B, with
\[ A=\begin{bmatrix}{{{1}}}&{{{1}}}&{{{1}}} \\{{{1}}}&{{{2}}}&{{{3}}} \\{{{1}}}&{{{1}}}&{{{2}}}\end{bmatrix}\qquad X=\begin{bmatrix}{{{x_{1}}}} \\{{{x_{2}}}} \\{{{x_{3}}}}\end{bmatrix}\qquad B=\begin{bmatrix}{{{b_{1}}}} \\{{{b_{2}}}} \\{{{b_{3}}}}\end{bmatrix} \]
To apply the result of the previous problem, first find $ A^{-1} $ . Start by forming the matrix
\[ \left[A|I\right]=\left[\begin{aligned}1&\quad1&\quad1&\quad1&\quad0&\quad0\\ 1&\quad2&\quad3&\quad0&\quad1&\quad0\\ 1&\quad1&\quad2&\quad0&\quad0&\quad1\end{aligned}\right] \]
Apply row operations on this matrix until the portion to the left of the vertical bar has been reduced to I.
\[ \begin{bmatrix}{{{1}}}&{{{1}}}&{{{1}}} \\{{{1}}}&{{{2}}}&{{{3}}} \\{{{1}}}&{{{1}}}&{{{2}}}\end{bmatrix}\begin{array}{ccc}{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{1}}}\end{array}\boldsymbol{R}_{2}+(-1)\boldsymbol{R}_{1}\rightarrow\boldsymbol{R}_{2}\\\boldsymbol{R}_{3}+(-1)\boldsymbol{R}_{1}\rightarrow\boldsymbol{R}_{3}\begin{bmatrix}{{{1}}}&{{{1}}}&{{{1}}} \\{{{0}}}&{{{1}}}&{{{2}}} \\{{{0}}}&{{{0}}}&{{{1}}}\end{bmatrix}\begin{array}{ccc}{{{1}}}&{{{0}}}&{{{0}}} \\{{{-1}}}&{{{1}}}&{{{0}}} \\{{{-1}}}&{{{0}}}&{{{1}}}\end{array}\boldsymbol{R}_{1}+(-1)\boldsymbol{R}_{3}\rightarrow\boldsymbol{R}_{1}\\\boldsymbol{R}_{2}+(-2)\boldsymbol{R}_{3}\rightarrow\boldsymbol{R}_{2}\end{bmatrix} \]
\[ \begin{bmatrix}{{{1}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{1}}}\end{bmatrix}\begin{array}{rrr}{{{2}}}&{{{0}}}&{{{-1}}} \\{{{1}}}&{{{1}}}&{{{-2}}} \\{{{-1}}}&{{{0}}}&{{{1}}}\end{array}R_{1}+(-1)R_{2}\rightarrow R_{1}\begin{bmatrix}{{{1}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{1}}}\end{bmatrix}\begin{array}{rrr}{{{1}}}&{{{-1}}}&{{{1}}} \\{{{1}}}&{{{1}}}&{{{-2}}} \\{{{-1}}}&{{{0}}}&{{{1}}}\end{array} \]
Thus $ A^{-1} = \[\begin{bmatrix} 1 & -1 & 1 \\ 1 & 1 & -2 \\ -1 & 0 & 1 \end{bmatrix}\]$ . Now the solutions of the given systems are given by $ X = A^{-1}B $ . Hence
\[ \begin{aligned}(a)\begin{bmatrix}{{{x_{1}}}} \\{{{x_{2}}}} \\{{{x_{3}}}}\end{bmatrix}=\begin{bmatrix}{{{1}}}&{{{-1}}}&{{{1}}} \\{{{1}}}&{{{1}}}&{{{-2}}} \\{{{-1}}}&{{{0}}}&{{{1}}}\end{bmatrix}\begin{bmatrix}{{{b_{1}}}} \\{{{b_{2}}}} \\{{{b_{3}}}}\end{bmatrix}=\begin{bmatrix}{{{1}}}&{{{-1}}}&{{{1}}} \\{{{1}}}&{{{1}}}&{{{-2}}} \\{{{-1}}}&{{{0}}}&{{{1}}}\end{bmatrix}\begin{bmatrix}{{{3}}} \\{{{4}}} \\{{{5}}}\end{bmatrix}=\begin{bmatrix}{{{4}}} \\{{{-3}}} \\{{{2}}}\end{bmatrix},that is,x_{1}=4,x_{2}=-3,x_{3}=2.\end{aligned} \]
\[ \begin{aligned}(b)\begin{bmatrix}{{{x_{1}}}} \\{{{x_{2}}}} \\{{{x_{3}}}}\end{bmatrix}=\begin{bmatrix}{{{1}}}&{{{-1}}}&{{{1}}} \\{{{1}}}&{{{1}}}&{{{-2}}} \\{{{-1}}}&{{{0}}}&{{{1}}}\end{bmatrix}\begin{bmatrix}{{{b_{1}}}} \\{{{b_{2}}}} \\{{{b_{3}}}}\end{bmatrix}=\begin{bmatrix}{{{1}}}&{{{-1}}}&{{{1}}} \\{{{1}}}&{{{1}}}&{{{-2}}} \\{{{-1}}}&{{{0}}}&{{{1}}}\end{bmatrix}\begin{bmatrix}{{{-7}}} \\{{{9}}} \\{{{-6}}}\end{bmatrix}=\begin{bmatrix}{{{-22}}} \\{{{14}}} \\{{{1}}}\end{bmatrix},that is,x_{1}=-22,x_{2}=14,x_{3}=1.\end{aligned} \]
Note that, in general, this method of solving systems of linear equations is not more efficient than elimination methods, since the calculation of the inverse matrix already requires all of the steps in a Gauss-Jordan elimination. However, the method is useful if, as in this problem, several systems with the same coefficient matrix and different right-hand sides are to be solved.
SUPPLEMENTARY PROBLEMS
35.20. Given $ A = $ and $ B = [2 ] $ , find AB and BA.
\[ Ans.\quad AB=\begin{bmatrix}{{{2}}}&{{{4}}} \\{{{6}}}&{{{12}}}\end{bmatrix},BA=[14] \]
35.21. Given $ A = \[\begin{bmatrix} 2 & 3 \\ -4 & 5 \end{bmatrix}\] $ and $ B = \[\begin{bmatrix} 1 & -2 & 3 \\ 4 & 0 & 6 \end{bmatrix}\]$ , find AB and BA.
Ans. $ AB = \[\begin{bmatrix} 14 & -4 & 24 \\ 16 & 8 & 18 \end{bmatrix}\]$ , BA is not defined
35.22. If A is a square matrix, $ A^{2} $ is defined as AA. Find $ A^{2} $ if A is given by:
\[ \begin{aligned}&(a)\begin{bmatrix}{{{1}}}&{{{-1}}} \\{{{-1}}}&{{{1}}}\end{bmatrix};(b)\begin{bmatrix}{{{2}}}&{{{0}}}&{{{1}}} \\{{{1}}}&{{{3}}}&{{{2}}} \\{{{-3}}}&{{{-1}}}&{{{0}}}\end{bmatrix}\end{aligned} \]
\[ Ans.\quad(a)\begin{bmatrix}{{{2}}}&{{{-2}}} \\{{{-2}}}&{{{2}}}\end{bmatrix};(b)\begin{bmatrix}{{{1}}}&{{{-1}}}&{{{2}}} \\{{{-1}}}&{{{7}}}&{{{7}}} \\{{{-7}}}&{{{-3}}}&{{{-5}}}\end{bmatrix} \]

$ , verify the right distributive law for matrix multiplication $ (B + C)A = BA + CA $ .
35.24. An orthonormal matrix is defined as a square matrix A with its transpose equal to its inverse: $ A^{T} = A^{-1} $ . (See Problem 34.13.) Show that
\[ \begin{bmatrix}1/\sqrt{2}&-1/\sqrt{2}\\ 1/\sqrt{2}&1/\sqrt{2}\end{bmatrix} \]
is an orthonormal matrix.
35.25. For square matrices I, A, B of dimension $ n n $ , verify that (a) $ I^{-1} = I $ ; (b) $ (A{-1}){-1} = A $ ; (c) $ (AB)^{-1} = B{-1}A{-1} $ .
35.26. Find inverses for
\[ \begin{aligned}&(a)\begin{bmatrix}{{{3}}}&{{{0}}} \\{{{0}}}&{{{1/2}}}\end{bmatrix};(b)\begin{bmatrix}{{{3}}}&{{{5}}} \\{{{-3}}}&{{{-2}}}\end{bmatrix};(c)\begin{bmatrix}{{{3}}}&{{{4}}}&{{{5}}} \\{{{1}}}&{{{0}}}&{{{1}}} \\{{{4}}}&{{{4}}}&{{{6}}}\end{bmatrix};(d)\begin{bmatrix}{{{3}}}&{{{3}}}&{{{1}}} \\{{{2}}}&{{{-1}}}&{{{1}}} \\{{{-2}}}&{{{-1}}}&{{{-2}}}\end{bmatrix};(e)\begin{bmatrix}{{{1}}}&{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}}&{{{1}}} \\{{{-1}}}&{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{-1}}}&{{{0}}}&{{{1}}}\end{bmatrix}\end{aligned} \]
Ans. (a) $ \[\begin{bmatrix} 1/3 & 0 \\ 0 & 2 \end{bmatrix}\] $ ; (b) $ \[\begin{bmatrix} -2 & -5 \\ 3 & 3 \end{bmatrix}\] $ ; (c) no inverse exists; (d) $ \[\begin{bmatrix} 3 & 5 & 4 \\ 2 & -4 & -1 \\ -4 & -3 & -9 \end{bmatrix}\]$ ;
\[ \begin{aligned}&(e)\frac{1}{2}\begin{bmatrix}{{{1}}}&{{{0}}}&{{{-1}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}}&{{{-1}}} \\{{{1}}}&{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{1}}}&{{{0}}}&{{{1}}}\end{bmatrix}\end{aligned} \]
35.27. Use the result of Problem 35.26d to solve the system
\[ \begin{aligned}3x+3y+z&=b_{1}\\2x-y+z&=b_{2}\\-2x-y-2z&=b_{3}\end{aligned} \]
\[ for(a)b_{1}=-4,b_{2}=0,b_{3}=3;(b)b_{1}=11,b_{2}=22,b_{3}=-11;(c)b_{1}=2,b_{2}=-1,b_{3}=5. \]
Ans. (a) x = 0, y = -1, z = -1; (b) x = 9, y = -5, z = -1; (c) $ x = $ , $ y = $ , $ z = - $