If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Precalculus

### Course: Precalculus>Unit 7

Lesson 4: Adding and subtracting matrices

Learn how to find the result of matrix addition and subtraction operations.

## What you should be familiar with before taking this lesson

A matrix is a rectangular arrangement of numbers into rows and columns. Each number in a matrix is referred to as a matrix element or entry.
$\begin{array}{c}\text{3 columns}\\ \\ \begin{array}{cccc}\text{2 rows}& ↓& ↓& ↓\\ \\ \begin{array}{c}\to \\ \\ \to \end{array}& \left[\begin{array}{c}-2\\ \\ 5\end{array}& \begin{array}{c}5\\ \\ 2\end{array}& \begin{array}{c}6\\ \\ 7\end{array}\right]\end{array}\end{array}$
The dimensions of a matrix give the number of rows and columns of the matrix in that order. Since matrix $A$ has $2$ rows and $3$ columns, it is called a $2×3$ matrix.
If this is new to you, we recommend that you check out our intro to matrices.

## What you will learn in this lesson

As long as the dimensions of two matrices are the same, we can add and subtract them much like we add and subtract numbers. Let's take a closer look!

Given $\mathbf{A}=\left[\begin{array}{cc}4& 8\\ \\ 3& 7\end{array}\right]$ and $\mathbf{B}=\left[\begin{array}{cc}1& 0\\ \\ 5& 2\end{array}\right]$, let's find $\mathbf{A}+\mathbf{B}$.
We can find the sum simply by adding the corresponding entries in matrices $\mathbf{A}$ and $\mathbf{B}$. This is shown below.
$\begin{array}{rl}\mathbf{A}+\mathbf{B}& =\left[\begin{array}{cc}4& 8\\ \\ 3& 7\end{array}\right]+\left[\begin{array}{cc}1& 0\\ \\ 5& 2\end{array}\right]\\ \\ & =\left[\begin{array}{cc}4+1& 8+0\\ \\ 3+5& 7+2\end{array}\right]\\ \\ & =\left[\begin{array}{cc}5& 8\\ \\ 8& 9\end{array}\right]\end{array}$

Problem 1
$\mathbf{A}=\left[\begin{array}{cc}5& 2\\ \\ 0& 1\\ \\ 1& 9\end{array}\right]$ and $\mathbf{B}=\left[\begin{array}{cc}2& 3\\ \\ 4& 1\\ \\ 0& 2\end{array}\right]$.
$\mathbf{A}+\mathbf{B}=$

Problem 2
$\left[\begin{array}{cc}-10& 12\\ \\ -6& 3\end{array}\right]+\left[\begin{array}{cc}-1& 4\\ \\ 22& 7\end{array}\right]=$

## Subtracting matrices

Similarly, to subtract matrices, we subtract the corresponding entries.
For example, let's consider $\mathbf{C}=\left[\begin{array}{cc}2& 8\\ \\ 0& 9\end{array}\right]$ and $\mathbf{D}=\left[\begin{array}{cc}5& 6\\ \\ 11& 3\end{array}\right]$.
We can find $\mathbf{C}-\mathbf{D}$ by subtracting the corresponding entries in matrices $\mathbf{C}$ and $\mathbf{D}$. This is shown below.
$\begin{array}{rl}\mathbf{C}-\mathbf{D}& =\left[\begin{array}{cc}2& 8\\ \\ 0& 9\end{array}\right]-\left[\begin{array}{cc}5& 6\\ \\ 11& 3\end{array}\right]\\ \\ & =\left[\begin{array}{cc}2-5& 8-6\\ \\ 0-11& 9-3\end{array}\right]\\ \\ & =\left[\begin{array}{cc}-3& 2\\ \\ -11& 6\end{array}\right]\end{array}$

Problem 3
$\mathbf{X}=\left[\begin{array}{cc}4& 16\\ \\ 10& 22\end{array}\right]$ and $\mathbf{Y}=\left[\begin{array}{cc}1& 15\\ \\ 6& 3\end{array}\right]$.
$\mathbf{X}-\mathbf{Y}=$

Problem 4
Subtract.
$\left[\begin{array}{ccc}3& 4& 9\\ \\ 6& 8& 6\\ \\ 7& 3& 4\end{array}\right]-\left[\begin{array}{ccc}1& 6& 7\\ \\ 6& 4& 2\\ \\ 4& 1& 5\end{array}\right]=$

## Scalar multiplication as repeated addition

Suppose we wanted to consider the repeated addition of a matrix.
If $\mathbf{A}=\left[\begin{array}{cc}4& 8\\ \\ 2& 1\end{array}\right]$, let's find $\mathbf{A}+\mathbf{A}+\mathbf{A}$.
$\begin{array}{rl}& \phantom{=}\mathbf{A}+\mathbf{A}+\mathbf{A}\\ \\ & =\left[\begin{array}{cc}4& 8\\ \\ 2& 1\end{array}\right]+\left[\begin{array}{cc}4& 8\\ \\ 2& 1\end{array}\right]+\left[\begin{array}{cc}4& 8\\ \\ 2& 1\end{array}\right]\\ \\ & =\left[\begin{array}{cc}4+4+4& 8+8+8\\ \\ 2+2+2& 1+1+1\end{array}\right]\\ \\ & =\left[\begin{array}{cc}3\cdot 4& 3\cdot 8\\ \\ 3\cdot 2& 3\cdot 1\end{array}\right]\\ \\ & =3\cdot \left[\begin{array}{cc}4& 8\\ \\ 2& 1\end{array}\right]\\ \\ & =3\mathbf{A}\end{array}$
Here we see that $\mathbf{A}+\mathbf{A}+\mathbf{A}=3\mathbf{A}$.
This is true for other scalar multiplications, so we can interpret scalar multiplication in the same way as we interpret multiplication with real numbers–as repeated matrix addition!

## Subtraction as the addition of the opposite

Another way scalar multiplication relates to addition and subtraction is by thinking about $\mathbf{A}-\mathbf{B}$ as $\mathbf{A}+\left(-\mathbf{B}\right)$, which is in turn the same as $\mathbf{A}+\left(-1\right)\cdot \mathbf{B}$. This is similar to how we can think about subtraction of two real numbers!