Skip to main content

Section 2 Lines

The Cartesian plane is divided into four quadrants by two axes called the \(x\)-axis (horizontal line) and the \(y\)-axis (vertical line). These axes intersect at a point called the origin. An ordered pair of numbers \((x, y)\) defines a point. These ordered pairs are called the coordinates of the point. The coordinates of the origin are \((0, 0).\)
Figure 2.1. Points
Once the coordinates of two points are known the distance between the two points and midpoint of the interval joining the points can be computed. The distance from \(A\) to \(B\) is the same as the distance from \(B\) to \(A.\) We first determine the distance between two points that are either vertically or horizontally aligned. Given two points \(A=(x_1,y_1)\) and \(B=(x_1,y_2)\) than the distance of \(A\) and \(B\) is \(d(A,B)=|y_2-y_1|.\) In a similar way, if the two points are given by \(A=(x_1,y_1)\) and \(B=(x_2,y_1),\) then \(d(A,B)=|x_2-x_1|.\) The Theorem of Pythagoras is a well-known theorem, we need it to provide a formula for the distance in the general case.
Figure 2.4. \(a^2+b^2=c^2\)
By construction it follows that
\begin{equation*} c^2=(a+b)^2-4\frac{ab}{2}=a^2+2ab+b^2-2ab=a^2+b^2. \end{equation*}
In the general case let \(A=(x_1,y_1),B=(x_2,y_2)\) here we have
Figure 2.5.
that is \(d(A,C)=|x_2-x_1|, d(C,B)=|y_2-y_1|.\) Pythagoras’ theorem implies that
\begin{equation*} d(A,B)^2=d(A,C)^2+d(B,C)^2. \end{equation*}
Therefore
\begin{equation*} d(A,B)=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}. \end{equation*}
The midpoint, \(M,\) of the line segment joining \(A=(x_1,y_1)\mbox{ and }B=(x_2,y_2)\) is
\begin{equation*} \left(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\right). \end{equation*}

Subsection 2.1 Equations of lines

This part is about the equations of straight lines. These equations can take different forms depending on the facts one knows about the lines.

Subsubsection 2.1.1 General equation of a straight line

The equation given by

\begin{equation*} ax+by+c=0 \end{equation*}

defines a straight line. There are some special cases to deal with

  • if \(a=0,b\neq 0,\) then we have a horizontal line \(y=\frac{-c}{b},\)
  • if \(a\neq 0,b=0,\) then we have a vertical line \(x=\frac{-c}{a}.\)

Subsubsection 2.1.2 Equation of a line with given gradient, passing through a given point

Given a line by a general equation

\begin{equation*} ax+by+c=0 \end{equation*}

and \(b\neq 0.\) In this case we obtain that

\begin{equation*} y=\frac{-a}{b}x-\frac{-c}{b}=mx+n. \end{equation*}

The ratio

\begin{equation*} m=\frac{\mbox{change in } y}{\mbox{change in } x} \end{equation*}

is called the gradient (or slope) of the line. If two points are given on the line \((x_1,y_1)\) and \((x_2,y_2)\) the gradient \(m\) can be determined as follows:

\begin{equation*} m=\frac{\mbox{change in } y}{\mbox{change in } x}=\frac{y_2-y_1}{x_2-x_1}. \end{equation*}

For example, the gradient of the line \(y=5x-3\) is

\begin{equation*} m=\frac{\mbox{change in } y}{\mbox{change in } x}=\frac{2-(-3)}{1-0}=5. \end{equation*}

Let us take a general line with gradient \(m,\) passing through the point \(A=(x_1 , y_1).\) We now use the fact that the line \(y=mx+n\) passes through \(A=(x_1 , y_1 ).\) Substituting these values we get that

\begin{equation*} y_1=mx_1+n\longrightarrow n=y_1-mx_1. \end{equation*}

So the equation of the line is

\begin{equation*} y = mx + y_1 − mx_1. \end{equation*}

Subsubsection 2.1.3 Equation of a line through two given points

Suppose the general line passes through two points \(A=(x_1 , y_1)\) and \(B=(x_2 , y_2 ).\) Take an arbitrary but fixed point on the line different from \(A,B\) denote it by \(P=(x,y).\) The gradient of \(AP\) must be the same as the gradient of \(AB,\) hence we obtain

\begin{equation*} \frac{y-y_1}{x-x_1}=\frac{y_2-y_1}{x_2-x_1}. \end{equation*}

It may be written as

\begin{equation*} \frac{y-y_1}{y_2-y_1}=\frac{x-x_1}{x_2-x_1}. \end{equation*}

Subsubsection 2.1.4 Intercept form of a line

Two points determine a line as we saw. Consider a line given by the general equation

\begin{equation*} ax+by+c=0. \end{equation*}

We get the so-called \(y\)-intercept by setting \(x= 0\) and solving for \(y:\)

\begin{equation*} y=\frac{-c}{b}. \end{equation*}

That is the \(y\)-intercept \((0,-c/b)\) is on the line. Similarly, we get the \(x\)-intercept by setting \(y= 0\) and solving for \(x:\)

\begin{equation*} x=\frac{-c}{a}. \end{equation*}

So the \(x\)-intercept \((-c/a,0)\) is on the line. The equation of the line making intercepts \(I_x\) and \(I_y\) on \(x\)- and \(y\)-axis respectively is given by

\begin{equation*} \frac{x}{I_x}+\frac{y}{I_y}=1. \end{equation*}

Subsubsection 2.1.5 Parametric equations

Lines can be given in a so-called parametric form, that is

\begin{equation*} x(t)=at+b,\quad y(t)=ct+d \end{equation*}

for some \(a,b,c,d\in\mathbb{R}.\) If we have a line in parametric form we can determine other representations as follows (for simplicity assume that \(a\neq 0, c\neq 0\)). We have that

\begin{equation*} t=\frac{x-b}{a},\quad t=\frac{y-d}{c}. \end{equation*}

Hence we obtain that

\begin{equation*} \frac{x-b}{a}=\frac{y-d}{c} \longrightarrow cx-ac=ay-ad \longrightarrow cx-ay+(ad-ac)=0. \end{equation*}

Therefore we get a general equation of a line. The other direction is as simple as the previous one as well. Given a line in general form, say \(ax+by+c=0,\) our goal is provide a parametric form. We take \(x=t\) to obtain \(y=\frac{-at-c}{b}.\) Of course we may get different parametric forms too by setting \(x=ut+v\) for some \(u,v\in\mathbb{R}.\)

As an example consider the line given in parametric form \(x=3t-1,y=2t+5.\) It follows that

\begin{equation*} t=\frac{x+1}{3}=\frac{y-5}{2} \longrightarrow 2x+2=3y-15 \longrightarrow 2x-3y+17=0. \end{equation*}

Let us see the other direction, suppose the line is given by \(3x+5y-12=0\) and we would like to have a parametric form. Take \(x=5t-1.\) It follows that

\begin{equation*} 15t-3+5y-12=0 \longrightarrow y=-3t+3. \end{equation*}

Subsubsection 2.1.6 Parametric form of the line through two points

Suppose the parametric line passes through two points \(A=(x_1 , y_1)\) and \(B=(x_2 , y_2 ).\) The form can be determined by the equation

\begin{equation*} L(t)=tA+(1-t)B, \end{equation*}

to make it more transparent rewrite the formula as

\begin{equation*} L(t)=(x(t),y(t))=(tx_1,ty_1)+(x_2-tx_2,y_2-ty_2)=(tx_1+x_2-tx_2,ty_1+y_2-ty_2). \end{equation*}

Thus we have

\begin{equation*} x(t)=(x_1-x_2)t+x_2,\quad y(t)=(y_1-y_2)t+y_2. \end{equation*}

Consider an example, let \(A=(2,3),B=(7,13).\) Let us compute the parametric form of the line using the above formula:

\begin{equation*} L(t)=(x(t),y(t))=(2t,3t)+(7-7t,13-13t)=(7-5t,13-10t). \end{equation*}

That is we obtain

\begin{equation*} x(t)=-5t+7,\quad y(t)=-10t+13. \end{equation*}

Subsection 2.2 Exercises

Subsection 2.3 Parallel and perpendicular lines

In this part we investigate intersection of two lines and we deal with properties of parallel and perpendicular lines.

Subsubsection 2.3.1 Intersection of two given lines

Our goal is to determine the common points \((x,y)\) of two lines given in general forms

\begin{align*} a_1x+b_1y+c_1 \amp =0,\\ a_2x+b_2y+c_2 \amp =0. \end{align*}

We eliminate one of the variables, let say \(y.\) To do so, we multiply the first equation by \(b_2\) and the second one by \(b_1:\)

\begin{align*} a_1b_2x+b_1b_2y+c_1b_2 \amp =0,\\ a_2b_1x+b_2b_1y+c_2b_1 \amp =0. \end{align*}

Now we subtract the second equation from the first one to get rid of \(y:\)

\begin{equation*} (a_1b_2-a_2b_1)x+c_1b_2-c_2b_1=0. \end{equation*}

From here we conclude the following

  1. there are infinitely many solutions, that is the two lines are coincident if \(a_1b_2-a_2b_1=c_1b_2-c_2b_1=0,\)
  2. there are no solution, that is the two lines are parallel and distinct if \(a_1b_2-a_2b_1=0, c_1b_2-c_2b_1\neq 0,\)
  3. there is a solution, that is the two lines intersect if \(a_1b_2-a_2b_1\neq 0.\)

Let us give some concrete examples.

  1. \begin{align*} x+2y+3 \amp =0,\\ 3x+6y+9 \amp =0. \end{align*}
    Here we have \(a_1b_2-a_2b_1=1\cdot 6-3\cdot 2=0, c_1b_2-c_2b_1=3\cdot 6-9\cdot 2=0.\)
  2. \begin{align*} x+2y+3 \amp =0,\\ 2x+4y+5 \amp =0. \end{align*}
    In this case we obtain that \(a_1b_2-a_2b_1=1\cdot 4-2\cdot 2=0, c_1b_2-c_2b_1=3\cdot 4-5\cdot 2\neq 0.\)
  3. \begin{align*} x+2y+3 \amp =0,\\ 2x+3y+1 \amp =0. \end{align*}
    We get that \(a_1b_2-a_2b_1=1\cdot 3-2\cdot 2\neq 0.\)

Subsubsection 2.3.2 Parallel and perpendicular lines

In the previous part we saw that two lines defined by

\begin{align*} a_1x+b_1y+c_1 \amp =0,\\ a_2x+b_2y+c_2 \amp =0, \end{align*}

are parallel (and distinct), than \(a_1b_2-a_2b_1=0, c_1b_2-c_2b_1\neq 0.\) In practice many times we have lines given in the gradient/slope form \(y=mx+n.\) We can easily modify the above classification to obtain some condition that can be used in such cases. Take \(b_1=b_2=-1\) in the definition of the general form, that is we consider the system

\begin{align*} a_1x-y+c_1 \amp =0,\longrightarrow y=a_1x+c_1,\\ a_2x-y+c_2 \amp =0,\longrightarrow y=a_2x+c_2. \end{align*}

Now the condition \(a_1b_2-a_2b_1=0\) simplifies as

\begin{equation*} -a_1+a_2=0\longrightarrow a_1=a_2. \end{equation*}

The slopes has to equal to get parallel lines. Now it is clear that the following lines are parallel lines:

\begin{align*} y \amp =3x+7,\\ y \amp =3x+2,\\ y \amp =3x-4. \end{align*}

Parallel lines are special ones as we saw. It is also a natural question how can we provide two lines intersecting like (such lines are called perpendicular) the \(x\)-axis (horizontal line) and \(y\)-axis (vertical line). Obviously, if we take an arbitrary horizontal line and an arbitrary vertical line, then those will do the job. What about other possibilities? We will see that this concept is related to the angle between the two lines, here we only deal with this special case. We have the following characterization of perpendicular lines. In a coordinate plane, two lines are perpendicular if and only if one is vertical and the other is horizontal or the slopes of the lines are negative reciprocals of each other. Some examples are given below:

\begin{align*} x \amp =4, \amp y \amp =7,\\ y \amp =2x-3, \amp y \amp =\frac{-1}{2}x-3,\\ y \amp =\frac{3}{4}x-5, \amp y \amp =\frac{-4}{3}x-1. \end{align*}

Subsection 2.4 Exercises