In Solving a System of Equations we saw that we could use matrices to solve systems of linear equations. As we continue to work with matrices, there are things we will like to do other than just row operations. In particular, we will work on solving systems of equations by solving matrix equations. To do this, we will need to be able to manipulate our matrices using sums and products. Here we will look at these operations.

**Addition**

Addition of matrices is just defined component wise. For example, if we take the matrices

\[\begin{bmatrix} 1 & 2 \\

3 & 4

\end{bmatrix} +

\begin{bmatrix}

5 & 6 \\

7 & 8

\end{bmatrix}\]
we will find the new matrix by adding the corresponding entries and get

\[\begin{bmatrix}

1+5 & 2+6 \\

3+7 & 4 +8

\end{bmatrix}=\begin{bmatrix}

6 & 8 \\

10 & 12

\end{bmatrix}\]

Because we will be working with larger matrices it will help to introduce some notation. In particular, when we say that the matrix \(A=[a_{ij}]\) this means that the entry in the ith row and jth column is giving. We can also write

\[A=\begin{bmatrix}

a_{11} & a_{12} & \ldots & a_{1n} \\

a_{21} & a_{22} & \ldots & a_{2n} \\

\\

a_{m1} & a_{m2} & \ldots & a_{mn}

\end{bmatrix}\]
if we want to be state more precisely what is in each entry as well give the size of the matrix. However, if we want to more precisely define addition, we would say that if \(A=[a_{ij}]\)and \(B=[b_{ij}]\), then

\[A+B=[a_{ij}]+[b_{ij}]=[a_{ij}+b_{ij}].\]

We should note here that if the matrices \(A\) and \(B\) are not the same size, then there exists some point where we are trying to add something to nothing (not zero but rather something that does not exist). In this case, we end up getting an erro because we can’t do this. As such, we would say that the entire matrix \(A+B\) does not exist.

**Constant Multiple**

Now, if we want to multiply a constant by a matrix, say

\[5 * \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix},\]
we can consider this as saying add the matrix to itself times. As such, we are generalizing addition as we would for the real numbers. Therefore, if we multiply by a constant, we would just multiply all of the entries by that constant. We would then get

\[5 * \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}=\begin{bmatrix} 5 & 10 \\ 15 & 20 \end{bmatrix}.\]

**Multiplication**

Even though matrix addition was defined component wise, this will not be the case with matrix multiplication. In order to see what this looks like, we begin by looking at the product of row matrix by a column matrix. That is, let’s find

\[\begin{bmatrix}

1 & 2 & 3 \end{bmatrix}

\begin{bmatrix}

4 \\

5 \\

6\end{bmatrix}\]

In order to take this product, we want to multiply the entry in the ith column of the row matrix by the ith row of column matrix. We then take the sum of these to get a new number that will be the entry in a new \(1 \times 1\) matrix. To see this we could think about turning the row matrix into a column matrix (by finding the transpose). We then put this next to the column matrix and create a table.

\[\begin{bmatrix}

1 & * 4&=4 \\ 2& * 5&=10 \\ 3& *6&=18 \end{bmatrix}\]
then the sum of this is \(4+10+18=32\). We, therefore, get that

\[\begin{bmatrix}

1 & 2 & 3 \end{bmatrix}

\begin{bmatrix}

4 \\

5 \\

6\end{bmatrix}=\begin{bmatrix} 32 \end{bmatrix}\].

Note here that it was important the the number of columns in the row matrix was the same as the number of rows in the column matrix. Otherwise, we would get that the product would not exist.

Now that we know how to multiply rows by columns, we can define the multiplication of general matrices. If we let \(A\) be a matrix and denote the ith row of \(A\) as \(R_{Ai}\) and if \(B\) is a matrix where we denote ith column of \(B\) as \(C_{Bi}\), then we say that

\[A*B=[d_{ij}],\]
where \(d_{ij}=R_{Ai}*C_{Bj}\). That is, the entry in the ith row and jth column is the ith row of \(A\) multiplied by the jth column of \(B\). As an example, let find

\[\begin{bmatrix}

1 & 2 & 3 \\

4 & 5 & 6 \\

7 & 8 & 9 \end{bmatrix}

\begin{bmatrix}

10 & 11 \\

12 & 13 \\

14 & 15

\end{bmatrix}\]

To begin, we take the first row of the first matrix and multiply by the first column of the second. Here we get

\[\begin{bmatrix}

1 & * 10 & =10 \\

2 & * 12 & =24 \\

3 & * 14&=42

\end{bmatrix}\]
and the sum of these is \(10+24+42=76\). Hence, the entry in the first row first column of our solution will be \(76\). If we continue to do this for each of the entries, we will get

\[\begin{bmatrix}

1 & 2 & 3 \\

4 & 5 & 6 \\

7 & 8 & 9 \end{bmatrix}

\begin{bmatrix}

10 & 11 \\

12 & 13 \\

14 & 15

\end{bmatrix}=\begin{bmatrix}

76& 82 \\

184 & 199\\

292& 316\end{bmatrix}. \]

**An example**

Now that we’ve seen how to add, multiple by a constant and multiply matrices, we are able to work through problems that involve each of these. Therefore, let’s find

\[\begin{bmatrix}

2 & -1 & 3 \\

5 & 1 & -2 \\

2 & 2 & 3 \end{bmatrix}

\begin{bmatrix}

2 \\ 3 \\ 2 \end{bmatrix}+

3* \begin{bmatrix} 5 \\ 3 \\ -6\end{bmatrix}\]

Here we will take this one step at a time. If we look at the matrix multiplication, we begin by looking at the first row by the first (only) column and get

\[\begin{bmatrix}

2 & * 2&=4 \\

-1 & * 3 &=-3 \\

3 & * 2 &=6

\end{bmatrix},\]
and the sum would be \(4-3+6=7\).

We then find the second row by the column as

\[\begin{bmatrix}

5 & * 2&=10 \\

1 & * 3 &=3 \\

-2 & * 2 &=-4

\end{bmatrix},\]
and the sum would be \(10+3-4=9\).

Lastly, we find the third row multiplied by the column and get

\[\begin{bmatrix}

2 & * 2&=4 \\

2 & * 3 &=6 \\

3 & * 2 &=6

\end{bmatrix},\]
so the sum is \(4+6+6=16\). We now have that

\[\begin{bmatrix}

2 & -1 & 3 \\

5 & 1 & -2 \\

2 & 2 & 3 \end{bmatrix}

\begin{bmatrix}

2 \\ 3 \\ 2 \end{bmatrix}=

\begin{bmatrix}

7 \\ 9 \\ 16 \end{bmatrix}.\]

We can now find

\[3* \begin{bmatrix} 5 \\ 3 \\ -6\end{bmatrix}=\begin{bmatrix}15 \\ 9 \\ -18 \end{bmatrix},\]
since we multiply by constants by each term. Furthermore, since we add component wise, we get

\[\begin{bmatrix}

7 \\ 9 \\ 16 \end{bmatrix}+\begin{bmatrix}15 \\ 9 \\ -18 \end{bmatrix}=\begin{bmatrix}22 \\ 18 \\ -2 \end{bmatrix}\]

Hence, we have found that

\begin{align*}\begin{bmatrix}

2 & -1 & 3 \\

5 & 1 & -2 \\

2 & 2 & 3 \end{bmatrix}

\begin{bmatrix}

2 \\ 3 \\ 2 \end{bmatrix}&+

3* \begin{bmatrix} 5 \\ 3 \\ -6\end{bmatrix} \\

&=\begin{bmatrix} 22\\ 18 \\ 2\end{bmatrix}.\end{align*}

**Conclusion**

As always, I hope this helps you to better understand matrix operations and that you enjoyed the process. If you did, make sure to share this post with someone else that may find it useful and subscribe to our YouTube channel so that you can see the videos corresponding to our posts.

## 1 thought on “Matrix Operations”