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 y=mx+b or y=mx y=mx .

A - linear function using y=mx+b or y=mx

We can find the linear equation in 5 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Ɨ(xāˆ’x1) 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 m1=m2
  • For perpendicular lines, the slopes have the relationship m1Ɨm2=āˆ’1 m1\times m2=-1
Start practice

Test yourself on equation of a straight line!

einstein

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

Practice more now

Find the Linear Equation

The first method: using the slope and the point.

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

Example

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

Solution:

We substitute the slope and the given point into the linear equation:
4=āˆ’2Ɨ2+b 4=-2\times2+b

We obtain:
4=āˆ’4+b 4=-4+b
To find b b Ā 
b=8 b=8

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


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

The second method: using two points

In this way, we'll first find the slope using 2 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 2 points is:

m=(Y2āˆ’Y1)(X2āˆ’X1) m=\frac{\left(Y2-Y1\right)}{\left(X2-X1\right)}


Example

Given the following two points through which the line passes:
(3,7),(6,1) \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=1āˆ’76āˆ’3 m=\frac{1-7}{6-3}

m=āˆ’63 m=\frac{-6}{3}

m=āˆ’2 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Ɨ3+b 7=-2\times3+b

7=āˆ’6+b 7=-6+b

b=13 b=13

Now, we have both the slope we found and b b , and we can determine that the linear equation is:
y=āˆ’2x+13 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 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: (6,5) \left(6,5\right) and is parallel to the line y=3xāˆ’7 y=3x-7

Solution:

We are given that the line is parallel to the line y=3xāˆ’7 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 3 .
Now, we have the slope 3 3 and the point 5,6 5,6 .
By substituting into the linear equation formula, we will find b 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 Y on one side of the equation and its coefficient is 1 1 .
If we are given an equation that is not in the explicit form, like this one for example: 5=3y+6 5=3y+6
We need to get to an explicit equation: to isolate Y Y completely and only then identify the slope.


Check your understanding

The Fourth Method: Using Perpendicular Lines

The product of the slopes of perpendicular lines isāˆ’1 -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 -1 and this is how we will find the slope.


Example

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

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

We obtain:

2Ɨm=āˆ’1 2\times m=-1

Find mm :
m=āˆ’0.5 m=-0.5

The slope of the required line is āˆ’0.5 -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 22 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+2

Y=3Xāˆ’5 Y=3X-5

Y=2Xāˆ’6 Y=2X-6

Y=āˆ’0.5X+9 Y=-0.5X+9

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

The second pair is a pair of perpendicular lines because their slopes satisfy 2Ɨāˆ’0.5=āˆ’1 2\times-0.5=-1 . That is, m1Ɨm2=āˆ’1 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) (-2,-6),(4,12)

Video Solution

Step-by-Step Solution

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

m=y2āˆ’y1x2āˆ’x1 m=\frac{y_2-y_1}{x_2-x_1}

We'll substitute according to the given points:

m=12āˆ’(āˆ’6)4āˆ’(āˆ’2) m=\frac{12-(-6)}{4-(-2)}

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

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

y=mx+b y=mx+b

12=3Ɨ4+b 12=3\times4+b

12=12+b 12=12+b

b=0 b=0

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

y=3x y=3x

Answer

y=3x y=3x

Exercise #2

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

Video Solution

Step-by-Step Solution

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

m=y2āˆ’y1x2āˆ’x1 m=\frac{y_2-y_1}{x_2-x_1}

We'll substitute according to the given points:

m=1āˆ’213āˆ’(āˆ’13) m=\frac{1-2}{\frac{1}{3}-(-\frac{1}{3})}

m=āˆ’123=āˆ’32 m=\frac{-1}{\frac{2}{3}}=-\frac{3}{2}

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

y=mx+b y=mx+b

1=āˆ’32Ɨ13+b 1=-\frac{3}{2}\times\frac{1}{3}+b

1=āˆ’12+b 1=-\frac{1}{2}+b

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

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

y=āˆ’32x+112 y=-\frac{3}{2}x+1\frac{1}{2}

Answer

y=āˆ’32x+112 y=-\frac{3}{2}x+1\frac{1}{2}

Exercise #3

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

Video Solution

Step-by-Step Solution

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

We replace the data and solve:

(0āˆ’4.5)(5āˆ’0.5)=āˆ’4.54.5=āˆ’1 \frac{(0-4.5)}{(5-0.5)}=\frac{-4.5}{4.5}=-1

Now, we know that the slope is āˆ’1 -1

Ā 

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

y=mx+b y=mx+b

(5,0) (5,0)

0=āˆ’1Ɨ5+b 0=-1\times5+b

Ā 0=āˆ’5+b 0=-5+b

b=5 b=5

Now we have the data to complete the equation:

y=āˆ’1Ɨx+5 y=-1\times x+5

y=āˆ’x+5 y=-x+5

Answer

y+x=5 y+x=5

Exercise #4

Choose the function for a straight line that passes through the point (āˆ’2,āˆ’13) (-2,-13) and is parallel to the line āˆ’4+y=5xāˆ’6 -4+y=5x-6 .

Video Solution

Step-by-Step Solution

First, write out the line equations:

āˆ’4+y=5xāˆ’6 -4+y=5x-6

y=5x+4āˆ’6 y=5x+4-6

y=5xāˆ’2 y=5x-2

From here we can determine the slope:

m=5 m=5

We'll use the formula:

y=mx+b y=mx+b

We'll use the point (āˆ’2,āˆ’13) (-2,-13) :

āˆ’13=5Ɨāˆ’2+b -13=5\times-2+b

āˆ’13=āˆ’10+b -13=-10+b

āˆ’3=b -3=b

Finally, substitute our data back into the formula:

y=5x+(āˆ’3) y=5x+(-3)

y=5xāˆ’3 y=5x-3

Answer

y=5xāˆ’3 y=5x-3

Exercise #5

Two lines have slopes of āˆ’6 -6 and 12 \frac{1}{2} .

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

Video Solution

Step-by-Step Solution

We will use the formula:

m=tanā”Ī± m=\tan\alpha

Let's check the slope of minus 6:

āˆ’6=tanā”Ī± -6=\tan\alpha

tanā”āˆ’1(āˆ’6)=Ī± \tan^{-1}(-6)=\alpha

āˆ’80.53=Ī± -80.53=\alpha

180āˆ’80.53= 180-80.53=

99.47=Ī±1 99.47=\alpha_1

Let's check the slope of one-half:

12=tanā”Ī± \frac{1}{2}=\tan\alpha

tanā”āˆ’1(12)=Ī± \tan^{-1}(\frac{1}{2})=\alpha

26.56=Ī±2 26.56=\alpha_2

\alpha_1 > \alpha_2

Answer

The line with a slope of 12 \frac{1}{2}

Test your knowledge
Start practice