We've updated our
Privacy Policy effective December 15. Please read our updated Privacy Policy and tap

Study Guides > Intermediate Algebra

Read: Write the Equation of a Linear Function Part I

Learning Objectives

  • Define the equation of a line given two points
  • Define the equation of a line given the slope and a point
  • Write a linear function in standard form
  • Identify the equations for vertical and horizontal lines

Point-Slope Formula

We have seen that we can define the slope of a line given two points on the line, and use that information along with the y-intercept to graph the line.  If you don't know the y-intercept, or the equation for the line you can use two points to define the equation of the line using the point-slope formula.

[latex]y-{y}_{1}=m\left(x-{x}_{1}\right)[/latex]

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.

The Point-Slope Formula

Given one point and the slope, the point-slope formula will lead to the equation of a line:

[latex]y-{y}_{1}=m\left(x-{x}_{1}\right)[/latex]

In our first example, we will start with the slope, then we will show how to find the equation of a line without being given the slope.

Example

Write the equation of the line with slope [latex]m=-3[/latex] and passing through the point [latex]\left(4,8\right)[/latex]. Write the final equation in slope-intercept form.

Answer: Using the point-slope formula, substitute [latex]-3[/latex] for m and the point [latex]\left(4,8\right)[/latex] for [latex]\left({x}_{1},{y}_{1}\right)[/latex].

[latex]\begin{array}{l}y-{y}_{1}=m\left(x-{x}_{1}\right)\hfill \\ y - 8=-3\left(x - 4\right)\hfill \\ y - 8=-3x+12\hfill \\ y=-3x+20\hfill \end{array}[/latex]

Note that any point on the line can be used to find the equation. If done correctly, the same final equation will be obtained.

In our next example we will start with two points and define the equation of the line that passes through them.

Example

Find the equation of the line passing through the points [latex]\left(3,4\right)[/latex] and [latex]\left(0,-3\right)[/latex]. Write the final equation in slope-intercept form.

Answer: First, we calculate the slope using the slope formula and two points.

[latex]\begin{array}{l}m\hfill=\dfrac{-3 - 4}{0 - 3}\hfill \\ \hfill =\dfrac{-7}{-3}\hfill \\ \hfill =\dfrac{7}{3}\hfill \end{array}[/latex]

Next, we use the point-slope formula with the slope of [latex]\dfrac{7}{3}[/latex], and either point. Let’s pick the point [latex]\left(3,4\right)[/latex] for [latex]\left({x}_{1},{y}_{1}\right)[/latex].

[latex]\begin{array}{l}y - 4=\dfrac{7}{3}\left(x - 3\right)\hfill \\ y - 4=\dfrac{7}{3}x - 7\hfill&\text{Distribute the }\dfrac{7}{3}.\hfill \\ y=\dfrac{7}{3}x - 3\hfill \end{array}[/latex]

In slope-intercept form, the equation is written as [latex]y=\dfrac{7}{3}x - 3[/latex]. To prove that either point can be used, let us use the second point [latex]\left(0,-3\right)[/latex] and see if we get the same equation.

[latex]\begin{array}{l}y-\left(-3\right)=\dfrac{7}{3}\left(x - 0\right)\hfill \\ y+3=\dfrac{7}{3}x\hfill \\ y=\dfrac{7}{3}x - 3\hfill \end{array}[/latex]

We see that the same line will be obtained using either point. This makes sense because we used both points to calculate the slope.

The following video examples shows how to write the equation for a line given it's slope and a point on the line. https://youtu.be/vut5b2fRQQ0

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

[latex]Ax+By=C[/latex]

where [latex]A[/latex], [latex]B[/latex], and [latex]C[/latex] 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

Find the equation of the line with [latex]m=-6[/latex] and passing through the point [latex]\left(\dfrac{1}{4},-2\right)[/latex]. Write the equation in standard form.

Answer: We begin using the point-slope formula.

[latex]\begin{array}{l}y-\left(-2\right)=-6\left(x-\dfrac{1}{4}\right)\hfill \\ y+2=-6x+\dfrac{3}{2}\hfill \end{array}[/latex]

From here, we multiply through by [latex]2[/latex], as no fractions are permitted in standard form, and then move both variables to the left aside of the equal sign and move the constants to the right.

[latex]\begin{array}{l}2\left(y+2\right)=\left(-6x+\dfrac{3}{2}\right)2\hfill \\ 2y+4=-12x+3\hfill \\ 12x+2y=-1\hfill \end{array}[/latex]

This equation is now written in standard form.

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

[latex]x=c[/latex]

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: [latex]\left(-3,-5\right),\left(-3,1\right),\left(-3,3\right)[/latex], and [latex]\left(-3,5\right)[/latex]. First, we will find the slope.

[latex]m=\dfrac{5 - 3}{-3-\left(-3\right)}=\dfrac{2}{0}[/latex]

Zero in the denominator means that the slope is undefined and, therefore, we cannot use the point-slope formula. However, we can plot the points. Notice that all of the x-coordinates are the same and we find a vertical line through [latex]x=-3[/latex]. The equation of a horizontal line is given as

[latex]y=c[/latex]

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: [latex]\left(-2,-2\right),\left(0,-2\right),\left(3,-2\right)[/latex], and [latex]\left(5,-2\right)[/latex]. We can use the point-slope formula. First, we find the slope using any two points on the line.

[latex]\begin{array}{l}m=\dfrac{-2-\left(-2\right)}{0-\left(-2\right)}\hfill \\ =\dfrac{0}{2}\hfill \\ =0\hfill \end{array}[/latex]

Use any point for [latex]\left({x}_{1},{y}_{1}\right)[/latex] in the formula, or use the y-intercept.

[latex]\begin{array}{l}y-\left(-2\right)=0\left(x - 3\right)\hfill \\ y+2=0\hfill \\ y=-2\hfill \end{array}[/latex]

The graph is a horizontal line through [latex]y=-2[/latex]. Notice that all of the y-coordinates are the same.
Coordinate plane with the x-axis ranging from negative 7 to 4 and the y-axis ranging from negative 4 to 4. The function y = negative 2 and the line x = negative 3 are plotted. The line [latex]x=−3[/latex] is a vertical line. The line [latex]y=−2[/latex] is a horizontal line.

Example

Find the equation of the line passing through the given points: [latex]\left(1,-3\right)[/latex] and [latex]\left(1,4\right)[/latex].

Answer: The x-coordinate of both points is [latex]1[/latex]. Therefore, we have a vertical line, [latex]x=1[/latex].

Our last video show another example of writing the equation of a line given two points on the line. https://youtu.be/ndRpJxdmZJI

Summary

  • The slope of a line indicates the direction in which a line slants as well as its steepness. Slope is defined algebraically as:[latex]m=\dfrac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}[/latex]
  • Given the slope and one point on a line, we can find the equation of the line using the point-slope formula. [latex]y-{y}_{1}=m\left(x-{x}_{1}\right)[/latex]
  • Standard form of a line is given as [latex]Ax+By=C[/latex].
  • The equation of a vertical line is given as [latex]x=c[/latex]
  • The equation of a horizontal line is given as [latex]y=c[/latex]

Licenses & Attributions

CC licensed content, Original

CC licensed content, Shared previously

  • Ex: Find the Equation of a Line in Point Slope and Slope Intercept Form Given the Slope and a Point. Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.
  • Ex: Find The Equation of the Line in Point-Slope and Slope Intercept Form Given Two Points. Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.
  • College Algebra. Provided by: OpenStax Located at: https://cnx.org/contents/[email protected]:1/Preface. License: CC BY: Attribution. License terms: Download for free: http://cnx.org/contents/[email protected]:1/Preface.