Main content

## Precalculus

### Course: Precalculus > Unit 7

Lesson 4: Adding and subtracting matrices# Adding & 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**.The $A$ has $2$ rows and $3$ columns, it is called a $2\times 3$ matrix.

**dimensions**of a matrix give the number of rows and columns of the matrix*in that order*. Since matrixIf 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!

## Adding matrices

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.

### Check your understanding

## 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.

### Check your understanding

## 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}$ .

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}+(-\mathbf{B})$ , which is in turn the same as $\mathbf{A}+(-1)\cdot \mathbf{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?(25 votes)
- Hi Anjana,

Do you remember solving systems of equations:

https://www.khanacademy.org/math/algebra-home/alg-system-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(46 votes)

- 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?(7 votes)
- 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.(12 votes)

- this was the hardest subject to actually learn. the negative numbers really trick you.(12 votes)
- 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?(3 votes)
- 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>?(7 votes)

- Means dimensions of matrices should always be same?(3 votes)
- If you wish to add and subtract them, yes. If you wish to multiply them or use them in other ways, then not necessarily.(4 votes)

- the second to last question. Wasn't it supposed to be subtraction and not addition because of the showing on top?(2 votes)
- 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.(2 votes)

- 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?(2 votes)
- 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.(1 vote)

- if we alternate rows of a matrices during adding or subtracting 2 matrices,will it be okay? :/(2 votes)
- How do you add the elements of a single matrix to it self, like say the elements of just A?(1 vote)
- Adding all the elements of a matrix to itself would be the same as multiplying every cell in the matrix by 2, or multiplying the matrix itself by 2. You don't need to worry about the dimensions lining up because you are adding the same matrix to itself, and then you would simply multiply every cell in the matrix by 2.(2 votes)

- What exactly is an augmented matrix? My understanding is that if I have a linear system like 2x + y = 1, then the following is the same system but in augmented matrix form: [2 1 1].

I know it's a stupid question, but it's bothering me.(1 vote)- Yes, you are correct. The extra column of right-hand side constants augments the matrix.(2 votes)