# Matrix Operations

### Matrix Addition and Subtraction

Matrices of the same dimensions can be added or subtracted.

A matrix is a rectangular array of numbers, enclosed by brackets. The numbers in a matrix are arranged in horizontal rows and vertical columns. Each number in a matrix is an entry. The dimensions of a matrix are its numbers of rows and columns, written in the form $m\times n$, where $m$ is the number of rows and $n$ is the number of columns.

Performing matrix calculations involves examining each entry in a row or column, locating entries, and writing and reading the notation for an entry. A general notation of $a_{i,j}$ can represent any entry in a matrix, with $i$ as the row number and $j$ as the column number.

For example, matrix $A$ is a $3\times 4$ matrix because it has 3 rows and 4 columns.
\begin{aligned}A=\begin{bmatrix}1 & -5 & \phantom{-}2 & 5 \\ 2 & \phantom{-}2 & -3 & 4 \\ 0 & \phantom{-}7 & \phantom{-}0 & 0 \end{bmatrix} \begin{aligned} \hspace{10pt}\leftarrow\hspace{10pt}&\text{Row 1} \\\hspace{10pt}\leftarrow\hspace{10pt}&\text{Row 2}\\\hspace{10pt}\leftarrow\hspace{10pt}&\text{Row 3}\end{aligned}\\\begin{aligned} \phantom{A=\lbrack}\uparrow \hspace{5pt} \uparrow \hspace{5pt} \uparrow \hspace{5pt} \uparrow \phantom{\text{Columns}} \hspace{35pt}\\\phantom{A=}\text{C1}\hspace{10pt}\text{C2}\hspace{8pt} \text{C3}\hspace{8pt} \text{C4} \hspace{10pt} \text{(Columns)}\hspace{20pt}\end{aligned}\end{aligned}
The entry in row 3 and column 2 of matrix $A$ is 7. The notation for identifying the entry is $a_{3,2}$ since the entry is in row 3 and column 2.

To add or subtract matrices, add or subtract corresponding entries. The matrices must have the same dimensions so that every entry in one matrix has a corresponding entry in the other matrix.

For example, matrix $A$ and matrix $B$ have the same dimensions. They are each a $3 \times 4$ matrix.
$A=\begin{bmatrix} {\color{#c42126}{1}} & -5 & \phantom{-}2 & 5 \\ 2 & \phantom{-}2 & -3 & 4 \\ 0 & \phantom{-}7 & \phantom{-}0 & 0 \end{bmatrix} \hspace{20pt} B=\begin{bmatrix} {\color{#c42126}{2}} & -1 & \phantom{-}0 & \phantom{-}1 \\ 4 & \phantom{-}3 & \phantom{-}7 & \phantom{-}4 \\ 1 & \phantom{-}4 & -2 & -3 \end{bmatrix}$
Matrix $A$ and matrix $B$ can be added to create matrix $A+B$. For the first entry in matrix $A+B$, add the entry from row 1 and column 1 of matrix $A$ and matrix $B$. Then, place the sum in row 1 and column 1 of matrix $A+B$. Continue adding each corresponding entry until matrix $A+B$ is complete.
\begin{aligned}A+B &= \begin{bmatrix} {\color{#c42126}{1+2}} & -5+(-1) & 2+0 & 5+1 \\ 2+4 & 2+3 & -3+7 & 4+4 \\ 0+1 & 7+4 & 0+(-2) & 0+(-3) \end{bmatrix}\\\\&= \begin{bmatrix} {\color{#c42126}{3}} & -6 & \phantom{-}2 & \phantom{-}6 \\ 6 & \phantom{-}5 & \phantom{-}4 & \phantom{-}8 \\ 1 & \phantom{-}11 & -2 & -3 \end{bmatrix}\end{aligned}
Subtracting matrix $A$ and matrix $B$ follows the same process as adding the matrices. Subtract the entry from row 1 and column 1 of matrix $A$ and matrix $B$. Then, place the difference in row 1 and column 1 of matrix $A-B$. Continue subtracting until matrix $A-B$ is complete.
\begin{aligned}A-B &= \begin{bmatrix}{\color{#c42126}{1 - 2}} & -5-(-1) & 2 - 0 & 5-1 \\ 2-4 & 2-3 & -3-7 & 4-4 \\ 0-1 & 7-4 & 0-(-2) & 0-(-3) \end{bmatrix}\\\\&= \begin{bmatrix} {\color{#c42126}{-1}} & -4 & \phantom{-}2 & 4 \\ -2 & -1 & -10 & 0 \\ -1 & \phantom{-}3 & \phantom{-}2 & 3 \end{bmatrix}\end{aligned}

### Scalar Multiplication

A scalar product is the product of a real number and a matrix.

A scalar is a real number or a quantity that can be represented by a real number. To determine the product of a scalar and a matrix, multiply each entry in the matrix by the scalar. The result is called a scalar product.

For example, matrix $A$ can be multiplied by 4 to determine matrix $4A$. Multiply the entry in row 1 and column 1 of matrix $A$ by the scalar, which is 4. Then, place the product in row 1 and column 1 of matrix $4A$. Continue multiplying each entry by the scalar until matrix $4A$ is complete.
$A=\begin{bmatrix} {\color{#c42126}{1}} & -5 & \phantom{-}2 & 5 \\ 2 & \phantom{-}2 & -3 & 4 \\ 0 & \phantom{-}7 & \phantom{-}0 & 0 \end{bmatrix}$
\begin{aligned}{\color{#c42126}{4}}A&=\begin{bmatrix} {\color{#c42126}{4(1)}} & 4(-5) & 4(2) & 4(5) \\ 4(2) & 4(2) & 4(-3) & 4(4) \\ 4(0) & 4(7) & 4(0) & 4(0) \end{bmatrix}\\\\&=\begin{bmatrix} {\color{#c42126}{4}} & -20 & \phantom{-}8 & 20 \\ 8 & 8 & -12 & 16 \\ 0 & \phantom{-}28 & \phantom{-}0 & 0 \end{bmatrix}\end{aligned}
Matrices can be multiplied by any real number, including fractions. For example, matrix $B$ can be multiplied by a scalar of $\frac{1}{3}$.
$B=\begin{bmatrix} {\color{#c42126}{2}} & -1 & \phantom{-}0 & \phantom{-}1 \\ 4 & \phantom{-}3 & \phantom{-}7 & \phantom{-}4 \\ 1 & \phantom{-}4 & -2 & -3 \end{bmatrix}$
\begin{aligned}{\color{#c42126}{\frac{1}{3}}}B&=\begin{bmatrix} {\color{#c42126}{\frac{1}{3}(2)}} & \frac{1}{3}(-1) & \frac{1}{3}(0) & \frac{1}{3}(1) \\[0.5em] \frac{1}{3}(4) & \frac{1}{3}(3) & \frac{1}{3}(7) & \frac{1}{3}(4) \\[0.5em] \frac{1}{3}(1) & \frac{1}{3}(4) & \frac{1}{3}(-2) & \frac{1}{3}(-3) \end{bmatrix}\\\\[0.5em]&=\begin{bmatrix} {\color{#c42126}{\frac{2}{3}}} & -\frac{1}{3} & \phantom{-}0 & \phantom{-}\frac{1}{3} \\[0.5em] \frac{4}{3} & \phantom{-}1 & \phantom{-}\frac{7}{3} & \phantom{-}\frac{4}{3} \\[0.5em] \frac{1}{3} & \phantom{-}\frac{4}{3} & -\frac{2}{3} & -1 \end{bmatrix}\end{aligned}
Scalar multiplication can also be combined with matrix addition and subtraction.
Step-By-Step Example
Multiplying a Matrix with a Scalar and with Subtraction
Determine $3A - 2B$.
$A=\begin{bmatrix} 1 & -5 & \phantom{-}2 & 5 \\ 2 & \phantom{-}2 & -3 & 4 \\ 0 & \phantom{-}7 & \phantom{-}0 & 0 \end{bmatrix} \hspace{30pt} B=\begin{bmatrix} 2 & -1 & \phantom{-}0 & \phantom{-}1 \\ 4 & \phantom{-}3 & \phantom{-}7 & \phantom{-}4 \\ 1 & \phantom{-}4 & -2 & -3 \end{bmatrix}$
Step 1
Identify $3A$ by multiplying each entry in matrix $A$ by the scalar, or 3.
$A=\begin{bmatrix} 1 & -5 & \phantom{-}2 & 5 \\ 2 & \phantom{-}2 & -3 & 4 \\ 0 & \phantom{-}7 & \phantom{-}0 & 0 \end{bmatrix}$
\begin{aligned}3A&=\begin{bmatrix} 3(1) & 3(-5) & 3(2) & 3(5) \\ 3(2) & 3(2) & 3(-3) & 3(4) \\ 3(0) & 3(7) & 3(0) &3(0) \end{bmatrix}\\\\&=\begin{bmatrix} 3 & -15 & \phantom{-}6 & 15 \\ 6 & \phantom{-}6 & -9 & 12 \\ 0 & \phantom{-}21 & \phantom{-}0 & 0 \end{bmatrix}\end{aligned}
Step 2
Identify $2B$ by multiplying each entry in matrix $B$ by the scalar, or 2.
$B=\begin{bmatrix} 2 & -1 & \phantom{-}0 & \phantom{-}1 \\ 4 & \phantom{-}3 & \phantom{-}7 & \phantom{-}4 \\ 1 & \phantom{-}4 & -2 & -3 \end{bmatrix}$
\begin{aligned}2B&=\begin{bmatrix} 2(2) & 2(-1) & 2(0) & 2(1) \\ 2(4) & 2(3) & 2(7) & 2(4) \\ 2(1) & 2(4) & 2(-2) & 2(-3) \end{bmatrix}\\\\&=\begin{bmatrix} 4 & -2 & \phantom{-}0 & \phantom{-}2 \\ 8 & \phantom{-}6 & \phantom{-}14 & \phantom{-}8 \\ 2 & \phantom{-}8 & -4 & -6 \end{bmatrix}\end{aligned}
Step 3
Determine $3A - 2B$ by subtracting each corresponding entry in matrix $3A$ and matrix $2B$.
\begin{aligned}3A-2B&=\begin{bmatrix} 3 & -15 & \phantom{-}6 & 15 \\ 6 & \phantom{-}6 & -9 & 12 \\ 0 & \phantom{-}21 & \phantom{-}0 & 0 \end{bmatrix}-\begin{bmatrix} 4 & -2 & \phantom{-}0 & \phantom{-}2 \\ 8 & \phantom{-}6 & \phantom{-}14 & \phantom{-}8 \\ 2 & \phantom{-}8 & -4 & -6 \end{bmatrix}\\\\&=\begin{bmatrix} 3-4 & -15-(-2) & 6-0 & 15-2 \\ 6-8 & 6-6 & -9-14 & 12-8 \\ 0-2 & 21-8 & 0-(-4) & 0-(-6) \end{bmatrix}\end{aligned}
Solution
Simplify each entry in the resulting matrix.
\begin{aligned}3A-2B&=\begin{bmatrix} 3-4 & -15-(-2) & 6-0 & 15-2 \\ 6-8 & 6-6 & -9-14 & 12-8 \\ 0-2 & 21-8 & 0-(-4) & 0-(-6) \end{bmatrix}\\\\&=\begin{bmatrix} -1 & -13 & \phantom{-}6 & 13 \\ -2 & \phantom{-}0 & -23 & 4 \\ -2 & \phantom{-}13 & \phantom{-}4 & 6 \end{bmatrix}\end{aligned}

### Matrix Multiplication

An $m\times n$ matrix can be multiplied by an $n\times p$ matrix. The result is an $m\times p$ matrix.
Two matrices can be multiplied only if the number of columns of the first matrix is equal to the number of rows of the second matrix. The resulting matrix, called the matrix product, is the product of two or more matrices. It has the same number of rows as the first matrix and the same number of columns as the second matrix. If the number of columns of the first matrix is not equal to the number of rows of the second matrix, the product is undefined.

### Matrix Product Dimensions

 Matrix $A$ $B$ $AB$ Dimensions ($\text{Row} \times \text{Column}$) ${\color{#c42126}3}\times{\color{#0047af}2}$ ${\color{#0047af}2}\times{\color{#c42126}4}$ ${\color{#c42126}3}\times{\color{#c42126}4}$

When multiplying matrices, make sure that the number of columns in the first matrix and the number of rows in the second matrix are equal. For example, matrix $A$ is a $3 \times 2$ matrix, while matrix $B$ is a $2 \times 4$ matrix. They can be multiplied because matrix $A$ has 2 columns and matrix $B$ has 2 rows. The resulting product matrix, $AB$, will have the same number of rows as matrix $A$ (3 rows) and the same number of columns as matrix $B$ (4 columns).

Consider matrix $A$.
$A=\begin{bmatrix} a_{1,1} & a_{1,2} & ... & a_{1,j} & ... & a_{1,n} \\[0.5em] a_{2,1} & a_{2,2} & ... & a_{2,j} & ... & a_{2,n} \\[0.5em] \vdots & \vdots & \: & \vdots & \: & \vdots \\[0.5em] a_{i,1} & a_{i,2} & ... & {\color{#c42126} a_{i,j}}& ... & a_{i,n} \\[0.5em] \vdots & \vdots & \: & \vdots & \: & \vdots \\[0.5em] a_{m,1} & a_{m,2} & ... & a_{m,j} & ... & a_{m,n} \end{bmatrix}$
A row number of a matrix is represented by $i$. A column number is represented by $j$. The entry in row $i$ and column $j$ is written as $a_{i,j}$.

To multiply two matrices, multiply consecutive entries in row $i$ of the first matrix and column $j$ in the second matrix. The sum of those products will become the entry in row $i$ and column $j$ in the product matrix.

Unlike multiplication with real numbers, matrix multiplication is not commutative, so $AB$ may not be equal to $BA$, even if both matrices are defined.

Step-By-Step Example
Multiplying Matrices
Identify the matrix product $AB$.
$A=\begin{bmatrix} \phantom{-}5 & \phantom{-}0 \\ -2 & -3 \\ \phantom{-}1 & \phantom{-}4 \end{bmatrix}\hspace{20pt}B= \begin{bmatrix} 3 & \phantom{-}4 & 0 & \phantom{-}2 \\ 2 & -1 & 1 & -2 \end{bmatrix}$
Step 1
To determine the entry in the first row and first column of the matrix product $AB$, multiply consecutive entries in the first row of matrix $A$ and the first column of matrix $B$. Then add the products.
$A=\begin{bmatrix} {\color{#c42126}\phantom{-}5} & {\color{#c42126}\phantom{-}0 } \\ -2 & -3 \\ \phantom{-}1 & \phantom{-}4 \end{bmatrix} \hspace{20pt}B=\begin{bmatrix} {\color{#0047af}3} & \phantom{-}4 & 0 & \phantom{-}2 \\ {\color{#0047af}2} & -1 & 1 & -2 \end{bmatrix}$
${\color{#c42126}5}\cdot{\color{#0047af}3}+{\color{#c42126}0}\cdot{\color{#0047af}2}=15$
$AB=\begin{bmatrix} 15 & \phantom{20} & \phantom{0} & \phantom{-10} \\ \phantom{-12} & \phantom{-5} & \phantom{-3} & \phantom{-2} \\ \phantom{-11} & \phantom{-0} & \phantom{-4} & \phantom{-6} \end{bmatrix}$
Step 2
To determine the entry in the first row and second column of $AB$, multiply consecutive entries in the first row of $A$ and the second column of $B$. Then add the products.
$A=\begin{bmatrix} {\color{#c42126}\phantom{-}5} & {\color{#c42126}\phantom{-}0 } \\ -2 & -3 \\ \phantom{-}1 & \phantom{-}4 \end{bmatrix} \hspace{20pt}B=\begin{bmatrix} 3 & {\color{#0047af}\phantom{-}4} & 0 & \phantom{-}2 \\ 2 & {\color{#0047af}-1} & 1 & -2 \end{bmatrix}$
${\color{#c42126}5}\cdot{\color{#0047af}4}+{\color{#c42126}0}\cdot ({\color{#0047af}-1})=20$
$AB=\begin{bmatrix} 15 & 20 & \phantom{0} & \phantom{-10} \\ \phantom{-12} & \phantom{-5} & \phantom{-3} & \phantom{-2} \\ \phantom{-11} & \phantom{-0} & \phantom{-4} & \phantom{-6} \end{bmatrix}$
Step 3
To determine the entry in the first row and third column of $AB$, multiply consecutive entries in the first row of $A$ and the third column of $B$. Then add the products.
$A=\begin{bmatrix} {\color{#c42126}\phantom{-}5} & {\color{#c42126}\phantom{-}0 } \\ -2 & -3 \\ \phantom{-}1 & \phantom{-}4 \end{bmatrix} \hspace{20pt} B=\begin{bmatrix} 3 & \phantom{-}4 & {\color{#0047af}0} & \phantom{-}2 \\ 2 & -1 & {\color{#0047af}1} & -2 \end{bmatrix}$
${\color{#c42126}5}\cdot{\color{#0047af}0}+{\color{#c42126}0}\cdot {\color{#0047af}1}=0$
$AB=\begin{bmatrix} 15 & 20 & 0 & \phantom{-10} \\ \phantom{-12} & \phantom{-5} & \phantom{-3} & \phantom{-2} \\ \phantom{-11} & \phantom{-0} & \phantom{-4} & \phantom{-6} \end{bmatrix}$
Step 4
To determine the entry in the first row and fourth column of $AB$, multiply consecutive entries in the first row of $A$ and the fourth column of $B$. Then add the products.
$A=\begin{bmatrix} {\color{#c42126}\phantom{-}5} & {\color{#c42126}\phantom{-}0 } \\ -2 & -3 \\ \phantom{-}1 & \phantom{-}4 \end{bmatrix} \hspace{20pt}B=\begin{bmatrix} 3 & \phantom{-}4 & 0 & {\color{#0047af}\phantom{-}2} \\ 2 & -1 & 1 & {\color{#0047af}-2} \end{bmatrix}$
${\color{#c42126}5}\cdot{\color{#0047af}2}+{\color{#c42126}0}\cdot ({\color{#0047af}-2})=10$
$AB=\begin{bmatrix} 15 & 20 & 0 & \phantom{-}10 \\ \phantom{-12} & \phantom{-5} & \phantom{-3} & \phantom{-2} \\ \phantom{-11} & \phantom{-0} & \phantom{-4} & \phantom{-6} \end{bmatrix}$
Step 5
Repeat the process to determine each entry in the second row. Multiply consecutive entries in the second row of $A$ and entries in each column of $B$. Then add the products.
$A=\begin{bmatrix} \phantom{-}5 & \phantom{-}0 \\ {\color{#c42126}-2} & {\color{#c42126}-3} \\ \phantom{-}1 & \phantom{-}4 \end{bmatrix} \hspace{20pt}B=\begin{bmatrix} 3 & \phantom{-}4 & 0 & \phantom{-}2 \\ 2 & -1 & 1 & -2 \end{bmatrix}$
\begin{aligned}\text{Row 2, Column 1:}\;\hspace{10pt}&{\color{#c42126}-2}\cdot3+{\color{#c42126}(-3)}\cdot 2=-12\\\text{Row 2, Column 2:}\hspace{10pt}&{\color{#c42126}-2}\cdot4+{\color{#c42126}(-3)}\cdot (-1)=-5\\\text{Row 2, Column 3:}\hspace{10pt}&{\color{#c42126}-2}\cdot0+{\color{#c42126}(-3)}\cdot 1=-3\\\text{Row 2, Column 4:}\hspace{10pt}&{\color{#c42126}-2}\cdot2+{\color{#c42126}(-3)}\cdot (-2)=2\end{aligned}
$AB=\begin{bmatrix} \phantom{-}15 & 20 & \phantom{-}0 & \phantom{-}10 \\ -12 & -5 & -3 & \phantom{-}2 \\ \phantom{-11} & \phantom{-0} & \phantom{-4} & \phantom{-6} \end{bmatrix}$
Solution
To determine each entry in the third row, multiply consecutive entries in the third row of $A$ and entries in each column of $B$. Then add the products.
$A=\begin{bmatrix} \phantom{-}5 & \phantom{-}0 \\ -2 & -3 \\ {\color{#c42126}\phantom{-}1} & {\color{#c42126}\phantom{-}4} \end{bmatrix}\hspace{20pt} B=\begin{bmatrix} 3 & \phantom{-}4 & 0 & \phantom{-}2 \\ 2 & -1 & 1 & -2 \end{bmatrix}$
\begin{aligned}\text{Row 3, Column 1:}\; \hspace{10pt}&{\color{#c42126}1}\cdot3+{\color{#c42126}4}\cdot 2=11\\\text{Row 3, Column 2:}\hspace{10pt}&{\color{#c42126}1}\cdot4+{\color{#c42126}4}\cdot (-1)=0\\\text{Row 3, Column 3:} \hspace{10pt}&{\color{#c42126}1}\cdot0+{\color{#c42126}4}\cdot 1=4\\\text{Row 3, Column 4:} \hspace{10pt}&{\color{#c42126}1}\cdot2+{\color{#c42126}4}\cdot (-2)=-6\end{aligned}
$AB=\begin{bmatrix} \phantom{-}15 & 20 & \phantom{-}0 & \phantom{-}10 \\ -12 & -5 & -3 & \phantom{-}2 \\ \phantom{-}11 & \phantom{-}0 & \phantom{-}4 & -6 \end{bmatrix}$

### Inverses

If a matrix has an inverse, the product of the matrix and its inverse is the identity matrix.

The numbers 2 and $\frac{1}{2}$ are multiplicative inverses because when multiplied, the result is the multiplicative identity 1. Square matrices may also have multiplicative inverses. A square matrix is a matrix that has the same number of rows and columns.

An identity matrix is a square matrix in which the entries (or numbers) along the main diagonal, from the top left corner to the bottom right corner of the matrix, are ones and the other entries are zeros. The $3\times3$ identity matrix has an entry of 1 in positions $a_{1,1}$, $a_{2,2}$, and $a_{3,3}$. All other entries are zero.
$I=\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
The inverse matrix of a square matrix $A$, if the inverse exists, is the matrix $A^{-1}$, such that $AA^{-1} = A^{-1}A = I$, where $I$ is the identity matrix.

Sometimes, it is useful to determine the inverse of a matrix. This is because there is no such thing as matrix division. With numbers, it is possible to multiply by the reciprocal of the number and get the same result as dividing by that number. Similarly, multiplying by the inverse of a matrix is equivalent to dividing by the matrix.

Step-By-Step Example
Multiplying a Matrix by the Identity Matrix
Compare the matrix product $AI$ with $IA$.
$A= \begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix}$
Step 1
Write the appropriate identity matrix $I$. Matrix $A$ is a $3\times3$ matrix, so use the $3\times3$ identity matrix.
$I=\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
Step 2
Determine $AI$.
$AI= \begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
Determine the entries for the first row. Multiply each entry in $\text{{\color{#c42126}{row 1 of matrix}}}$ ${\color{#c42126}{A}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{I}}$. Then add the products.
\begin{aligned}{\color{#c42126}\phantom{-}2}\cdot{\color{#0047af}1}+{\color{#c42126}0}\cdot {\color{#0047af}0}+{\color{#c42126}4}\cdot {\color{#0047af}0}=2\\{\color{#c42126}2}\cdot{\color{#0047af}0}+{\color{#c42126}0}\cdot {\color{#0047af}1}+{\color{#c42126}4}\cdot {\color{#0047af}0}=0\\{\color{#c42126}2}\cdot{\color{#0047af}0}+{\color{#c42126}0}\cdot {\color{#0047af}0}+{\color{#c42126}4}\cdot {\color{#0047af}1}=4\end{aligned}
Determine the entries for the second row. Multiply each entry in $\text{{\color{#c42126}{row 2 of matrix}}}$ ${\color{#c42126}{A}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{I}}$. Then add the products.
$\begin{gathered}{\color{#c42126}(-3)}\cdot{\color{#0047af}1}+{\color{#c42126}2}\cdot {\color{#0047af}0}+{\color{#c42126}3}\cdot {\color{#0047af}0}=-3\\{\color{#c42126}(-3)}\cdot{\color{#0047af}0}+{\color{#c42126}2}\cdot {\color{#0047af}1}+{\color{#c42126}3}\cdot {\color{#0047af}0}=2\\{\color{#c42126}(-3)}\cdot{\color{#0047af}0}+{\color{#c42126}2}\cdot {\color{#0047af}0}+{\color{#c42126}3}\cdot {\color{#0047af}1}=3\end{gathered}$
Determine the entries for the third row. Multiply each entry in $\text{{\color{#c42126}{row 3 of matrix}}}$ ${\color{#c42126}{A}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{I}}$. Then add the products.
$\begin{gathered}{\color{#c42126}(-2)}\cdot{\color{#0047af}1}+{\color{#c42126}1}\cdot {\color{#0047af}0}+{\color{#c42126}2}\cdot {\color{#0047af}0}=-2\\{\color{#c42126}(-2)}\cdot{\color{#0047af}0}+{\color{#c42126}1}\cdot {\color{#0047af}1}+{\color{#c42126}2}\cdot {\color{#0047af}0}=1\\{\color{#c42126}(-2)}\cdot{\color{#0047af}0}+{\color{#c42126}1}\cdot {\color{#0047af}0}+{\color{#c42126}2}\cdot {\color{#0047af}1}=2\end{gathered}$
$AI= \begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix}$
Step 3
Determine $IA$.
$IA= \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix}$
Calculate the entries for the first row. Multiply each entry in $\text{{\color{#c42126}{row 1 of matrix}}}$ ${\color{#c42126}{I}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{A}}$. Then add the products.
$\begin{gathered}{\color{#c42126}1}\cdot{\color{#0047af}2}+{\color{#c42126}0}\cdot {\color{#0047af}(-3)}+{\color{#c42126}0}\cdot {\color{#0047af}(-2)}=2\\{\color{#c42126}1}\cdot{\color{#0047af}0}+{\color{#c42126}0}\cdot {\color{#0047af}2}+{\color{#c42126}0}\cdot {\color{#0047af}1}=0\\{\color{#c42126}1}\cdot{\color{#0047af}4}+{\color{#c42126}0}\cdot {\color{#0047af}3}+{\color{#c42126}0}\cdot {\color{#0047af}2}=4\end{gathered}$
Calculate the entries for the second row. Multiply each entry in $\text{{\color{#c42126}{row 2 of matrix}}}$ ${\color{#c42126}{I}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{A}}$. Then add the products.
$\begin{gathered}{\color{#c42126}0}\cdot{\color{#0047af}2}+{\color{#c42126}1}\cdot {\color{#0047af}(-3)}+{\color{#c42126}0}\cdot {\color{#0047af}(-2)}=-3\\{\color{#c42126}0}\cdot{\color{#0047af}0}+{\color{#c42126}1}\cdot {\color{#0047af}2}+{\color{#c42126}0}\cdot {\color{#0047af}1}=2\\{\color{#c42126}0}\cdot{\color{#0047af}4}+{\color{#c42126}1}\cdot {\color{#0047af}3}+{\color{#c42126}0}\cdot {\color{#0047af}2}=3\end{gathered}$
Calculate the entries for the third row. Multiply each entry in $\text{{\color{#c42126}{row 3 of matrix}}}$ ${\color{#c42126}{I}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{A}}$. Then add the products.
$\begin{gathered}{\color{#c42126}0}\cdot{\color{#0047af}2}+{\color{#c42126}0}\cdot {\color{#0047af}(-3)}+{\color{#c42126}1}\cdot {\color{#0047af}(-2)}=-2\\{\color{#c42126}0}\cdot{\color{#0047af}0}+{\color{#c42126}0}\cdot {\color{#0047af}2}+{\color{#c42126}1}\cdot {\color{#0047af}1}=1\\{\color{#c42126}0}\cdot{\color{#0047af}4}+{\color{#c42126}0}\cdot {\color{#0047af}3}+{\color{#c42126}1}\cdot {\color{#0047af}2}=2\end{gathered}$
$IA= \begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix}$
Solution
$AI=IA=A$
Step-By-Step Example
Verifying the Inverse of a Matrix
Verify that $A^{-1}$ is the inverse of $A$.
$A= \begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix}\hspace{30pt}A^{-1}=\begin{bmatrix}\frac{1}{6}&\phantom{-}\frac{2}{3}&-\frac{4}{3}\\[0.5em]0&\phantom{-}2&-3\\[0.5em] \frac{1}{6}&-\frac{1}{3}&\phantom{-}\frac{2}{3} \end{bmatrix}$
Step 1
Determine $AA^{-1}$.
$AA^{-1}= \begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix} \begin{bmatrix} \frac{1}{6}&\phantom{-}\frac{2}{3}&-\frac{4}{3}\\[0.5em]0&\phantom{-}2&-3\\[0.5em] \frac{1}{6}&-\frac{1}{3}&\phantom{-}\frac{2}{3} \end{bmatrix}$
Determine the entries for the first row. Multiply each entry in $\text{{\color{#c42126}{row 1 of matrix}}}$ ${\color{#c42126}{A}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{A^{-1}}}$. Then add the products.
$\begin{gathered}{\color{#c42126}2}\cdot{\color{#0047af}\frac{1}{6}}+{\color{#c42126}0}\cdot {\color{#0047af}0}+{\color{#c42126}4}\cdot {\color{#0047af}\frac{1}{6}}=1\\{\color{#c42126}2}\cdot{\color{#0047af}\frac{2}{3}}+{\color{#c42126}0}\cdot {\color{#0047af}2}+{\color{#c42126}4}\cdot {\color{#0047af}\left (-\frac{1}{3} \right )}=0\\{\color{#c42126}2}\cdot{\color{#0047af}\left (-\frac{4}{3} \right )}+{\color{#c42126}0}\cdot {\color{#0047af}(-3)}+{\color{#c42126}4}\cdot {\color{#0047af}\frac{2}{3}}=0\end{gathered}$
Calculate the entries for the second row. Multiply each entry in $\text{{\color{#c42126}{row 2 of matrix}}}$ ${\color{#c42126}{A}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{A^{-1}}}$. Then add the products.
$\begin{gathered}{\color{#c42126}(-3)}\cdot{\color{#0047af}\frac{1}{6}}+{\color{#c42126}2}\cdot {\color{#0047af}0}+{\color{#c42126}3}\cdot {\color{#0047af}\frac{1}{6}}=0\\{\color{#c42126}(-3)}\cdot{\color{#0047af}\frac{2}{3}}+{\color{#c42126}2}\cdot {\color{#0047af}2}+{\color{#c42126}3}\cdot {\color{#0047af}\left (-\frac{1}{3} \right )}=1\\{\color{#c42126}(-3)}\cdot{\color{#0047af}\left (-\frac{4}{3} \right )}+{\color{#c42126}2}\cdot {\color{#0047af}\left (-3 \right )}+{\color{#c42126}3}\cdot {\color{#0047af}\frac{2}{3}}=0\end{gathered}$
Calculate the entries for the third row. Multiply each entry in $\text{{\color{#c42126}{row 3 of matrix}}}$ ${\color{#c42126}{A}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{A^{-1}}}$. Then add the products.
$\begin{gathered}{\color{#c42126}(-2)}\cdot{\color{#0047af}\frac{1}{6}}+{\color{#c42126}1}\cdot {\color{#0047af}0}+{\color{#c42126}2}\cdot {\color{#0047af}\frac{1}{6}}=0\\{\color{#c42126}(-2)}\cdot{\color{#0047af}\frac{2}{3}}+{\color{#c42126}1}\cdot {\color{#0047af}2}+{\color{#c42126}2}\cdot {\color{#0047af}\left (-\frac{1}{3} \right )}=0\\{\color{#c42126}(-2)}\cdot{\color{#0047af}\left (-\frac{4}{3} \right )}+{\color{#c42126}1}\cdot {\color{#0047af}\left (-3 \right )}+{\color{#c42126}2}\cdot {\color{#0047af}\frac{2}{3}}=1\end{gathered}$
\begin{aligned}AA^{-1}&=\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\end{aligned}
Step 2
Identify $A^{-1}A$.
$A^{-1}A= \begin{bmatrix} \frac{1}{6}&\phantom{-}\frac{2}{3}&-\frac{4}{3}\\[0.5em]0&\phantom{-}2&-3\\[0.5em] \frac{1}{6}&-\frac{1}{3}&\phantom{-}\frac{2}{3} \end{bmatrix}\begin{bmatrix} \phantom{-}2 & 0 & 4 \\ -3 & 2 & 3 \\ -2 & 1 & 2 \end{bmatrix}$
Determine the entries for the first row. Multiply each entry in $\text{{\color{#c42126}{row 1 of matrix}}}$ ${\color{#c42126}{A^{-1}}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{A}}$. Then add the products.
$\begin{gathered}{\color{#c42126}\frac{1}{6}}\cdot{\color{#0047af}2}+{\color{#c42126}\frac{2}{3}}\cdot {\color{#0047af}(-3)}+{\color{#c42126}\left (-\frac{4}{3} \right )}\cdot {\color{#0047af}(-2)}=1\\{\color{#c42126}\frac{1}{6}}\cdot{\color{#0047af}0}+{\color{#c42126}\frac{2}{3}}\cdot {\color{#0047af}2}+{\color{#c42126}\left (-\frac{4}{3} \right )}\cdot {\color{#0047af}1}=0\\{\color{#c42126}\frac{1}{6}}\cdot{\color{#0047af}4}+{\color{#c42126}\frac{2}{3}}\cdot {\color{#0047af}3}+{\color{#c42126}\left (-\frac{4}{3} \right )}\cdot {\color{#0047af}2}=0\end{gathered}$
Determine the entries for the second row. Multiply each entry in $\text{{\color{#c42126}{row 2 of matrix}}}$ ${\color{#c42126}{A^{-1}}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{A}}$. Then add the products.
$\begin{gathered}{\color{#c42126}0}\cdot{\color{#0047af}2}+{\color{#c42126}2}\cdot {\color{#0047af}(-3)}+{\color{#c42126}(-3)}\cdot {\color{#0047af}(-2)}=0\\{\color{#c42126}0}\cdot{\color{#0047af}0}+{\color{#c42126}2}\cdot {\color{#0047af}2}+{\color{#c42126}(-3)}\cdot {\color{#0047af}1}=1\\{\color{#c42126}0}\cdot{\color{#0047af}4}+{\color{#c42126}2}\cdot {\color{#0047af}3}+{\color{#c42126}(-3)}\cdot {\color{#0047af}2}=0\end{gathered}$
Calculate the entries for the third row. Multiply each entry in $\text{{\color{#c42126}{row 3 of matrix}}}$ ${\color{#c42126}{A^{-1}}}$ by each entry in all $\text{{\color{#0047af}{columns of matrix}}}$ ${\color{#0047af}{A}}$. Then add the products.
$\begin{gathered}{\color{#c42126}\frac{1}{6}}\cdot{\color{#0047af}2}+{\color{#c42126}\left (-\frac{1}{3} \right )}\cdot {\color{#0047af}(-3)}+{\color{#c42126}\frac{2}{3}}\cdot {\color{#0047af}(-2)}=0\\{\color{#c42126}\frac{1}{6}}\cdot{\color{#0047af}0}+{\color{#c42126}\left (-\frac{1}{3} \right )}\cdot {\color{#0047af}2}+{\color{#c42126}\frac{2}{3}}\cdot {\color{#0047af}1}=0\\{\color{#c42126}\frac{1}{6}}\cdot{\color{#0047af}4}+{\color{#c42126}\left (-\frac{1}{3} \right )}\cdot {\color{#0047af}3}+{\color{#c42126}\frac{2}{3}}\cdot {\color{#0047af}2}=1\end{gathered}$
$A^{-1}A=\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
Solution
Matrix $A^{-1}$ is the inverse of matrix $A$ because:
$AA^{-1}=A^{-1}A=I$