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.

### Course: Precalculus>Unit 7

Lesson 6: Using matrices to manipulate data

# Using matrices to manipulate data: Pet store

In other videos, we saw how we can use matrices to represent real-world situations. Once we do that, we can also manipulate the matrices (using common matrix operations like addition, subtraction, and scalar multiplication) to reveal more information about the context. Here, we manipulate matrices that represent the inventory of dog food in a pet store chain. Created by Sal Khan.

## Want to join the conversation?

• At , Sal said matrix C is how many more (or less,) bags. Wouldn't the more or less statement make this an absolute value problem? With the wording used, I see matrix C as:
3 1
7 3
5 6
• Is there a simple way to figure out if we subtract or add?
(1 vote)
• Yes, to calculate matrix C, you need to subtract the corresponding entries of matrix B from matrix A. If you want to know how many more bags of each type and size there are in location A relative to location B, you need to subtract the number of bags in location B from the number of bags in location A. If the result is positive, then there are more bags in location A, and if it is negative, then there are fewer bags in location A. So, to summarize, you subtract when you want to find the difference between two values, and you add when you want to find the sum of two values.