To find the equation of a line that passes through two points, you can follow these steps:
- Identify the points: Let’s say the two points are
(x_1, y_1)
and(x_2, y_2)
. - Calculate the slope: The slope
m
of the line that passes through these points is calculated using the formula:
m = (y_2 - y_1) / (x_2 - x_1)
.
This slope measures the change iny
for a unit change inx
. - Use the point-slope form: With the slope
m
and one of the points (let’s say(x_1, y_1)
), you can write the equation in point-slope form: y - y_1 = m(x - x_1)
- Simplify to slope-intercept form (if desired): If you want the equation in slope-intercept form
y = mx + b
, you can rearrange your equation:
y = mx - mx_1 + y_1
Thus, yourb
(y-intercept) can be found asb = y_1 - mx_1
. This gives you the final equation: y = mx + b
As an example, let’s say the points are (1, 2)
and (3, 4)
. First, calculate the slope:
m = (4 - 2) / (3 - 1) = 2 / 2 = 1
Now, using point-slope form with the first point:
y - 2 = 1(x - 1)
Simplifying, we get:
y - 2 = x - 1
y = x + 1
Therefore, the equation of the line that passes through the points (1, 2)
and (3, 4)
is:
y = x + 1