[cite: 1] [cite: 1]

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.

Review of Formulas

The following formulas for slopes and equations of lines are used to solve the examples below:

  1. The slope \(m\) of a line with rise \(\Delta y\) corresponding to run \(\Delta x\) is given by: \[ m = \dfrac{\Delta y}{\Delta x} \]
  2. The slope \(m\) of a line through two points \((x_1, y_1)\) and \((x_2, y_2)\) is given by: \[ m = \dfrac{y_2 - y_1}{x_2 - x_1} \]
  3. The equation of a line passing through point \((x_0, y_0)\) with slope \(m\) is given by: \[ y - y_0 = m(x - x_0) \]
  4. The equation of a line with \(y\)-intercept at \((0, b)\) and slope \(m\) is given by: \[ y = mx + b \]
  5. The equation of a horizontal line through \((x_0, y_0)\) is given by: \[ y = y_0 \]
  6. The equation of a vertical line through \((x_0, y_0)\) is given by: \[ x = x_0 \]
  7. The slopes \(m_1\) and \(m_2\) of two perpendicular lines satisfy: \[ m_1 \cdot m_2 = -1 \]
  8. The slopes \(m_1\) and \(m_2\) of two parallel lines satisfy: \[ m_1 = m_2 \]

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
Fig.1 - Line passing through graph points
View Solution to Example 1

Use two points \((2, 2)\) and \((3, 4)\) from the graph to find the slope \(m\):

\[ m = \dfrac{4 - 2}{3 - 2} = 2 \]

Using a point and the slope in point-slope form:

\[ y - 2 = 2(x - 2) \]

Simplifying to slope-intercept form:

\[ y = 2x - 2 \]

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
Fig.2 - Line with rise and run
View Solution to Example 2

The slope of the line is given by:

\[ m = \dfrac{\text{rise}}{\text{run}} = \dfrac{\Delta y}{\Delta x} = \dfrac{2}{2} = 1 \]

The \(y\)-intercept is the point \((0, -\frac{3}{2})\).

The equation in slope-intercept form is:

\[ y = x - \frac{3}{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
Fig.3 - Line with fall and run
View Solution to Example 3

The slope of the line is given by:

\[ m = \dfrac{\text{fall}}{\text{run}} = \dfrac{\Delta y}{\Delta x} = \dfrac{-4.5}{3} = -1.5 \]

Given the point \((1, -5)\) and slope, use point-slope form:

\[ y - (-5) = -1.5(x - 1) \]

In slope-intercept form:

\[ y = -1.5x - 3.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
Fig.4 - Horizontal line
View Solution to Example 4

The equation of the horizontal line passing through \((0, -3)\) is:

\[ 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
Fig.5 - Vertical line
View Solution to Example 5

The equation of the vertical line passing through \((2, 0)\) is:

\[ x = 2 \]

Example 6: Graph of Perpendicular Line

Find the slope-intercept form of the equation of line \(L_2\) that is perpendicular to line \(L_1\) as shown below.

graph of perpendicular line for example 6
Fig.6 - Perpendicular lines
View Solution to Example 6

First, find the slope \(m_1\) of line \(L_1\) passing through points like \((-4, 0)\) and \((2, 2)\):

\[ m_1 = \dfrac{2 - 0}{2 - (-4)} = \dfrac{2}{6} = \dfrac{1}{3} \]

Since \(L_1\) and \(L_2\) are perpendicular, their slopes satisfy \(m_1 \cdot m_2 = -1\):

\[ m_2 = -\dfrac{1}{m_1} = -\dfrac{1}{1/3} = -3 \]

Using point \((-4, 0)\) on \(L_2\) and slope \(m_2 = -3\):

\[ y - 0 = -3(x - (-4)) \implies y = -3x - 12 \]

Exercises with Answers

Find the equations of the lines \(L_1\), \(L_2\), \(L_3\), and \(L_4\) such that \(L_2\) is parallel to \(L_1\), \(L_3\) is perpendicular to \(L_1\), and \(L_4\) is a horizontal line.

graphs of lines for exercises
Fig.7 - Exercise graphs
View Answers to Exercises
  1. Equation of \(L_1\): \( y = 2x + 4 \)
  2. Equation of \(L_2\): \( y = 2x - 2.5 \)
  3. Equation of \(L_3\): \( y = -\dfrac{1}{2}x - \dfrac{7}{2} \)
  4. Equation of \(L_4\): \( y = -5 \)

More References and Links to Equations and Slopes of Lines