Linear Equation Graphs

Linear equation graphs are always a straight line. And you just need two points to draw a straight line (try it out!), which is the key to drawing the graphs.

If you're looking to find the linear equation from a graph, check out our step-by-step guide below. If you're looking to graph a linear equation, scroll down to our linear equation grapher.


Graph to Linear Equation

There are five easy steps to getting the linear equation from a graph:

  1. Find two points: We need two points to figure out our equation. So, we should look for two points that have whole numbers as xx and yy coordinates.
    Let's say this is our graph:
    We're going to pick the two blue points, which are (0,7)(0, 7) and (1,4)(-1, 4).
  2. Get the slope: Next, we need to use our two points to get the slope of the line. Let's remember how to get the slope...

    Slope Formula

    Let's say we have two points: Point 1 with coordinates (x1,y1)\textcolor{#F18F01}{(x_1,y_1)} and Point 2 with coordinates (x2,y2)\textcolor{#A14DA0}{(x_2,y_2)}. The slope is given by the change in yy by the change in xx:m=slope=y1y2x1x2m = \text{slope} = \frac{\textcolor{#F18F01}{y_1} - \textcolor{#A14DA0}{y_2}}{\textcolor{#F18F01}{x_1} - \textcolor{#A14DA0}{x_2}}
    So, with our two points, our slope is:y1y2x1x2=740(1)=31=3\frac{\textcolor{#F18F01}{y_1} - \textcolor{#A14DA0}{y_2}}{\textcolor{#F18F01}{x_1} - \textcolor{#A14DA0}{x_2}} = \frac{7-4}{0-(-1)} = \frac{3}{1} = 3
  3. Slope-intercept form: Now, we can plug our slope into slope-intercept form, which isy=mx+by = mx + b
    where mm is the slope. Plugging in our slope of 3, we get y=3x+by = 3x + b
  4. y-intercept: Finally, we need to get our value for bb. We can do this, by plugging in one of original points. We're going to choose the first point: (0,7).(0, 7). Plugging in, we get this:y=3x+b    7=3(0)+by = 3x + b \implies 7 = 3(0) + b
    If we solve this equation, we get:7=3(0)+b7=0+b7=b\begin{aligned} 7 &= 3(0) + b\\ 7 &= 0 + b\\ 7 &= b\end{aligned}
  5. Final equation: Now, we can plug our bb value in to get our equation:y=3x+7y = 3x + 7

Linear Equation Grapher

There are four easy steps to graphing a linear equation:

  1. Slope-intercept form: We need our equation to be in slope-intercept form,y=mx+by = mx + b
    where mm and bb represent numbers. Enter in some numbers for mm and bb.
    y=y=x+x \> + \>
  2. Plot the y-intercept: Now, remember, we need two points to draw a line. The easiest point to get is the y-intercept, where x=0x=0. All we need to do is plug-in 00 for xx in our equation:    y=(0)+y=\begin{aligned}\implies &y = (0)+\\ &y = \end{aligned}
    So, the first point we can plot is \textcolor{#00bbff}{}:
  3. Plot another point: We need another point, and we can find it by plugging in any other number in for xx. We're going to pick x=1x = 1, so all we need to do is plug-in 11 for xx in our equation:    y=(1)+y=\begin{aligned}\implies &y = (1)+\\ &y = \end{aligned}
    So, the second point we can plot is \textcolor{#00bbff}{}:
  4. Connect the lines: All that's left to do now is connect the dots 👏🏿👏🏾👏🏼!