# Calculating equation of a line (point/slope)

The equation of a line is more than a name for the line, it describes the uniqueness of the line. To describe a person, for example, we might be able to cite their name, some on their physical characteristics and some of their personality traits, but we can't characterize everything about that person. Well, a line is like an open book. Once we know the equation of the line, we know everything about the line. Knowing the equation of a line, we can find any point on the line, where it crosses the x axis and y axis, and the slope of the line.

We can write the equation of a line with a point on the line and the slope of the line. For one point $(x_1,\, y_1)$ along with the slope, $m$, gives us the equation of the line. Here is the point/slope formula:

$y-y_1=m(x-x_1)$

In simpler terms, this means that y minus the y-coordinate of a point on a line is equal to the slope times x minus the x-coordinate of that point.

## Using the formula

The following examples demonstrate how to plug the point and slope information into the formula.

### Example 1:

Write the equation of the line passing through the point $(2,\,7)$ with a slope of $m = 3$.

$y-7=3(x-2)$

Typically, we would now solve for y, but we will do that later.

### Example 2:

Write the equation of the line passing through the point $(4,\,10)$ with slope of $m = 5$.

$y-10=5(x-4)$

### Example 3:

Write the equation of the line passing through the point $(3,\,6)$ with a slope of $m = 4$.

$y-6=4(x-3)$

## Solving for y

Now, let’s solve for y for each of the previous examples.

### Solve example 1 for y

Write the equation of the line passing through the point $(2,\,7)$ with a slope of $m = 3$.

\begin{align} y-7 &= 3(x-2) \\ y-7 &= 3x - 6 \qquad \text{multiply through the parentheses on the right by 3} \\ y-7+7 &= 3x - 6 + 7 \qquad \text{add 7 to both sides of the equal sign to get y alone} \\ y &= 3x + 1 \qquad \text{the equation of the line} \\ \end{align}

In fact, when we solve for y, the result is the slope/intercept form of the equation of a line. More on that in the next section.

### Solve example 2 for y

Write the equation of the line passing through the point $(4,\,10)$ with slope of $m = 5$.

\begin{align} y-10 &= 5(x-4) \\ y-10 &= 5x - 20 \qquad \text{multiply through the parentheses by 5} \\ y-10+10 &= 5x - 20 + 10 \qquad \text{add 10 to both sides} \\ y &= 5x - 10 \qquad \text{the equation of the line} \\ \end{align}

### Solve example 3 for y

Write the equation of the line passing through the point $(3,\,6)$ with a slope of $m = 4$.

\begin{align} y-6 &= 4(x-3) \\ y-6 &= 4x - 12 \qquad \text{multiply through the parentheses by 4} \\ y-6+6 &= 4x - 12 + 6 \qquad \text{add 6 to both sides} \\ y &= 4x - 6 \qquad \text{the equation of the line} \\ \end{align}

### Example 4

Write the equation of the line passing through the point $(-1,\,6)$ with a slope of $m=3$.

\begin{align} y-6 &= 3(x-(-1)) \\ y-6 &= 3x + 1) \qquad \text{resolve parentheses--PEMDAS} \\ y-6 &= 3x + 3) \qquad \text{multiply through the parentheses by 3} \\ y-6+6 &= 3x + 3 + 6 \qquad \text{add 6 to both sides} \\ y &= 3x + 9 \qquad \text{the equation of the line} \\ \end{align}

NOTE: If the slope is not given, determine a second point on the line and calculate the slope.