Processing math: 100%

Find Equation of a Line from a Graph

Examples on how to find the equations of lines given their graphs. Examples and exercises are presented along with their detailed solutions and answers.
These following are reviews of formulas for slopes and equations of lines and are therefore used to solve the examples below.

  1. The slope m of a line with rise Δy corresponding to a run Δx is given by m=ΔyΔx
  2. The slope m of a line through two points with coordinates (x1,y1) and (x2,y2) is given by m=y2y1x2x1
  3. The equation of a line that passes through the point (y0,x0) and has slope m is given by yy0=m(xx0)
  4. The equation of a line with the y - intercept at (0,b) and has slope m is given by y=mx+b
  5. The equation of a horizontal line through the point (x0,y0) is given by y=y0
  6. The equation of a vertical line through the point (x0,y0) is given by x=x0
  7. The slopes m1 and m2 of two perpendicular lines are related as follows m1m2=1
  8. The slopes m1 and m2 of two parallel lines are related as follows m1=m2

Examples with Detailed Solutions

Example 1 Graph of line with points
Find the equation of the line whose graph is shown below and write it in slope intercept form.

graph of line for example 1

Solution to Example 1
Let use two points (2,2) and (3,4) from the graph to find the slope m of the line whose graph is shown above
m=4232=2
We know at least a point and the slope, the equation of the line in point slope form is given by
y2=2(x2)
In point slope form the equation is written as
y=2x2



Example 2 Graph of line given run and rise
Find the equation of the line whose graph, including the rise and run, is shown below.

graph of line for example 2

Solution to Example 2
The slope of the line whose graph is shown above is given by
m=riserun=ΔyΔx=22=1
The y intercept is the point (0,3/2)
The equation of the line in slope intercept form is given by
y=x3/2



Example 3 Graph of line given run and fall
Find the equation, in slope intercept form, of the line whose graph, including the fall and run, is shown below.

graph of line for example 3

Solution to Example 3
The slope of the line whose graph is shown above is given by
m=fallrun=ΔyΔx=4.53=1.5
Given a point (1,5) and the slope of the line, we use the point slope form of the equation of the line
y(5)=1.5(x1)
In slope intercept form, the equation of the above graph is written as
y=1.5x3.5



Example 4 Graph of horizontal line
Find the equation of the horizontal line whose graph is shown below.

graph of horizontal line for example 4

Solution to Example 4
The equation of the horizontal line through the point (0,3) is given by
y=3



Example 5 Graph of vertical line
Find the equation of the vertical line whose graph is shown below.

graph of vertical line for example 5

Solution to Example 5
The equation of the vertical line through the point (2,0) is given by
x=2



Example 6 Graph of perpendicular line
Find the slope intercept form of the equation of line L2 that is perpendicular to line L1 as shown below.

graph of perpendicular line for example 6

Solution to Example 6
We need to find the slope m2 of line L2 which is perpendicular to line L1 with slope m1 given by
m1=202(4)=13
L1 and L2 are perpendicular and therefore
m1m2=1
Solve the above for m2
m2=1/m1=1/(1/3)=3
The equation of line L1 in point slope form is given by
y0=3(x(4))
and in slope intercept form is given by
y=3x12



Exercises with Answers

Find the equations of the lines L1, L2, L3 and L4 such that L2 is parallel to L1, L3 is perpendicular to L1 and L4 is a horizontal line.

graphs of lines for exercises

Answers to the Above Exercises

  1. Equation of L1 : y=2x+4
  2. Equation of L2 : y=2x2.5
  3. Equation of L3 : y=12x72
  4. Equation of L4 : y=5


More References and Links to Equations and Slopes of Lines

Equations of Lines in Different Forms.
Equation of Line Questions with Solutions.
Slopes of Parallel Lines Questions.
Slopes of Perpendicular Lines Questions.
slopes