Let's say that one day you decide to start training for a marathon. You start at your house, stretch, and look at your watch. It reads 6:00 pm. You plug in your headphones and begin to run around town. After a while, you realize you can't run anymore, and look at your watch. It reads 7:30 pm, and you're 7.5 miles from home. How fast was your average speed over the course of the run?
Our two variables are time and distance, and you have the data for two separate points. The first point is at your house, where your watch read 6:00, let's call this the beginning time and set it to 0. So our first point is (0, 0) as we hadn't run any distance yet. Let's think about our time in hours. So our second point is 1.5 hours later, and we ran 7.5 miles. So our second point is (1.5, 7.5). Our speed is simply the slope of the line connecting the two points. The slope, given by
becomes
To graph this line, we need the yintercept and the slope.
We have just calculated the slope, but what's the yintercept?
Since we started at (0, 0), we can see that the yintercept is 0.
So our final function is
With this new function, we can now answer some more questions.
 How many miles had we run after the first half hour?

If we kept running at the same pace for a total of 3 hours, how many miles will we have run?
$26=5x$ , so$x=\frac{26}{5}=5.2$ hours.
There are many such applications for linear equations.
Anything that involves a constant rate of change can be nicely represented with a line with the slope.
Indeed, so long as you have just two points, if you know the function is linear, you can graph it and begin asking questions!
Just make sure what you're asking and graphing makes sense.
For instance, in the marathon example, the domain is really only
Let's look at another application.
Two trains start 200 miles apart.
They are travelling towards each other.
The first train is travelling 40 miles per hour, while the second train is travelling 60 miles per hour.
When and where do they meet?
For simplicity we should put one of the trains starting at (0, 0), and so the other train must start at either (0, 200) or (0, 200) as it is 200 miles away.
We'll choose (0, 200).
The first train is travelling 40 miles per hour towards the other train, which is in the positive y direction, so the slope is positive 40.
The second train is travelling towards the first at 60 miles per hour, which is in the negative y direction, so the slope is negative 60.
Now we have the equations for both of the functions.
Let

$40x = 60x + 200$ 
$100x = 200$ 
$x = 2$
They meet after 2 hours of travel.
To find out where they meet, plug x=2 into one of the equations, say f(x).
Thus