Open In App

How to Find the Equation of a Line from Two Points?

Last Updated : 25 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

How to Find the Equation of a Line from Two Points: There are several ways through which we can find the equation of a line. We need a minimum of two things to find the equation. It can be one point and one intercept, or two points, or two intercepts.

In this article, we will discuss the steps to find the equation of a line from two points, along with some sample problems on it.

Steps to Find Equation of Line from Two Points

To find the equation of a line given two points, you can follow these steps:

  1. Identify the two points: Let’s denote the coordinates of the two points as (x₁, y₁) and (x₂, y₂).
  2. Calculate the slope (m): Use the formula for slope, which is given by: [Tex]m = \frac{{y_2 – y_1}}{{x_2 – x_1}} [/Tex]​​
  3. Use the point-slope form: Once you have the slope, you can use one of the points and the slope to write the equation of the line in point-slope form, which is:
  4. [Tex]y – y_1 = m(x – x_1) [/Tex]
  5. Simplify the equation: After substituting the values of the slope and one of the points into the point-slope form, simplify the equation to put it in slope-intercept form (y = mx + b), if needed.
  6. Optional: If required, convert the equation from point-slope form to slope-intercept form by solving for y.

In this article, we have covered the derivation and the sample problems to find the equation of the straight line passing through the two points.

find the equation of a line from two points

A line’s slope is a measure of its steepness and direction. It is defined as the change in y coordinate to the change in x coordinate of that line.

It is denoted by the symbol m. If two points (x1, y1) and (x2, y2) are connected by a straight line on a curve y = f(x), the slope is given by the ratio of the y-coordinate difference to x-coordinate difference.

InformationDetails
Two Point Form Formula

[Tex]y – y_1 = \frac{x_2 – x_1}{y_2 – y_1} (x – x_1) [/Tex]

Two Point Form of the Equation of a LineGiven two points

[Tex](y_1, y_1) \text{ and } (x_2, y_2) [/Tex]

on a line, the equation of the line can be determined using the above formula.

How to find the equation of a line from two points?

Two-point form is used to find the equation of a line passing through two points. Its formula is given by,

y – y1 = m (x – x1)

or

[Tex]y – y_1 =  \frac{y_2-y_1}{x_2-x_1}(x – x_1)[/Tex]

where,

m is the slope of line,

(x1, y1) and (x2, y2) are the two points through which line passes,

(x, y) is an arbitrary point on the line.

Derivation

deriation - find the equation of a line from two points

Consider a line with two fixed points B (x1, y1) and C (x2, y2). Another point A (x, y) is an arbitrary point on the line.

As the points A, B and C are concurrent the slope of AC must be equal to BC.

Using the formula for slope we get,

(y – y1) / (x – x1) = (y2 – y1) / (x2 – x1)

Multiplying both sides by (x – x1) we get,

[Tex]y – y_1 =  \frac{y_2-y_1}{x_2-x_1}(x – x_1)[/Tex]

This derives the formula for two point form of a line.

Examples on How to Find the Equation of a Line from Two Points

1. Find the equation of a line passing through the points (2, 4) and (-1, 2).

Solution:

We have,

(x1, y1) = (2, 4)

(x2, y2) = (-1, 2)

Find the slope of the line.

m = (2 – 4)/(-1 – 2)

= -2/-3

= 2/3

Using the two point form we get,

y – y1 = m (x – x1)

y – 4 = 2/3 (x – 2)

3y – 12 = 2 (x – 2)

3y – 12 = 2x – 4

2x – 3y + 8 = 0

2. Find the equation of a line passing through the points (4, 5) and (3, 1).

Solution:

We have,

(x1, y1) = (4, 5)

(x2, y2) = (3, 1)

Find the slope of the line.

m = (1 – 5)/(3 – 4)

= -4/-1

= 4

Using the two point form we get,

y – y1 = m (x – x1)

y – 5 = 4 (x – 4)

y – 5 = 4x – 16

4x – y – 11 = 0

3. Find the equation of a line passing through the points (2, 1) and (4, 0).

Solution:

We have,

(x1, y1) = (2, 1)

(x2, y2) = (4, 0)

Find the slope of the line.

m = (0 – 1)/(4 – 2)

= -1/2

Using the two point form we get,

y – y1 = m (x – x1)

y – 1 = (-1/2) (x – 2)

2y – 2 = 2 – x

x + 2y – 4 = 0

4. Find the y-intercept of the equation of a line passing through the points (3, 5) and (8, 7).

Solution:

We have,

(x1, y1) = (3, 5)

(x2, y2) = (8, 7)

Find the slope of the line.

m = (7 – 5)/(8 – 3)

= 2/5

Using the two point form we get,

y – y1 = m (x – x1)

y – 5 = (2/5) (x – 3)

5y – 25 = 2x – 6

2x – 5y + 19 = 0

Put x = 0 to get the y-intercept.

=> 2 (0) – 5y + 19 = 0

=> 5y = 19

=> y = 19/5

5. Find the x-intercept of the equation of a line passing through the points (4, 8) and (1, 3).

Solution:

We have,

(x1, y1) = (4, 8)

(x2, y2) = (1, 3)

Find the slope of the line.

m = (3 – 8)/(1 – 4)

= -5/-3

= 5/3

Using the two point form we get,

y – y1 = m (x – x1)

y – 8 = (5/3) (x – 4)

3y – 24 = 5x – 20

5x – 3y + 4 = 0

Put y = 0 to get the x-intercept.

=> 5x – 3 (0) + 4 = 0

=> 5x + 4 = 0

=> x = -4/5

6. Find the slope of a line passing through the points (2, 7) and (-4, 5).

Solution:

We have,

(x, y) = (2, 7)

(x1, y1) = (-4, 5) 

Using the formula we get,

y – y1 = m (x – x1)

=> 7 – 5 = m (2 – (-4))

=> 2 = m (2 + 4)

=> 6m = 2

=> m = 1/3

7. Find the slope of a line passing through the points (4, -5) and (6, 7).

Solution:

We have,

(x, y) = (4, -5)

(x1, y1) = (6, 7)

Using the formula we get,

y – y1 = m (x – x1)

=> -5 – 7 = m (4 – 6)

=> -12 = m (-2)

=> -2m = -12

=> m = 6

Practice Problems: How to Find the Equation of a Line from Two Points

1. Points: (1, 3) and (4, 11)
Equation: y = 2.67x + 0.33

2. Points: (-3, 7) and (2, -1)
Equation: y = -1.6x + 2.2

3. Points: (0, 0) and (5, 10)
Equation: y = 2x

4. Points: (-2, -2) and (3, 3)
Equation: y = x



Like Article
Suggest improvement
Next
Share your thoughts in the comments

Similar Reads