 Top

Equation of a Line from Two Points

Before going to "equation of line from two points" we need to know what actually is an equation. An equation is a mathematical statement that two expressions are equal. Here the two expressions will include y-coordinate, x-coordinate , slope and a constant.

The general form of an equation of a line is y = mx + b.

where m $\rightarrow$   slope of the line.

b $\rightarrow$  y-intercept.

y $\rightarrow$  y-coordinate.

x $\rightarrow$ x-coordinate.

How the Formula Works??

Now we know the general form of the equation. You may wonder how can we get equation of line from two points using the above formula which does not involve any kind of points. Let me explain how it works.

Consider a line passing through points $(x_1,y_1)$ and $(x_2,y_2)$

The slope of the above line is  $\frac{(change \ in \ y)}{ (change \ in \ x)}$

which is nothing but

m= $\frac{(y_2 - y_1)}{(x_2 - x_1)}$

Now substitute this slope in our formula then we get equation of line passing through two points.

Substituing we get

y = [$\frac{(y_2 - y_1)}{(x_2 - x_1)}$] x + b

But now the question we generally get is how are we going to get b the y-intercept.

For finding this we just need to use the basic concept that when line passes through some point it must satisfy that point.

so plug in any one point from the two points in the equation we get the value of y-intercept. This will be explained clearly in the example.

The image below gives us an view of a "line passing through two points". Related Calculators Point of Intersection of Two Lines Calculator Solving Two Step Equations Linear Equations in Two Variables Calculator Equation Line Calculator

Three Simple Steps to Find Equation of a Line from Two Points .

Step 1:  Find the slope.

Step 2: Then find y-intercept by plugging one point from the two points in y=mx+c

Step 3: Now we get the final equation.

Example Problems on Equation of a Line from Two Points:

Example 1: Find the equation of line passing through two points (2,3) and (5,6).

Solution:

Step 1: Given $(x_1,y_1)$ = (2,3) and $(x_2,y_2)$ = (5,6)

Now slope = $\frac{(y_2 - y_1)}{(x_2 - x_1)}$

m = $\frac{(6-3)}{(5-2)}$

= $\frac{3}{3}$

m = 1.

Step 2: Now the equation becomes

y = 1 $\times$ x + b

y = x + b.

To find y-intercept substitute (2,3) in the equation. then we get

3 = 2 + b

=> b = 1.

Step 3: We got m = 1 and b = 1.

So equation of a line from two points is

y = x + 1.

Example:2 Find the equation of line, the given equation is 2x + 5y = 10

Solution:The given equation is 2x + 5y = 10

Subtract 2x on both sides, we get

2x - 2x + 5y = 10 - 2x

After simplify this, we get

0 + 5y = -2x + 10

5y = -2x + 10

Divided by 5 on both sides, we get

$\frac{5y}{5}$ = -$\frac{2x}{5}$ + $\frac{10}{5}$

Find the value of Y

Equation of line y = (-$\frac{2}{5}$)x + 2

Example:3 Find the equation of line, the given equation is 3x - 2y = 12

Solution: The given equation is 3x - 2y = 12

Subtract 3x on both sides, we get

3x - 3x - 2y = 12 - 3x

After simplify this, we get

0 - 2y = -3x + 12

-2y = -3x + 12

Divided by -2 on both sides, we get

After simplify this, we get

y = ($\frac{3}{2}$)x - 6

Example:4 Find the equation of line, the given equation is 5x + 4y = 10

Solution:The given equation is 5x + 4y = 10

Subtract 5x on both sides, we get

5x - 5x + 4y = 10 - 5x

After simplify this, we get

0 + 4y = -5x + 10

4y = -5x + 10

Divided by 4 on both sides, we get

$\frac{4y}{4}$ = -$\frac{5x}{4}$ + $\frac{10}{4}$

After simplify this, we get

y = (-$\frac{5}{4}$) x + 2.5

The above examples are helpful to study of equation of line.

*AP and SAT are registered trademarks of the College Board.