Two-point form of a line is an equation that represents a straight line passing through two distinct points in a 2D space. When two points on a line are given, the two-point form formula is
\frac{x \ - \ x_1}{x_2 \ - \ x_1} = \frac{y \ - \ y_1}{y_2 \ - \ y_1}
Where: (x1, y1) and (x2, y2) are the coordinates of the two points on the line.
This form is useful when you have two points and want to express the equation of the line that passes through them.
Equation of a Line in Two-Point Form
Let A(x1, y1) and B(x2, y2) be two co-ordinates of the two distinct points given on the line as shown in the image added below:

Then, the formula of 2 point form of the equation is:
(y - y1) = (y2 - y1)/(x2 - x1){x - x1}
(y - y2) = (y2 - y1)/(x2 - x1){x - x2}
Where,
- x and y are arbitrary points on the line.
Formula For Two Point Form
(y - y1) = (y2 - y1)/(x2 - x1){x - x1}
(y - y2) = (y2 - y1)/(x2 - x1){x - x2}
where,
- (x, y) is an arbitrary point on the line.
- (x1, y1) and (x2, y2) are coordinates of points lying on the line.
Derivation of Two Point Form Formula
Let M(x1, y1) and N(x2, y2) be the two given points on the line L, and let P(x,y) be a random point on the line L

From the figure, we can observe that the three points M, N, and P lie on the same line. Hence, they are collinear.
Slope of line MP = Slope of line NP
(y - y1)/(x - x1) = (y2 - y1)/(x2 - x1)
(y - y1) = (y2 - y1)/(x2 - x1){x - x1}
Finding Equation of Line Using Two Point Form
Equation of line in two-point form is found using the steps added below:
Step 1: First, take any two points that lie on the line. Let these points be (x1, y1) and (x2, y2).
Step 2: Use the two-point line formula to find the equation of the line as:
- (y - y1) = (y2 - y1)/(x2 - x1){x - x1}
Step 3: Simplify the equation to get your required equation.
This is explained using the example added below:
Example: Find the equation of a line passing through the points (1,2) and (3,4)?
Given points
- A = (1, 2)
- B = (3, 4)
Therefore, x1 = 1, y1 = 2, x2 = 3, y2 = 4
Equation of line in two point form,
- (y - y1) = (y2 - y1)/(x2 - x1){x - x1}
Substitute the values
(y - 4) = (2 - 4)(x-3)/(1 - 3)
(y - 4) = (-2)(x - 3)/(-2)
y - 4 = x - 3
y = x - 3 + 4
y = x + 1Thus, the equation of the line is: y = x + 1
People Also Read:
Two-Point Form of a Line - Solved Examples
Example 1: Find the equation of the line passing through the points A(-2, 3) and B(3, 5).
Solution:
Given points are:
- A = (-2, 3)
- B = (3, 5)
Using the formula, we get:
⇒ (y - 3) = {(5 - 3)/(3 -(-2))}.(x + 2)
⇒ (y - 3) = 2/5.(x + 2)
⇒ 5y - 15 = 2x + 4
⇒ 5y = 2x + 19Thus, the equation of the line is 5y = 2x + 19
Example 2: Find the equation of the line passing through the points A(0, 3) and B(3, 0).
Solution:
Given points are:
- A = (0, 3)
- B = (3, 0)
Using the formula, we get:
⇒(y - 0) = {(3 - 0)/(0 - (-3)}(x - 3)
⇒ y = {3/3}(x - 3)
⇒ 3y = 3x - 9Thus, equation of the line is 3y = 3x - 9
Example 3: Find the equation of a straight line whose x-intercept is 'a' and whose y-intercept is 'b'.
Solution :
Given points are:
- A = (a, 0)
- B = (0, b)
Using the formula, we get:
⇒ (y - 0) = (b - 0) (x - a) / (0 - a)
⇒ y = b(x - a) / (-a)
⇒ -ay = bx - ba
⇒ ay + bx = abThus, the equation of the line is ay + bx = ab
Example 4: Write the equation of the line through the points (3, –3) and (1, 5).
Solution:
Given points are:
- A = (3, -3)
- B = (1, 5)
Using the formula, we get:
⇒ (y + 3) = (5 + 3) (x - 3) / (1-3)
⇒ (y + 3) = -4(x - 3)
⇒ y + 3 = -4x + 12
⇒ 4x + y = 9Thus, the equation of the line is 4x + y = 9
Example 5: Derive the y-intercept of the line with the coordinates given by A(3, -2) & B(1, -3) passing through it and also find the slope m of the line.
Solution:
Given points are:
- A = (3, -2)
- B = (1, 5)
Using the formula, we get:
⇒ (y + 2) = (5 + 2) (x - 3) / (1-3)
⇒ (-2)(y + 2) = 7(x - 3)
⇒ -2y - 4 = 7x - 21
⇒ 7x + 2y = 17Thus, the equation of the line is 7x + y = 9
To find slope compare the given equation with,
y = mx + c
Given equation:
7x + y = 9
⇒ y = -7x + 9Hence, m = -7
Thus, the slope of the line is -7
Important Maths Related Links:
Practice Questions on Two Point Form
Question 1: What is the slope of a line passing through the points (5, -4) and (-3, 6)?
Question 2: What is the slope of a line passing through the points (5, 0) and (0, 5)?
Question 3: Derive the y-intercept of the line with the coordinates given by A(3, -2) and B(-1, 3) passing through it and also find the slope m of the line.
Question 4: What is the equation of a vertical line passing through point A(4, -7)?
Question 5: What is the slope of a line passing through the points (10, 5) and (6, 12)?
Question 6: What is the slope of a line passing through the points (3, -9) and (-3, -7)?