Writing Linear Equations

There is a lot of information in this section.  However, when you understand the information shared on this page, and are able to apply it, you will have integrated all you have learned about linear equations to this point. 

Use the tabs below to navigate the information.  Be patient, work through the examples, read the notes, watch the videos.  Then, try the practice problems.

If you’re having difficulty, please feel free to reach out via email.  

We now know how to graph a line, what a linear equation is, and is not, and some of the special cases.  What’s next on the agenda is the ability to write a linear equation given a (1) situation, or given a (2) graph, or given (3) clues about the line.

More on Slope-Intercept Form

Now, this form of a linear equation is going to prove super useful with things far more difficult than sketching a graph.  So, let’s make sure we really understand what’s happening with it.

A great way to approach writing the equation of a line is to start with the Slope – Intercept form.  If you can find the y – intercept, and the slope, all you need to do is plug those values into the form and you’re done!  Let’s see an example.

On July 1st you had $450 saved in the bank.  You decided to start saving regularly, to buy a car.  You add $50 a month to your savings every month.  Write an equation that describes this situation.

The y – intercept is the starting point, when x = 0.  The variable x is our input, the independent variable.  The output, y, is determined by performing whatever operations are contained in the equation.

Our first step is to define x and y.  Here, x will be the number of months, because you’re saving $50 a month.  The output, y, will be the total amount saved after x number of months.

Here, you started with $450, so that’s b, the y – intercept.  Remember, you have a y – intercept when x = 0.  If x is the number of months, then you started saving at month #0.  The slope is the rate of change.  How much does the total amount increase each month?  By $50, right?  That’s m.

Let’s put that together.

y = 50x + 450

Now, suppose you had a graph, and you needed to write the equation of that line.  You only need two things.  In no particular order you need the slope and the y – intercept.  Then you have m and b for the form y = mx + b. 

The equation of this line is y = –x + 2. 

Remember, horizontal lines are y = #, and vertical lines are x = #.  The y – axis is x = 0, and the x – axis is y = 0.

Parallel and Perpendicular Lines

Lines that are parallel never intersect.  Here is a picture of two parallel lines.  Can you find the slope of each by counting?  Give it a shot.

If you counted each line’s slope you should have found that the slope for each is two. 

If two lines are parallel, their slopes are equal.

Note:  Parallel lines cannot share a y – intercept.  In that case, they’d not be parallel at all.  They’d coincide (occupy the same exact space), and touch everywhere. 


Perpendicular Lines

Most lines intersect (cross).  If two lines cross and form a 90º angle, they are perpendicular.  The graph here shows two lines that are perpendicular.  The line in black is the same as the line in the previous example, it has a slope of 2.  The slope of the red line is -1/2.

Perpendicular lines have slopes that are negative reciprocals.

In the term, “negative reciprocals,” the negative refers to the two slopes being different sign.  One will be positive and one will be negative.  There’s more than that, though.  The slopes will also be reciprocals (think:  division is multiplication by the reciprocal).  Here one slope is -1/2.  The line perpendicular to that must have a slope that is the opposite signed reciprocal, so positive 2/1, or just 2.

Let’s see a couple of examples, both using the graph below.

Example 1:  Write an equation that is perpendicular to the line graphed and passes through the origin.

To write the equation of a line we need a slope and a y – intercept.  Here, we are told our line will pass through the origin, (0, 0).  That is an x and a y – intercept!  So, we know that b = 0, in y = mx + b. 

We are given a clue about the slope.  We are told our line is perpendicular to the line graphed.  So our slope will be the negative reciprocal of that slope.  The slope graphed is negative, so our slope will be positive.  All that needs to be done here is to count the slope, and take the reciprocal!

The slope of the line graphed is -2/3.  The negative reciprocal of that is 3/2.  Our line is:

You can write + 0, at the end of the equation, but there is no need.

Example 2:  Write an equation that is parallel to the line graphed and passes through the point (-3, 5). 

This will be a little trickier because we do not know the y – intercept right off the bat!  But, we do know the slope.  We found previously that the slope was -2/3.  Since our line is parallel, it will have the same slope.

We can use the slope-intercept form of a line to find the y – intercept.  Because we know the point (-3, 5) is on our line, that means that when x  = – 3, y will be 5.  That’s a solution to our equation.  We also know the slope.  Let’s plug in our numbers and find the value of b.

Let’s start with a new example. 

Example 3:  Find the equation of the line that passes through (3, -4) and has a slope of 2.

Here we know the slope and a point, quite similar to the previous example.  There are two ways we can find the equation of this line.   I prefer the simplest method, which is to plug in x = 3, y = – 4 and m = 2, into y = mx + b.  However, there is another method.  There’s a formula called the Point – Slope Formula.  It is called the Point – Slope Formula because if you know a point and a slope, you can plug those values into this formula and it will provide you with the equation of the line containing that point and that slope.

You will see similar applications of a formula like this in future mathematics.  Here’s the formula:

The formula actually comes from the slope formula.  Do you see the connection?  The difference is that in the slope formula, we know a pair of points, so we have an x1 and a x2.  Here we only know one point, but we do know the slope.

Let’s use the formula for our current example.  Our slope is 2, and our point is (3, -4).  Remember, especially when plugging in negative numbers, use parenthesis.  It will maintain the intended order of operations!

Now that we’ve plugged in our values, let’s just follow the order of operations and then solve for y.

Minus – 4 is + 4, and we distributed the 2 on the right.

Let’s try the same problem using y = mx + b.

They both work equally well and it is a good idea to have more than one method of finding an equation!

Example 4:  Find the equation of the line containing the points (3, 4) and (-8, 1).

This is the trickiest type of problem we’ve seen so far.  In the other examples we have been given either a y – intercept or a slope.  Here we just have two points.  It isn’t overly complicated. We just need to remember our goal. 

To write the equation of a line we ultimately need the slope and the y – intercept.

Step 1:  Find the slope using the formula.

Step 2:  Plug the slope and either point into y = mx + b, or

Be careful of sign errors and always reduce if possible.

You can pick either point, (3, 4) or (-8, 1) because they’re both on the line.  They’re both solutions and will yield the same equation.  It is best to pick the easier coordinate, the one without negatives.  There’s just less chance for a mistake.  Now, you can use either formula, we will use the slope – intercept form here.

We have to subtract 9/11 from both sides.  Make the fractions simple.  If you subtract 9/11 from 1, you get 2/11.  So 4 – 9/11 is 3 and 2/11.

Note:  You do not want to write slope as a mixed number, but a mixed number is useful for a y – intercept.

Midpoint Formula

Here’s an example of how this formula might be used in answering a question.

Example 5:  Write the equation of a line that is perpendicular to the line-segment graphed, and that passes through the midpoint of the segment.

We just used the formula for these two points and found that the midpoint was (3, 0).   Since our line must be perpendicular, we need to take the negative reciprocal of this line.   This line is positive, so our slope must be negative.   We could use the formula, or just count, to find the slope of the graphed line.  The rise is from -3 to 3, that’s a distance of UP 6.  The run is from 2 to 4, that’s just 2.  So the slope is 6/2, which is 3.   Our slope will be -1/3.

Here’s what we need:  m and b.

We know m is -1/3 and we know that our line passes through (3, 0).  Let’s plug in our values into the slope intercept form of a line, and solve for the y – intercept.

Summary:  When writing the equation of a line you are searching for the slope and the y – intercept.  Use whatever tools apply to the clues provided in the question. 

Equation of a Line

Parallel and Perpendicular Lines