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} \goldE{\text{3 columns}} \\\\ \begin{array}{c} \blueE{\text{2 rows}}&\goldE{\LARGE\downarrow}&\goldE{\LARGE\downarrow}&\goldE{\LARGE\downarrow} \\\\ \begin{array}{c} \blueE{\LARGE\rightarrow} \\\\ \blueE{\LARGE\rightarrow}\end{array} &\left[\begin{array}{c} -2 \\\\ 5\end{array}\right. &\begin{array}{c}5 \\\\ 2\end{array} &\left.\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, times, 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 $\bold A=\left[\begin{array}{c} 4 &8 \\\\ 3 & 7 \end{array}\right]$ and $\bold B=\left[\begin{array}{c} 1 &0 \\\\ 5 & 2 \end{array}\right]$, let's find A, plus, B.
We can find the sum simply by adding the corresponding entries in matrices A and B. This is shown below.
\begin{aligned} \bold A+\bold B &= \left[\begin{array}{c} \blueE{4} &\blueE{8} \\\\ \blueE{3} & \blueE{7} \end{array}\right]+\left[\begin{array}{c} \goldE{1} &\goldE{0} \\\\ \goldE{5} & \goldE{2} \end{array}\right] \\\\ &= \left[\begin{array}{c} \blueE{4}+\goldE{1} &\blueE{8}+\goldE{0} \\\\ \blueE{3}+\goldE{5} & \blueE{7}+\goldE{2} \end{array}\right] \\\\ &= \left[\begin{array}{c} 5 &8 \\\\ 8 & 9 \end{array}\right] \end{aligned}

Problem 1
$\bold A=\left[\begin{array}{c} 5 &2 \\\\ 0& 1 \\\\ 1 & 9 \end{array}\right]$ and $\bold B=\left[\begin{array}{c} 2 &3 \\\\ 4& 1 \\\\ 0 & 2 \end{array}\right]$.
A, plus, B, equals

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

Subtracting matrices

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

Problem 3
$\bold X=\left[\begin{array}{c} 4 &16 \\\\ 10& 22 \end{array}\right]$ and $\bold Y=\left[\begin{array}{c} 1 &15 \\\\ 6& 3 \end{array}\right]$.
X, minus, Y, equals

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

Suppose we wanted to consider the repeated addition of a matrix.
If $\bold A=\left[\begin{array}{c} 4 &8 \\\\ 2& 1 \end{array}\right]$, let's find A, plus, A, plus, A.
\begin{aligned} &\phantom{=}\bold A+\bold A+\bold A \\\\ &= \left[\begin{array}{c} 4 &8 \\\\ 2& 1 \end{array}\right]+\left[\begin{array}{c} 4 &8 \\\\ 2& 1 \end{array}\right]+\left[\begin{array}{c} 4 &8 \\\\ 2& 1 \end{array}\right] \\\\ &=\left[\begin{array}{c} 4+4+4 & 8+8+8 \\\\ 2+2+2 & 1+1+1 \end{array}\right] \\\\ &=\left[\begin{array}{c} \greenD{3}\cdot 4 & \greenD{3}\cdot 8 \\\\ \greenD{3}\cdot 2 & \greenD{3}\cdot 1 \end{array}\right] \\\\ &=\greenD{3}\cdot \left[\begin{array}{c} 4 &8 \\\\ 2& 1 \end{array}\right] \\\\ &=\greenD 3\bold A \end{aligned}
Here we see that A, plus, A, plus, A, equals, 3, 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 A, minus, B as A, plus, left parenthesis, minus, B, right parenthesis, which is in turn the same as A, plus, left parenthesis, minus, 1, right parenthesis, dot, B. This is similar to how we can think about subtraction of two real numbers!

Want to join the conversation?

• How do matrices actually help in the real world? Where could I apply this knowledge?
• Hi Anjana,

Do you remember solving systems of equations:

You will be glad to know that matrix notation makes this task trivial.

As you continue your study of math I hope you take a class in linear algebra where the matrix is an essential tool. From time to time I'm still amazed at real world applications especially in engineering.

Regards,

APD
• this was the hardest subject to actually learn. the negative numbers really trick you.
• Why is it undefined when adding matrices of different dimensions? Can't you just add the corresponding elements and leave the elements that don't have corresponding parts the same?
• You cannot just add the corresponding elements and leave the elements that don't have corresponding parts the same. It does not mean that it's a 0 if they don't have the "parts". It means they are undefined.
• I put -11, 16, 16, 10 for problem 2, but it said it was incorrect. I clicked on the 'I need help' button, and it had the same answer, but it was still marked as incorrect. What did I do wrong?
• I don't know ... I just input those values and it marked it correct. Did you maybe use the letter "o" instead of zero? Or, maybe you typed a space somewhere? Try it again and see what happens.
• the second to last question. Wasn't it supposed to be subtraction and not addition because of the showing on top?
• To solve an equation like this, it is useful to think of the matrices as variables. So in this case, we have an equation along the lines of B-A=C with A representing the first matrix and the second one being represented by C. The goal of this is to isolate B and we accomplish this by adding A to both sides, leaving us with B=C+A. Now, we can substitue the matrices back in for the variables, leaving us with the answer. Look a little above this to see how Sal explained it.
• Would adding a 2x1 matrix to a 3x1 be like adding a 2 dimensional vector to a 3 dimensional vector? Or is there a better way to do this? Could an extra zero be added to the 2x1 to make it a 3x1?
(1 vote)
• The problem is that there is no good way to standardize where the zero would get added. Why would turning <1, 2> into <1, 2, 0> be better or worse than turning it into <0, 1, 2>, or even <1, 0, 2>?