Linear Equation with Two Points
Support Page

Welcome to our Linear Equation with Two Points Support Page.

Looking for some help and support for finding a linear equation with just two points on the line?

Then check out this page with clear explanation, worked examples and some practice worksheets!

We also have a linear equation calculator which you can use to solve linear equations with two points and see all the working out along the way, step-by-step!

Linear Equation with Two Points Support

linear equation with two points example 1 image

This page contains all the information you need to find the equation of a line which goes through two (or more) points.

We have also included some practice worksheets and worked examples to help you to understand and learn this skill.

In order to master this skill, you should have a basic level of algebra and understand how to add and subtract negative numbers.

What is a Linear Equation?

A linear equation (or line equation) is an equation of a straight line.

There are two main forms which are used to show linear equations:

Standard Form

linear equation standard form image

A linear equation can be written in the standard form:

Ax + By + C = 0

  • where A, B and C are whole numbers
  • x and y are variables

Slope-Intercept Form

linear equation slope-intercept form image

However, it is more commonly written in slope-intercept form:

y = mx + c

  • m is the gradient or slope of the line
  • x is the x coordinate and y is the y coordinate
  • the point c is the y intercept where the line crosses the y-axis.

In a linear equation, as one variable goes up (or down) the other variable changes at a steady, constant rate.

Examples of Linear Equations

The following are linear equations in standard form:

  • \[ x + 7y + 4 = 0 \]
  • \[ 3x - 4y = 0 \]
  • \[ 4y - 21 = 0 \]
  • \[ 47x + 32y - 19 = 0 \]
  • \[ 19x - 13y - 125 = 0 \]
  • \[ -6x - 4y + 32 = 0 \]
  • \[ 48x + 32y - 56 = 0 \]
  • \[ 7x + 25 = 0 \]

The following are linear equations in slope-intercept form:

  • \[ y = 4x + 5 \]
  • \[ y = 3x - 8 \]
  • \[ y = -6x - 15 \]
  • \[ y = 3 - 8x \]
  • \[ y = 5.2x - 7.6 \]
  • \[ y = {11 \over 2}x - 7 \]
  • \[ y = 8 \]
  • \[ y = {x \over 4} \]

The following are linear equations but not yet in standard form:

  • \[ 2x + 4 = 10 \] because it needs to be simplified
  • \[ x + 3y = -5 \] because -5 is on the right hand side
  • \[ 1.6x + 3.2y - 6.5 = 0 \] because the coefficients all need to be integers
  • \[ 3x = 7 - 4y \] because the y term and the number 7 need to be on the left hand side
  • \[ 1.7y = 8.3x - 5 \] because the coefficients need to be integers and all the terms need to be on the left
  • \[ 3y + 9 = {3x \over 2} - 7 \] because the equation needs to be simplified, all coefficients need to be integers and all the terms need to be on the left

The following are NOT linear equations:

  • \[ x^2 + 7y + 4 = 0 \] (because of the x2 term)
  • \[ 2x - 28y^2 - 4 = 0 \] (because of the y2 term)
  • \[ 4x^3 - {y \over 2} + 15 = 0 \] (because of the x3 term)
  • \[ y = {1 \over x} + 5 \] (because of the x term has an exponent of -1)

How To find a Linear Equation from Two Points

Steps to finding the equation of a line from two points

The equation of a line we are going to use is:

\[ y = mx + c \]

The steps for finding the line equation from two points are as follows:

  1. Find the value of m (the gradient or slope of the line)
  2. Substitute the value of one of the two points on the line into the equation to find the value of c (the y-intercept).
  3. Once you know m and c you have found the equation of the line \[ y = mx + c \]

How to find the Gradient (m) using two points

Formula for finding the gradient m

The gradient of the line - which is how steep or shallow the line is - can be found using the formula:

\[ m = {(y_2 - y_1) \over (x_2 - x_1)} \]

where the two points on the line are (x1, y1) and (x2, y2)

Types of Gradient

There are 4 different types of gradient that we might find in our straight line:

  1. line sloping upwards
  2. line sloping downwards
  3. horizontal line
  4. vertical line

Line Sloping Upwards

If the gradient is a positive number it means that the line slopes upwards from left to right.

linear equations positive gradient image

Line Sloping Downwards

If the gradient is a negative number it means that the line slopes downwards from left to right.

linear equations negative gradient image

Horizontal Line

If the gradient is zero, it means the line is a horizontal line.

linear equations zero gradient image

Vertical Line

If the gradient is infinite, it means the line is a vertical line.

linear equations infinite gradient image

Line Equation from Two Points Examples


Linear Equation with two points Example 1

Find the equation of the straight line which passes through (1, -2) and (4, 7).

linear equation with two points example 1

The equation of the line we are looking for is:

\[ y = mx + c \]

Step 1) Find the gradient m

The equation to find the gradient is:

\[ m = {(y_2 - y_1) \over (x_2 - x_1)} \]

Our two points are (1, -2) and (4,7) so this give us:

  • x1 = 1
  • y1 = -2
  • x2 = 4
  • y2 = 7

This gives us:

\[ m = {(7 - (-2)) \over (4 - 1)} = {9 \over 3} = 3 \]

This means that:

\[ y = 3x + c \]

Step 2) Find the value of c

\[ If \; y = 3x + c \; then \; c = y - 3x \]

We need to take the values from one of the two coordinates and substitute these into the equation to find c.

\[ c = y - 3x \]

The first coordinate is (1, -2) so we will use this one. So we have x is 1 and y is -2.

Substituting these values gives us:

\[ c = (-2) - 3(1) = (-2) - 3 = -5 \]

So our final answer is \[ y = 3x - 5 \]

Check the Equation of the line is correct

A useful way to check if this answer is correct is to use the second coordinate (4, 7).

With the second coordinate the x value is 4 and the y value is 7.

If we substitute the x value into the equation we have just found it should give the correct y value. If it does then the equation is correct.

\[ y = 3x - 5 = 3(4) - 5 = 12 - 5 = 7\]

So the equation works for the second coordinate which means that our check was successful.

 

Linear Equation with two points Example 2

Find the equation of the straight line which passes through (1, 5 ½) and (6, -2).
Give your answer in standard form Ax + By + C = 0.

linear equation with two points example 2

The equation of the line we are looking for is:

\[ y = mx + c \]

Step 1) Find the gradient m

The equation to find the gradient is:

\[ m = {(y_2 - y_1) \over (x_2 - x_1)} \]

Our two points are (1, 5 ½) and (6, -2) so this give us:

  • x1 = 1
  • y1 =5 ½
  • x2 = 6
  • y2 = -2

This gives us:

\[ m = {(-2 - 5 {1 \over 2}) \over (6 - 1)} = {-{4 \over 2} - {11 \over 2} \over 5} = {{-15 \over 2} \over 5} = -{15 \over 10} = -{3 \over 2} \]

This means that:

\[ y = -{3 \over 2}x + c \]

Step 2) Find the value of c

\[ y = -{3 \over 2}x + c \; then \; c = y + {3 \over 2}x \]

We need to take the values from one of the two coordinates and substitute these into the equation to find c.

\[ c = y + {3 \over 2}x \]

The first coordinate is (1, 5 ½) so we will use this one. So we have x is 1 and y is 5 ½.

Substituting these values gives us:

\[ c = 5 {1 \over 2} + {3 \over 2}(1) = {11 \over 2} + {3 \over 2} = {14 \over 2} = 7 \]

So the equation of the line is:
\[ y = -{3 \over 2}x + 7 \; or \] \[ y = 7 - {3 \over 2}x \]

However, this is not yet in standard form of Ax + By + C = 0

We now need to rearrange the equation with all the x, y and c parts on the left side of the equation and 0 on the right side.

\[ y = 7 - {3 \over 2}x \]

Subtract 7 from both sides gives:

\[ y - 7 = -{3 \over 2}x \]

Now add the x coefficient to both sides gives:

\[ y - 7 + {3 \over 2}x = 0 \]

Reaarange the variables so the x term comes first, then the y term

\[ {3 \over 2}x + y - 7 = 0 \]

We can multiple both sides of the equation by 2 to give an integer solution:

This gives us a final answer in standard form of: \[ 3x + 2y - 14 = 0 \]

Linear Equation with two points Example 3

Find the equation of the straight line which passes through these three points (-1, -16), (3, 12) and (6, 33).

linear equation with two points example 3

The first thing to notice about this problem is that there are 3 points on the line that we have been given.

We only actually need two points to solve this problem, so for now we are going to ignore the last point (6,33)

The equation of the line we are looking for is:

\[ y = mx + c \]

Step 1) Find the gradient m

The equation to find the gradient is:

\[ m = {(y_2 - y_1) \over (x_2 - x_1)} \]

Our two points are (-1, -16) and (3, 12) so this give us:

  • x1 = -1
  • y1 =-16
  • x2 =3
  • y2 =12

This gives us:

\[ m = {(12 - (-16)) \over (3 - (-1))} = {28 \over 4} = 7 \]

This means that:

\[ y = 7x + c \]

Step 2) Find the value of c

\[ y = 7x + c \; then \; c = y - 7x \]

We need to take the values from one of the two coordinates and substitute these into the equation to find c.

\[ c = y - 7x \]

The first coordinate is (-1, -16) so we will use this one. So we have x is -1 and y is -16.

Substituting these values gives us:

\[ c = -16 - 7(-1) = -16 - (-7) = -9 \]

So the equation of the line is:
\[ y = 7x - 9 \]

Check the Equation of the line is correct

We can check this answer is correct using the second coordinate (3, 12).

With the second coordinate the x value is 3 and the y value is 12.

If we substitute the x value into the equation we have just found it should give the correct y value. If it does then the equation is correct.

\[ y = 7x - 9 = 7(3) - 9 = 21 - 9 = 12 \]

This is the correct value of y for the second coordinate so the equation that we have found is correct.

Linear Equation with two points Example 4

Find the equation of the straight line which passes through coordinates (-1.6, 8.1) and (2.4, 3.6). Give your answer in standard form.

linear equation with two points example 4

The equation of the line we are looking for is:

\[ y = mx + c \]

Step 1) Find the gradient m

The equation to find the gradient is:

\[ m = {(y_2 - y_1) \over (x_2 - x_1)} \]

Our two points are (-1.6, 8.2) and (0.4, 3.6) so this give us:

  • x1 = -1.6
  • y1 =8.1
  • x2 =2.4
  • y2 =3.6

This gives us:

\[ m = {(3.6 - (8.1) \over (2.4 - (-1.6))} = {-4.5 \over 4} \]

We will multiply the numerator and denominator by 10 to remove the decimal numerator

\[ m = -{4.5 \over 4} = -{45 \over 40} \]

Simplifying this fraction by dividing the numerator and denominator by 5 gives us:

\[ m = -{9 \over 8} \]

This means that:

\[ y = -{9 \over 8}x + c \]

Step 2) Find the value of c

\[ y = -{9 \over 8}x + c \; then \; c = y + {9 \over 8}x \]

We need to take the values from one of the two coordinates and substitute these into the equation to find c.

\[ c = y + {9 \over 8}x \]

The first coordinate is (-1.6, 8.1) so we will use this one. So we have x is -1.5 and y is 8.1.

Substituting these values gives us:

\[ c = 8.1 + {9 \over 8}(-1.6) \]

Converting the decimals into fractions gives us:

\[ c = {81 \over 10} + {9 \over 8}.(-{8 \over 5}) \] \[ c = {81 \over 10} + {-72 \over 40} = {81 \over 10} - {18 \over 10} \]

Subtracting this fraction gives us:

\[ c = {81 \over 10} - {18 \over 10} = {63 \over 10} \]

So the equation of the line is:
\[ y = -{9 \over 8}x + {63 \over 10} \; or \; \] \[ y = {63 \over 10} - {9 \over 8}x \]

We can convert these two fractions back into decimals to give us:

\[ y = 6.3 - 1.125x \]

Our final step is to convert this equation into standard form:

\[ y = {63 \over 10} - {9 \over 8}x \]

Add the x term to both sides will cancel it on the right hand side

\[ y + {9 \over 8}x = {63 \over 10} \]

Now we need to cancel the fraction on the right hand side by subtracting it from both sides

\[ y + {9 \over 8}x - {63 \over 10} = 0 \] \[ {9 \over 8}x + y - {63 \over 10} = 0 \]

Finally we multiply all the terms on both sides by the lowest common multiple of 8 and 10 to remove the fractions and just leave integers.

The lowest common multiple of 8 and 10 is 40.

Multiplying both sides by 40 gives us:

\[ 40.{9 \over 8}x + 40y - 40.{63 \over 10} = 0 \]

Multiplying this expression out gives us our final answer of: \[ 45x + 40y - 252 = 0 \]

How to Convert Linear Equations between the two common forms

There are two main forms linear equations are shown in:

  • standard form \[ Ax + By + C = 0 \]
  • slope intercept form \[ y = mx + c \]

It is quite straightforward to convert a linear equation in one form to the other.

We will show you how to convert them from one form to another below.

Steps to convert linear equations in Slope-Intercept form into Standard Form

We start with slope intercept form: \[ y = mx + c \]

We move the y onto the right hand side of the equation by subtracting it: \[ 0 = mx + c - y \]

We rearrange the equation with the x term first then the y term then the c \[ mx - y + c = 0 \]

This equation is now in standard form (assuming that m and c are both integers)

Steps to convert linear equations in Standard Form into Slope-Intercept Form

We start with the equation in Standard Form: \[ Ax + By + C = 0 \]

We divide both sides of the equation by B so that the y term has a coefficient of 1: \[ {A \over B}x + {B \over B}y + {C \over B} = {0 \over B} \]

Simplifying this gives us: \[ {A \over B}x + y + {C \over B} = 0 \]

We move the x term and the C onto the right hand side by subtracting them: \[ y = -{A \over B}x - {C \over B} \]

This equation is now in slope-intercept form.

Linear Equation Calculator

Our Linear Equation Calculator will find a linear equation from two points and display the equation both in slope-intercept form and standard form.

It will also display the equation both as a fraction and a decimal.

However the best thing about our calculator is that it takes you through all the steps needed to find a linear equation from two points.

Linear Equation with Two Points Worksheets

We have created a set of three worksheets for you to practice writing linear equations from two points.

Sheet 1 is the easiest sheet with integer answers for m and c. You need to find the slope-intercept form (y = mx + c) for each answer.

Sheet 2 is similar to sheet 1 but has both fractional and integer answers for m and c.

Sheet 3 involves finding the slope-intercept form (y = mx + c) and also the standard form (Ax + By + C = 0) for each set of two points.

All of the sheets contain detailed answers showing you how to solve each of the problems step-by-step!

More Recommended Math Worksheets

Take a look at some more of our worksheets similar to these.

Slope of a Linear Equation Support

If you are needing help with finding the slope of a linear equation, or want a quick way to calculate the slope then check out this page below.

On the page you will find:

  • clear definitions and explanations how to find the slope of a linear equation
  • find the slope from a linear equation, from two points, or from a line on a coordinate grid
  • lots of worked examples
  • practice worksheets

Linear Equations that are Parallel Support

If you are needing help with finding parallel linear equations or lines which are parallel to other lines then take a look at the link below.

On the page you will find:

  • how to quickly derive linear equations which are parallel
  • how to find parallel lines from linear equations which pass through specific coordinates
  • practice examples and worksheets

Negative Number Worksheets and Support

In order to find a linear equation from two points, you need to be proficient at adding and subtracting negative numbers.

Here are some of our resources which will help you to learn and practice these skills.

Factorising Quadratic Equation Worksheets

The sheets are arranged in order of difficulty to help introduce you into more complicated examples gradually.

Using these sheets will hopefully make factorising quadratic equations simple and straightforward.

The sheets cater for simpler and more complex quadratic equations.

 

How to Print or Save these sheets 🖶

Need help with printing or saving?
Follow these 3 steps to get your worksheets printed perfectly!

How to Print or Save these sheets 🖶

Need help with printing or saving?
Follow these 3 steps to get your worksheets printed perfectly!

Subscribe to Math Salamanders News

Sign up for our newsletter to get free math support delivered to your inbox each month. Plus, get a seasonal math grab pack included for free!

Math-Salamanders.com

Math Salamanders Main Logo

The Math Salamanders hope you enjoy using these free printable Math worksheets and all our other Math games and resources.

Our website and all of our resources are created by humans and not AI. This includes the code used to create our randomly generated worksheets.

If you have any questions or need any information about our site, please get in touch with us using the 'Contact Us' tab at the top and bottom of every page.


Share this page