# Dependent and independent variables exercise: express the graph as an equation | Khan Academy

Let’s see. We have this graph

over here with t is the independent variable

on the horizontal axis and d is the dependent

variable on the vertical axis. And then they have a table here. Looks like this table

corresponds to this graph. When t equals 1, d is 40,

when t is equal to 2, d is 80. So these points correspond

to points on this line. And then they explain to us,

you are buying a gym membership. The membership

costs $40 per month. In the graph and table above, d

is the total number of dollars that you pay for

your gym membership, so that’s d right over there,

and t is the time in months that you keep the membership. Write an equation for

the amount of money d that you pay for

your gym membership, if you keep the

membership for t months. And you see that here. If you’re one

month, you pay $40, two months you pay

another $40, you pay $80. You see that in the

graph right over here. If you have 0 months,

you pay nothing. Then one month, $40, the

next month another $40 getting you to $80. So if I were to write

this as an equation, the dependent variable

here is the amount that I pay in dollars. So that is going to

depend on the time. And how is it going to

depend on the time in months? Well I’m going to pay

$40 per month times the number of months. So I can either write it as

40 with a little asterisk sign, which is Shift 8–

and then I put t there– or I could literally put

just a t right over there. And I think that’s right,

because if my time is 0 according to this table and

according to this graph, I pay nothing. If there was some initial

membership charge then maybe we would add

that membership charge and you would pay the

monthly fee after that. But here this looks about

right, that the dollars paid is equal to 40

times the time in months. The time in months is

the independent variable. It drives the

dependent variable, the number of dollars you pay.

im confused

this really helpful