# Writing Linear Equations When Given 2 Points

#### Quickly see how to write an equation in y=mx+b form when only given 2 points that the line passes through.





Writing an equation in the form $$y = mx + b$$ when given a pair of coordinates that the line passes through involves a few simple steps. Let's break it down:

1. **Understand the Form**: In the equation $$y = mx + b$$:
- $$m$$ represents the slope of the line.
- $$b$$ represents the y-intercept, which is the point where the line crosses the y-axis.

2. **Identify the Given Coordinates**: You're given a pair of coordinates $$(x_1, y_1)$$ that the line passes through. These coordinates will help us find the slope ($$m$$).

3. **Calculate the Slope ($$m$$)**: The slope $$m$$ can be calculated using the formula:
$m = \frac{{y_2 - y_1}}{{x_2 - x_1}}$
You can choose any other point on the line as $$(x_2, y_2)$$, but the one given to you is typically denoted by $$(x_1, y_1)$$.

4. **Substitute the Slope ($$m$$) and the Given Coordinates into the Equation**: After finding the slope, plug it along with one of the given coordinates $$(x_1, y_1)$$ into the equation $$y = mx + b$$.

5. **Solve for the y-intercept ($$b$$)**: Once you've substituted the slope ($$m$$) and the coordinates $$(x_1, y_1)$$ into the equation, you can solve for $$b$$.

6. **Write the Equation**: Finally, once you've found both the slope $$m$$ and the y-intercept $$b$$, you can write the equation in the form $$y = mx + b$$.

Let's summarize these steps with an example:

Example:
Suppose you're given the point $$(3, 5)$$ that the line passes through. Follow these steps to find the equation:

1. **Identify the Given Coordinates**: $$(x_1, y_1) = (3, 5)$$

2. **Calculate the Slope ($$m$$)**: Using the formula:
$m = \frac{{y_2 - y_1}}{{x_2 - x_1}}$
Let's say we choose another point on the line, for example, $$(7, 9)$$:
$m = \frac{{9 - 5}}{{7 - 3}} = \frac{4}{4} = 1$
So, the slope $$m = 1$$.

3. **Substitute into the Equation**: Using the slope $$m = 1$$ and the given point $$(3, 5)$$, we have:
$y = 1 \cdot x + b$

4. **Solve for the y-intercept ($$b$$)**: Substitute the point $$(3, 5)$$ into the equation:
$5 = 1 \cdot 3 + b$
$5 = 3 + b$
$b = 5 - 3$
$b = 2$

5. **Write the Equation**: Now, plug the slope $$m = 1$$ and the y-intercept $$b = 2$$ back into the equation:
$y = 1x + 2$
or simply:
$y = x + 2$

So, the equation of the line passing through the point $$(3, 5)$$ is $$y = x + 2$$.