To find the equation of a line given two points, you can follow these steps:
- Identify the Points: Assume you have two points, (x1, y1) and (x2, y2).
- Calculate the Slope: The slope (m) of the line through these two points can be calculated using the formula:
- Use the Point-Slope Form: With the slope calculated, you can use the point-slope form of the equation of a line:
- Simplify to Slope-Intercept Form: If desired, you can rearrange the equation to obtain the slope-intercept form (y = mx + b) by solving for y.
m = (y2 – y1) / (x2 – x1)
y – y1 = m(x – x1)
For example, if your points are (1, 2) and (3, 4):
- Calculate the slope:
- Use the point-slope form using point (1, 2):
- Simplify to:
m = (4 – 2) / (3 – 1) = 2 / 2 = 1
y – 2 = 1(x – 1)
y = x + 1
This is the equation of the line that passes through the two points.