# Finding a Linear Equation

šPractice equation of a straight line

Finding a linear equation is actually about graphing the linear function using $y=mx+b$ or $y=mx$.

We can find the linear equation in $5$ ways:

• Using a point on the line and the slope of the line.
• Using two points that lie on the line.
• Using the graph of the function itself.
• Using parallel lines, that is, if the requested line is parallel to another line and we know the slope of the other line.
• Using perpendicular lines, that is, if the requested line is perpendicular to another line and we know the slope of the other line.

The first three methods are based in one way or another on the general formula for finding the linear equation:

$y-y1=m\times\left(x-x1\right)$

The last two methods also use this formula, but they also take into account two additional rules:

• For parallel lines, the slopes are equal, that is $m1=m2$
• For perpendicular lines, the slopes have the relationship $m1\times m2=-1$

## Test yourself on equation of a straight line!

Find the equation of the line passing through the two points $$(-2,-6),(4,12)$$

## The first method: using the slope and the point.

We substitute into the linear equation $y=mx+b$
The given slope $m$ and the values of the given point. This is how we will find $b$ and can determine the linear equation.

### Example

Given a point through which the line passes: $\left(2,4\right)$ and the slope: $-2$
Find the linear equation.

Solution:

We substitute the slope and the given point into the linear equation:
$4=-2\times2+b$

We obtain:
$4=-4+b$
To find $b$ Ā
$b=8$

Now, we have both the slope given in the question and $b$.
We can determine that the linear equation is:
$y=-2x+8$

Join Over 30,000 Students Excelling in Math!
Endless Practice, Expert Guidance - Elevate Your Math Skills Today

## The second method: using two points

In this way, we'll first find the slope using $2$ points according to the formula.
After that, we'll find the linear equation using the first form (by the slope and a point)
The formula to find the slope using $2$ points is:

$m=\frac{\left(Y2-Y1\right)}{\left(X2-X1\right)}$

### Example

Given the following two points through which the line passes:
$\left(3,7\right),\left(6,1\right)$
Find the linear equation.

Solution:
First, find the slope using the formula. Replace the given points and you will get:

$m=\frac{1-7}{6-3}$

$m=\frac{-6}{3}$

$m=-2$

Now that we have found the slope, we can use the point-slope form. We will choose a point from the given ones and place the slope and the chosen point into the linear equation template.

We obtain:

$7=-2\times3+b$

$7=-6+b$

$b=13$

Now, we have both the slope we found and $b$, and we can determine that the linear equation is:
$y=-2x+13$

Do you know what the answer is?

## The third method: using parallel lines

When you are given a parallel line to another line you are looking for, you should know that the slope of the parallel line is the same as the slope of the line you are looking for. Therefore, you can take the slope of the parallel line and assume it is the slope of the line you are seeking. Pay attention: you can identify the slope only in an explicit equation where Y is isolated, stands alone on one side of the equation, and its coefficient is $1$.

Usually, you will be given a point and then you can find the linear equation using a point and a slope
(the point-slope form).

### Example

Find the linear equation that passes through the point: $\left(6,5\right)$ and is parallel to the line $y=3x-7$

Solution:

We are given that the line is parallel to the line $y=3x-7$.
This information tells us that the slope of our line is the same as the slope of the corresponding line, and therefore the slope of the equation of the line we are looking for is $3$.
Now, we have the slope $3$ and the point $5,6$.
By substituting into the linear equation formula, we will find $b$ and thus we will find the linear equation (the first form).

Pay attention!
We easily found the slope since the equation of the parallel line is given explicitly with $Y$ on one side of the equation and its coefficient is $1$.
If we are given an equation that is not in the explicit form, like this one for example: $5=3y+6$
We need to get to an explicit equation: to isolate $Y$ completely and only then identify the slope.

## The Fourth Method: Using Perpendicular Lines

The product of the slopes of perpendicular lines is$-1$.
Therefore, when we are given a line perpendicular to the line we are looking for, we know that the product of the two slopes is $-1$ and this is how we will find the slope.

### Example

The requested line is perpendicular to the line $y=2x-6$
What is the slope of the required line?

Solution:
Define the slope of the requested line as $m$.
Since both lines are perpendicular, we can derive the slope of the perpendicular line $-2$
and write the equation where the product of the two slopes is equal to $-1$:

We obtain:

$2\times m=-1$

Find $m$:
$m=-0.5$

The slope of the required line is $-0.5$ .
Now, we will find the equation of the line based on the slope and the given point.

Note:

Here too, it is important to first see what the equation of the perpendicular line expresses.

Do you think you will be able to solve it?

## The Fifth Method: Using the Graph

When you're given the graph of a function, you can find the linear equation.
First, choose $2$ points on the graph.
This way, you'll find the slope of the function (according to the second method).
Then, find the linear equation based on any point you choose, which the straight line passes through, and of course, the slope you found (the first method).

### Example of Finding a Linear Equation

Given two pairs of lines:

$Y=3X+2$

$Y=3X-5$

$Y=2X-6$

$Y=-0.5X+9$

The first pair is a pair of parallel lines because the slopes $m1=m2=3$ are equal.

The second pair is a pair of perpendicular lines because their slopes satisfy $2\times-0.5=-1$. That is, $m1\times m2=-1$

## Examples and Exercises with Solutions for Linear Equations

### Exercise #1

Find the equation of the line passing through the two points $(-2,-6),(4,12)$

### Step-by-Step Solution

In the first step, we'll find the slope using the formula:

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

We'll substitute according to the given points:

$m=\frac{12-(-6)}{4-(-2)}$

$m=\frac{18}{6}=3$

Now we'll choose the point (4,12) and use the formula:

$y=mx+b$

$12=3\times4+b$

$12=12+b$

$b=0$

We'll substitute the data into the formula to find the equation of the line:

$y=3x$

$y=3x$

### Exercise #2

Find the equation of the line passing through the two points $(\frac{1}{3},1),(-\frac{1}{3},2)$

### Step-by-Step Solution

In the first step, we'll find the slope using the formula:

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

We'll substitute according to the given points:

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

$m=\frac{-1}{\frac{2}{3}}=-\frac{3}{2}$

Now we'll choose point $(\frac{1}{3},1)$ and use the formula:

$y=mx+b$

$1=-\frac{3}{2}\times\frac{1}{3}+b$

$1=-\frac{1}{2}+b$

$b=1\frac{1}{2}$

We'll substitute the given data into the formula to find the equation of the line:

$y=-\frac{3}{2}x+1\frac{1}{2}$

$y=-\frac{3}{2}x+1\frac{1}{2}$

### Exercise #3

Find the equation of the line passing through the two points $(5,0),(\frac{1}{2},4\frac{1}{2})$

### Step-by-Step Solution

First, we will use the formula to find the slope of the straight line:

We replace the data and solve:

$\frac{(0-4.5)}{(5-0.5)}=\frac{-4.5}{4.5}=-1$

Now, we know that the slope is $-1$

Ā

We replace one of the points in the formula of the line equation:

$y=mx+b$

$(5,0)$

$0=-1\times5+b$

Ā $0=-5+b$

$b=5$

Now we have the data to complete the equation:

$y=-1\times x+5$

$y=-x+5$

$y+x=5$

### Exercise #4

Straight line passes through the point $(-2,-13)$ and parallel to the line $-4+y=5x-6$

### Step-by-Step Solution

First, let's arrange the line equations:

$-4+y=5x-6$

$y=5x+4-6$

$y=5x-2$

From here we can determine the slope:

$m=5$We'll use the formula:

$y=mx+b$

We'll use the point $(-2,-13)$

$-13=5\times-2+b$

$-13=-10+b$

$-3=b$

Let's substitute the existing data back into the formula:

$y=5x+(-3)$

$y=5x-3$

$y=5x-3$

### Exercise #5

Two lines have slopes of $-6$ and $\frac{1}{2}$.

Which of the lines forms a smaller angle with the x-axis?

### Step-by-Step Solution

We will use the formula:

$m=\tan\alpha$

Let's check the slope of minus 6:

$-6=\tan\alpha$

$\tan^{-1}(-6)=\alpha$

$-80.53=\alpha$

$180-80.53=$

$99.47=\alpha_1$

Let's check the slope of one-half:

$\frac{1}{2}=\tan\alpha$

$\tan^{-1}(\frac{1}{2})=\alpha$

$26.56=\alpha_2$

\alpha_1 > \alpha_2

The line with a slope of $\frac{1}{2}$
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 117, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}