Writing equations in slope intercept form from a graph

An equation in the slope-intercept form is written as

$$y=mx+b$$

Where m is the slope of the line and b is the y-intercept. You can use this equation to write an equation if you know the slope and the y-intercept.


Example

Find the equation of the line

Writing equations in slope intercept form from a graph

Choose two points that are on the line

Writing equations in slope intercept form from a graph

Calculate the slope between the two points

$$m=\frac{y_{2}\, -y_{1}}{x_{2}\, -x_{1}}=\frac{\left (-1 \right )-3}{3-\left ( -3 \right )}=\frac{-4}{6}=\frac{-2}{3}$$

We can find the b-value, the y-intercept, by looking at the graph

Writing equations in slope intercept form from a graph

b = 1

We've got a value for m and a value for b. This gives us the linear function

$$y=-\frac{2}{3}x+1$$

In many cases the value of b is not as easily read. In those cases, or if you're uncertain whether the line actually crosses the y-axis in this particular point you can calculate b by solving the equation for b and then substituting x and y with one of your two points.

We can use the example above to illustrate this. We've got the two points (-3, 3) and (3, -1). From these two points we calculated the slope

$$m=-\frac{2}{3}$$

This gives us the equation

$$y=-\frac{2}{3}x+b$$

From this we can solve the equation for b

$$b=y+\frac{2}{3}x$$

And if we put in the values from our first point (-3, 3) we get

$$b=3+\frac{2}{3}\cdot \left ( -3 \right )=3+\left ( -2 \right )=1$$

If we put in this value for b in the equation we get

$$y=-\frac{2}{3}x+1$$

which is the same equation as we got when we read the y-intercept from the graph.

To summarize how to write a linear equation using the slope-interception form you

  1. Identify the slope, m. This can be done by calculating the slope between two known points of the line using the slope formula.
  2. Find the y-intercept. This can be done by substituting the slope and the coordinates of a point (x, y) on the line in the slope-intercept formula and then solve for b.

Once you've got both m and b you can just put them in the equation at their respective position.


Video lesson

Find the equation to the graph

Writing equations in slope intercept form from a graph

The slope-intercept form is one way to write a linear equation (the equation of a line). The slope-intercept form is written as y = mx+b, where m is the slope and b is the y-intercept (the point where the line crosses the y-axis). It's usually easy to graph a line using y=mx+b. Other forms of linear equations are the standard form and the point-slope form.

Equations of lines have lots of different forms. One form you're going to see quite often is called the slope intercept form and it looks like this: y=mx+b, where m stands for the slope number and b stands for the y intercept.
So, when you're doing problems where you're asked to write the equation in slope intercept form, you only need two pieces of information. The first piece of information you need is the slope number and the second piece of information you need is the y intercept. Once you have those two pieces, those two numbers, you just plug them in there and you're on your way.

Let's first quickly review slope intercept form.

Writing equations in slope intercept form from a graph

Equations that are written in slope intercept form are the easiest to graph and easiest to write given the proper information.

All you need to know is the slope (rate) and the y-intercept. Continue reading for a couple of examples!

Example 1: Writing an Equation Given the Slope and Y-Intercept


Write the equation for a line that has a slope of -2 and y-intercept of 5.

Writing equations in slope intercept form from a graph

NOTES: I substituted the value for the slope (-2) for m and the value for the y-intercept (5) for b. The variables x and y should always remain variables when writing a linear equation.

In the example above, you were given the slope and y-intercept. Now let's look at a graph and write an equation based on the linear graph.


Example 2: Writing An Equation Based on a Graph


Write an equation that represents the following graph.

Writing equations in slope intercept form from a graph


Solution

Step 1: Locate the y-intercept.

Step 2: Locate another point that lies on the line.

Step 3: Calculate the slope from the y-intercept to the second point.

Step 4: Write an equation in slope intercept form given the slope and y-intercept.

Writing equations in slope intercept form from a graph

Slope = 3

y-intercept = -2

y = mx + b

y = 3x - 2 is the equation that represents this graph.

Note:  You can also check your equation by analyzing the graph. You have a positive slope. Is your graph rising from left to right?

Yes, it is rising; therefore, your slope should be positive!

We've now seen an example of a problem where you are given the slope and y-intercept (Example 1). Example 2 demonstrates how to write an equation based on a graph.

Let's look at one more example where we are given a real world problem. How do we write an equation for a real world problem in slope intercept form?

What will we look for in the problem?



Real World Problems

When you have a real world problem, there are two things that you want to look for!

1. Rate: The rate is your slope in the problem. The following are examples of a rate:

  • $3 per day
  • $2 an hour
  • $5 per person
  • $6 a minute

This number is always related to the x value.

"Per" is a key word that is often associated with slope or a rate.

2.  A Flat Fee: A flat fee is your y-intercept. This value is a constant or fixed amount. It never changes!

Use the chart below to help you organize your information as you analyze each word problem. This will help you when writing equations

Writing equations in slope intercept form from a graph

Take a look at the examples below to better clarify how this chart can help you.

Example 3: Writing Equations for Real World Problems


You are visiting Baltimore, MD. A taxi company charges a flat fee of $3.00 plus an additional $0.75 per mile. Write an equation that you could use to find the cost of a taxi ride in Baltimore, MD. Let x represent the number of miles and y represent the total cost.

  • How much would a taxi ride for 8 miles cost?

Solution

Writing equations in slope intercept form from a graph

The y-intercept is 3. Since there is a flat fee of $3, this value becomes the y-intercept. It is a constant, a value that never changes.

The slope is 0.75. This is the rate per mile. A rate is also the slope.

Therefore, the equation that represents this problem is y = 0.75x + 3

  • How much would a taxi ride for 8 miles cost?

In order to determine this cost, we will need to use our equation and substitute 8 for x.

y = 0.75x + 3

y = 0.75(8) + 3

9 = (0.75)(8) + 3

The cost of an 8 mile taxi ride is $9.


Hopefully you now have the hang of writing equations in slope intercept form.

Remember to always look for the slope and the y-intercept.


  1. Home
  2. >
  3. Writing Equations
  4. >
  5. Writing Equations

Writing equations in slope intercept form from a graph

Need More Help With Your Algebra Studies?

Get access to hundreds of video examples and practice problems with your subscription! 

Click here for more information on our affordable subscription options.

Not ready to subscribe?  Register for our FREE Pre-Algebra Refresher course.

How do you put an equation in slope

To change the equation into slope-intercept form, we write it in the form y=mx+b .

How do you write an equation from a graph?

To find the equation of a graphed line, find the y-intercept and the slope in order to write the equation in y-intercept (y=mx+b) form. Slope is the change in y over the change in x.