1.3 Linear Functions
Part B: Finding the Equation of a Line

Previous tutorial: Part A: Basics: Slope and Intercept

(This topic is also in Section 1.3 in Finite Mathematics, Applied Calculus and Finite Mathematics and Applied Calculus)

For best viewing, adjust the window width to at least the length of the line below.

In the last tutorial we studied the meaning of the slope, m, and intercept, b, of a linear function f(x) = mx + b.

Q How do I get the equation of a linear function?
A That depends on the information you have about the linear function. If, for example, you know the slope and intercept, then you can simply write down the function without the need for any computation.

Example The linear equation with slope 5 and y-intercept -3 is

Q What if I am not given the slope and intercept?
A The most systematic way of obtaining the equation of a line -- and this is a method that always works -- is to use the slope-intercept formula, for which we need to know two things about the line:

(This is the minimum information we need to know: knowing the slope tells us the direction of the line, and knowing a point fixes its position in space.)

Point-Slope Formula

The equation of the line through the point (x1, y1) with slope m is given by

    y = mx + b
where
    b = y1 - mx1

When to Apply the Point-Slope Formula
Apply the point-slope formula to find the equation of a line whenever you are given information about a point and the slope of the line. The formula does not apply if the slope is undefined (as in a vertical line; see below).


Examples

1. The line through (2, 3) with slope 4 has equation

    y=mx + b
where m = 4 and
    b=y1 - mx1
    =3 - 4(2) y1 = 3 and x1 = 2
    =- 5
Therefore, the equation of the line is
    y=4x - 5

2. The line through (1, -3) with slope 4 has

    b=     Equation: y =  

3. The line through (2, -1) with slope -1 has equation

    y=  

4. The line through (-1, 0) with slope 3 has equation

    y=  

5. The vertical line through (2, -3) has equation

    x = 2

Note that the point-slope formula does not apply here, since the slope of the line is undefined.

Q Where does that formula come from?
A Look at the following picture of a straight line passing through (x1, y1) with slope m.

From the picture, we see that, if (x, y) is any other point on the line, then

Multiplying both sides by the denominator (x - x1) gives

Actually, this is another form of the point-slope formula. Continuing, write it as

In other words, b is given by y1 - mx1.

Finding the Equation of a Line When a Point and Slope are Not Given Directly

Often, you will need to find the line when you are given the "point and slope" information less directly. For instance, you may be given two points and asked to find the line through them. The way to treat them is to first find a point and the slope, and then to proceed as above.

Q The line through (3, -1) and (1, 2) has
  • A point on the line:
  • The slope of the line:
  (Seperate the coordinates of the point by a comma, as in 3, 2)

Hence, the equation of the line through (3, -1) and (1, 2) is:
    y =

Q The line through (5, -2) and (1, -2) has
  • A point on the line:
  • The slope of the line:

Hence, the equation of the line through (5, -2) and (1, -2) is:
    y =

Q The line through (2, 1) and parallel to y = -2x + 6 has
  • A point on the line:
  • The slope of the line:

Hence, the equation of the line through (2, 1) and parallel to y = -2x + 6 is:
    y =

Q The line through (2, 1) and parallel to 3x + 2y = 4 has
  • A point on the line:
  • The slope of the line:

Hence, the equation of the line through (2, 1) and parallel to 3x + 2y = 4 is:
    y =

Now try some of the exercises in Section 1.3 of the textbook, or press "Review Exercises" on the sidebar to see a collection of exercises that covers the whole of Chapter 1.

Last Updated: March, 2006
Copyright © 2001, 2007 Stefan Waner