How Do You Find the Equation of a Line?

To find a line's equation, identify two of the points through which the line passes, and then use the "x" and "y" coordinates to find the slope of the line, or the rate at which it climbs or falls. Use the slope to find the line's intersection with the y-axis.

  1. Find two points on the line

    Look on the graph where the line appears, and use the number lines on the x- and y-axis to determine coordinates that appear on the line. Write the coordinates of the two points in ordered pairs so that they look like (x1, y1) and (x2, y2).

  2. Calculate the slope of the line

    Remember that the standard form of a linear equation is y = mx + b, in which m refers to the slope and b refers to the y-intercept, or the place where the line crosses the y-axis. Find the slope (m) by subtracting the first y coordinate from the second, and the first x coordinate from the second, and then dividing the difference of the y coordinates by the difference of the x coordinates. Set up the formula like this: m = (y2-y1)/(x2-x1).

  3. Calculate the y-intercept of the line

    Write the standard form of the line equation, but substitute one of the two ordered pairs for x and y, and substitute the slope you calculated in Step 2 for m. Consider a line that goes through the point (1,1) with a slope of 4; plugging those values in turns y = mx + b into 1 = (4)(1) + b, or 1 = 4 + b. Subtract 4 from each side of the equation to get -3 = b. Write the final answer for the example as y = 4x + (-3) or, more simply, y = 4x - 3.