Writing Equations of Lines
Learning Outcomes
- Use slope-intercept form to plot and write equations of lines.
- Use point-slope form to write the equation of a line.
- Write the equation of a line in standard form.
- Recognize vertical and horizontal lines from their graphs and equations.
Slope-Intercept Form
Perhaps the most familiar form of a linear equation is slope-intercept form written as , where and . Let us begin with the slope.The Slope of a Line
The slope of a line refers to the ratio of the vertical change in y over the horizontal change in x between any two points on a line. It indicates the direction in which a line slants as well as its steepness. Slope is sometimes described as rise over run.
If the slope is positive, the line slants upward to the right. If the slope is negative, the line slants downward to the right. As the slope increases, the line becomes steeper. Some examples are shown below. The lines indicate the following slopes: , , and .

A General Note: The Slope of a Line
The slope of a line, m, represents the change in y over the change in x. Given two points, and , the following formula determines the slope of a line containing these points:Example: Finding the Slope of a Line Given Two Points
Find the slope of a line that passes through the points and .Answer: We substitute the y-values and the x-values into the formula.
The slope is .
Analysis of the Solution
It does not matter which point is called or . As long as we are consistent with the order of the y terms and the order of the x terms in the numerator and denominator, the calculation will yield the same result.Try It
Find the slope of the line that passes through the points and .Answer:
[ohm_question]1719[/ohm_question]Example: Identifying the Slope and y-intercept of a Line Given an Equation
Identify the slope and y-intercept given the equation .Answer: As the line is in form, the given line has a slope of . The y-intercept is .
Analysis of the Solution
The y-intercept is the point at which the line crosses the y-axis. On the y-axis, . We can always identify the y-intercept when the line is in slope-intercept form, as it will always equal b. Or, just substitute and solve for y.Recall operations on fractions
Fractions are commonly encountered when writing equations for lines using the point-slope formula. Being able to multiply or add and subtract fractions will enable you to avoid decimal approximations for numbers like or . Adding or subtracting fractions: Multiplying fractions: Don't forget to simplify fractions in your final answer!The Point-Slope Formula
Given the slope and one point on a line, we can find the equation of the line using point-slope form.
This is an important formula, as it will be used in other areas of College Algebra and often in Calculus to find the equation of a tangent line. We need only one point and the slope of the line to use the formula. After substituting the slope and the coordinates of one point into the formula, we simplify it and write it in slope-intercept form.
A General Note: The Point-Slope Formula
Given one point and the slope, using point-slope form will lead to the equation of a line:Example: Finding the Equation of a Line Given the Slope and One Point
Write the equation of the line with slope and passing through the point . Write the final equation in slope-intercept form.Answer: Using point-slope form, substitute for m and the point for .
Analysis of the Solution
Note that any point on the line can be used to find the equation. If done correctly, the same final equation will be obtained.
Try It
Given , find the equation of the line in slope-intercept form passing through the point .Answer:
[ohm_question]110942[/ohm_question]Example: Finding the Equation of a Line Passing Through Two Given Points
Find the equation of the line passing through the points and . Write the final equation in slope-intercept form.Answer: First, we calculate the slope using the slope formula and two points.
Next, we use point-slope form with the slope of and either point. Let’s pick the point for .
In slope-intercept form, the equation is written as .
Analysis of the Solution
To prove that either point can be used, let us use the second point and see if we get the same equation.
We see that the same line will be obtained using either point. This makes sense because we used both points to calculate the slope.
Standard Form of a Line
Another way that we can represent the equation of a line is in standard form. Standard form is given as
where , , and are integers. The x and y-terms are on one side of the equal sign and the constant term is on the other side.
Example: Finding the Equation of a Line and Writing It in Standard Form
Find the equation of the line with and passing through the point . Write the equation in standard form.Answer: We begin by using point-slope form.
From here, we multiply through by 2 as no fractions are permitted in standard form. Then we move both variables to the left aside of the equal sign and move the constants to the right.
This equation is now written in standard form.
Try It
Find the equation of the line in standard form with slope which passes through the point .Answer:
[ohm_question]110946[/ohm_question]Vertical and Horizontal Lines
The equations of vertical and horizontal lines do not require any of the preceding formulas, although we can use the formulas to prove that the equations are correct. The equation of a vertical line is given as
where c is a constant. The slope of a vertical line is undefined, and regardless of the y-value of any point on the line, the x-coordinate of the point will be c.
Suppose that we want to find the equation of a line containing the following points: , and . First, we will find the slope.
Zero in the denominator means that the slope is undefined and, therefore, we cannot use point-slope form. However, we can plot the points. Notice that all of the x-coordinates are the same and we find a vertical line through .
The equation of a horizontal line is given as
where c is a constant. The slope of a horizontal line is zero, and for any x-value of a point on the line, the y-coordinate will be c.
Suppose we want to find the equation of a line that contains the following set of points: , and . We can use point-slope form. First, we find the slope using any two points on the line.
Use any point for in the formula, or use the y-intercept.
The graph is a horizontal line through . Notice that all of the y-coordinates are the same.

try it
Use an online graphing calculator to graph the following:- A horizontal line that passes through the point (-5,2)
- A vertical line that passes through the point (3,3)
Example: Finding the Equation of a Line Passing Through the Given Points
Find the equation of the line passing through the given points: and .Answer: The x-coordinate of both points is 1. Therefore, we have a vertical line, .
Try It
Find the equation of the line passing through and .Answer: Horizontal line:
[ohm_question]110951[/ohm_question] [ohm_question]110952[/ohm_question]