Straight Lines
Straight Lines Revision
Straight Lines
The equation of a straight line is y=mx+c, but it can also be written in other forms, such as y-y_{1}=m(x-x_{1}) and ax+by+c=0. On this page you will learn how to find the equation of a straight line and how to convert between the forms of straight line equation, as well as finding the length and midpoint of straight line segments. Finally, we will put all of this knowledge together to study parallel and perpendicular lines.
Equation of a Straight Line
y-y_{1}=m(x-x_{1})
The above is the equation of a straight line through two points (x_{1},y_{1}),(x_{2},y_{2}). The first point is present clearly in the equation. The second point comes in for the calculation of the gradient, m.
m=\dfrac{y_{2}-y_{1}}{x_{2}-x_{1}}
Example: Find the equation of the straight line through (1,3) and (2,5).
\begin{aligned}m&=\dfrac{5-3}{2-1}\\[1.2em]&=\dfrac{2}{1}\\[1.2em]&=2\end{aligned}
y-3=2(x-1)
Converting Between Forms of Straight Line Equations
There are three forms of straight line equation. We have already met y-y_{1}=m(x-x_{1}). The other two are:
y=mx+c
ax+by+c=0
You need to know how to reach both of these from y-y_{1}=m(x-x_{1}).
\mathbf{y-y_{1}=m(x-x_{1})}\mathbf{\rightarrow y=mx+c}
y-y_{1}=m(x-x_{1})
y-y_{1}=mx-mx_{1}
y=mx+y_{1}-mx_{1}
\mathbf{y-y_{1}=m(x-x_{1})}\mathbf{\rightarrow ax+by+c=0}
y-y_{1}=m(x-x_{1})
y-y_{1}=mx-mx_{1}
mx-y+y_{1}-mx_{1}=0
Note: It is traditional to multiply through by a factor if necessary to make a,b,c whole numbers for a line in this form.
Parallel and Perpendicular Lines
Two lines are parallel if they have the same gradient.
Two lines are perpendicular if the gradient of the second line is the negative reciprocal of the gradient of the first line.
This means that lines l_{1} and l_{2} are:
\text{parallel if gradient of }l_{1}=\text{gradient of }l_{2}
\text{perpendicular if gradient of }l_{1}=\dfrac{-1}{\text{gradient of }l_{2}}
Tip: It is easiest to compare gradients if you put lines in y=mx+c form.
Midpoint and Length of a Line Segment
Consider a line segment connecting two points (x_{1},y_{1}),(x_{2},y_{2}). The midpoint and length of the line segment are:
\text{midpoint}=\left(\dfrac{x_{1}+x_{2}}{2},\dfrac{y_{1}+y_{2}}{2}\right)
\text{length}=\sqrt{(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}
Example: Find the midpoint and length of the line segment connecting (1,2) and (7,10).
\begin{aligned}\text{midpoint}&=\left(\dfrac{1+7}{2},\dfrac{2+10}{2}\right)\\[1.2em]&=\left(\dfrac{8}{2},\dfrac{12}{2}\right)\\[1.2em]&=(4,6)\end{aligned}
\begin{aligned}\text{length}&=\sqrt{(7-1)^{2}+(10-2)^{2}}\\[1.2em]&=\sqrt{6^{2}+8^{2}}\\[1.2em]&=\sqrt{36+64}\\[1.2em]&=\sqrt{100}\\[1.2em]&=10\end{aligned}
Example 1: Converting Between Forms of Straight Line Equations
Find the equation of the straight line passing through (1,1) and (3,0), in the form ax+by+c=0, where a, b and c are integers.
[3 marks]
y-y_{1}=m(x-x_{1})Find m:
\begin{aligned}m&=\dfrac{y_{2}-y_{1}}{x_{2}-x_{1}}\\[1.2em]&=\dfrac{0-1}{3-1}\\[1.2em]&=\dfrac{-1}{2}\end{aligned}
Substitute into equation:
y-1= - \dfrac{1}{2}(x-1)
y-1= - \dfrac{1}{2}x+\dfrac{1}{2}
\dfrac{1}{2}x-\dfrac{1}{2}+y-1=0
\dfrac{1}{2}x+y-\dfrac{3}{2}=0
Multiply by 2 to turn into whole numbers:
x+2y-3=0
Example 2: Parallel and Perpendicular Lines
The line l_{1} has a gradient of 2. Find equations for:
i) l_{2}, a parallel line that passes through (1,1)
ii) l_{3}, a perpendicular line that passes through (2,3)
in the form y=mx+c.
[4 marks]
i) l_{2} is parallel to l_{1} so has the same gradient as l_{1} so has a gradient of 2.
y-y_{1}=m(x-x_{1})
y-1=2(x-1)
y - 1 = 2x - 2
y = 2x - 1
ii) l_{3} is perpendicular to l_{1} so has gradient \dfrac{-1}{\text{gradient of }l_{1}}=\dfrac{-1}{2}
y-y_{1}=m(x-x_{1})
y-3=-\dfrac{1}{2}(x-2)
y-3 = -\dfrac{1}{2}x + 1
y = - \dfrac{1}{2}x + 4
Straight Lines Example Questions
Question 1: A straight line passes through (-1,4) and (3,3). Find its equation in y=mx+c form.
[2 marks]
Find m:
\begin{aligned}m&=\dfrac{3-4}{3-(-1)}\\[1.2em]&=\dfrac{-1}{4}\end{aligned}
Substitute into equation:
\begin{aligned}y-4&=-\dfrac{1}{4}(x-(-1))\\[1.2em]&=-\dfrac{1}{4}(x+1)\\[1.2em]&=-\dfrac{1}{4}x-\dfrac{1}{4}\end{aligned}
\begin{aligned}y&= -\dfrac{1}{4}x-\dfrac{1}{4}+4\\[1.2em]&= -\dfrac{1}{4}x+\dfrac{15}{4}\end{aligned}
Question 2: A straight line passes through the points (12,15) and (31,32). Find its equation in ax+by+c=0 form, where a,b,c are integers.
[2 marks]
Find m:
\begin{aligned}m&=\dfrac{y_{2}-y_{1}}{x_{2}-x_{1}}\\[1.2em]&=\dfrac{32-15}{31-12}\\[1.2em]&=\dfrac{17}{19}\end{aligned}
Substitute into equation:
y-15=\dfrac{17}{19}(x-12)
y-15=\dfrac{17}{19}x-\dfrac{204}{19}
\dfrac{17}{19}x-y-\dfrac{204}{19}+15=0
\dfrac{17}{19}x-y+\dfrac{81}{19}=0
Multiply by 19 to get integers:
17x-19y+81=0
Question 3: The points (-40,-80) and (10,40) have a line segment between them.
a) What is the midpoint of the line segment?
b) What is the length of the line segment?
[4 marks]
a) \begin{aligned}\text{midpoint}&=\left(\dfrac{-40+10}{2},\dfrac{-80+40}{2}\right)\\[1.2em]&=\left(\dfrac{-30}{2},\dfrac{-20}{2}\right)\\[1.2em]&=(-15,-10)\end{aligned}
b) \begin{aligned}\text{length}&=\sqrt{(10-(-40))^{2}+(40-(-80))^{2}}\\[1.2em]&=\sqrt{50^{2}+120^{2}}\\[1.2em]&=\sqrt{2500+14400}\\[1.2em]&=\sqrt{16900}\\[1.2em]&=130\end{aligned}
Question 4: The line l_{1} has the form 3x+2y+1=0.
a) What is the gradient of l_{1}
b) Find in ax+by+c=0 form the equation for the line l_{2}, which passes through (4,-1) and is parallel to l_{1}
c) Find in ax+by+c=0 form the equation for the line l_{3}, which passes through (-5,-9) and is perpendicular to l_{1}
[8 marks]
a) 3x+2y+1=0
\dfrac{3}{2}x+y+1=0
y=-\dfrac{3}{2}x-1
\text{gradient}=-\dfrac{3}{2}
b) l_{2} is parallel to l_{1} so has the same gradient as l_{1} so has a gradient of -\dfrac{3}{2}
y-y_{1}=m(x-x_{1})
y-(-1)=-\dfrac{3}{2}(x-4)
y+1=-\dfrac{3}{2}x+6
y+1+\dfrac{3}{2}x-6=0
\dfrac{3}{2}x+y-5=0
3x+2y-10=0
c) l_{3} is perpendicular to l_{1} so has a gradient of \dfrac{-1}{\text{gradient of }l_{1}}=\dfrac{-1}{\left( \dfrac{-3}{2}\right)}=\dfrac{2}{3}
y-y_{1}=m(x-x_{1})
y-(-9)=\dfrac{2}{3}(x-(-5))
y+9=\dfrac{2}{3}(x+5)
y+9=\dfrac{2}{3}x+\dfrac{10}{3}
\dfrac{2}{3}x+\dfrac{10}{3}-y-9=0
\dfrac{2}{3}x-y-\dfrac{17}{3}=0
2x-3y-17=0