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.

## Pre-algebra

### Course: Pre-algebra>Unit 7

Lesson 8: Dependent and independent variables

# Dependent & independent variables

We introduce independent and dependent variables: how to identify the independent/dependent variable in a given setting, and how we write equations with the dependent variable by itself. Created by Sal Khan.

## Video transcript

- [Teacher] Let's say that you love to eat apples, and you are going to buy a apples, so a is the number of apples, number of apples, but you also have a budget, so you have to care about costs, so let's say C is equal to the total cost, and let's say that the price of an apple is \$2, so \$2 per apple. There's several ways that we can express the relationship between the total cost and the number of apples. One way is if we solve for the total cost, and we say, okay, the total cost is gonna be \$2 per apple times the number of apples, so it's going to be 2a. Another way that we could rewrite this if we were to divide both sides of this by two, we would get that the number of apples is equal to cost over two. These are equivalent expressions I should say these are equivalent equations, but the way they've been written, make it useful for different scenarios. For example, on the left-hand side here, it's really easy to try out different As and then think about how that will affect the cost, and so when it's written like this, we would call the variable that it's easy to try out different values, we would call that the independent variable, independent variable, and then the one that we are essentially solving for that we then spit out a value after we compute using the independent variable, you call that the dependent variable. You could view it as, look in this situation, the cost is dependent on the number of apples you choose to eat. Now, when we wrote it over here, this looks a little bit different. Now the number of apples is solved for, and we compute how many apples based on the cost, so this would be a scenario where you have a budget and you tell me what the budget is and I could tell you the number of apples. So in this situation, C is the independent variable, and since we have solved for a, a is the dependent variable. This is useful if I give you a number of apples and you want to know the total cost, and this is useful if you have a certain cost and then you want to find out the number of apples.