Skip to main content

Section 2.1 Lines and Linear Functions

What is straight? A line can be straight, or a street, but the human heart, oh, no, it's curved like a road through mountains. — Thomas Lanier “Tennessee” Williams III, American playwright and author, 1911 – 1983

Problem: A Toronto based cellular telephone service provider offers the following plan for \(\$55\) per month:

\begin{equation*} \begin{array}{ll} \text{Data:}\amp \text{1 GB included and }\$5/250 \text{ MB for additional data}\\ \hline \text{Talk:}\amp \text{Unlimited Canada-wide minutes}\\ \hline \text{Messaging:}\amp \text{Unlimited international text, picture, and video messaging.}\\ \hline \end{array} \end{equation*}

If \(x\) is the number of MB of data used, what is the monthly bill before the applicable taxes?

Solution

Let \(x\) be the number of MB of data used and let \(P(x)\) be the monthly bill (in dollars) before the applicable taxes.

Observe that the plan considers two scenarios:

  • If the amount of data used does not exceed 1GB, i.e. if \(x\leq 1000\) MB, then \(P(x)=55\text{.}\)

  • Now suppose that the amount of data used exceeds 1GB, i.e. suppose that \(x\gt 1000\) MB.

    It is given that the costumer pays \(\$5\) for any additional \(250\) MB of data. This translates into \(\frac{5}{250}=\frac{1}{50}=0.02\) dollars per one MB over the initial 1000 MB.

    It follows that if \(x\gt 1000\) then

    \begin{equation*} P(x)=\text{price for the initial 1000 MB} + \text{price for the amount of data over 1000 MB} \end{equation*}
    \begin{equation*} =55+0.02(x-1000)=35+0.02x \end{equation*}

    dollars.

Therefore,

\begin{equation*} P(x)=\left\{ \begin{array}{cl} 55 \amp \text{if } x\leq 1000\\ 35+0.02x \amp \text{if } x\gt 1000.\\ \end{array} \right. \end{equation*}

Example 2.1.1. Canadian vs. US.

On June 4, 2021, the exchange rate between Canadian and US currency was:

\begin{equation*} \$1 \text{ CAN} =\$0.83 \text{ US}. \end{equation*}
  1. Dr. J plans to attend a math related event in Seattle, WA, in October 2021. He will need to stay overnight in Seattle. Dr. J booked a hotel room online on June 4, 2021, and was charged \(\$212.86\) CAN. What was the price for the room in the US dollars?

  2. On June 4, 2021, Dr. J was looking online for a gift for his son's upcoming birthday. He found a very nice black blue striped silk tie for \(\$27.50\) US. What was the cost of the tie in Canadian dollars?

  3. Let \(f\) be the function that models the exchange rate from Canadian to US currency on June 4, 2021. Write the function \(f\) in terms of \(x\text{,}\) the amount of money in Canadian dollars.

  4. Let \(g\) be the function that models the exchange rate from US to Canadian currency on June 4, 2021. Write the function \(g\) in terms of \(x\text{,}\) the amount of money in US dollars.

Solution
  1. If \(\$1 \text{ CAN} =\$0.83 \text{ US}\) then

    \begin{equation*} \$212.86 \text{ CAN} =212.86 \cdot \$0.83 \text{ US} = \$176.67 \text{ US}. \end{equation*}
  2. Observe that

    \begin{equation*} \$1 \text{ CAN} =\$0.83 \text{ US} \Leftrightarrow \$1 \text{ US} =\frac{1}{0.83}\cdot \$1 \text{ CANS} =\$1.20 \text{ CAN}. \end{equation*}

    It follows,

    \begin{equation*} \$27.50 \text{ US} =27.50 \cdot \$1.20 \text{ CAN} = \$33.00 \text{ CAN}. \end{equation*}
  3. Let \(x\) be the amount of money in Canadian dollars and let \(y=f(x)\) be the corresponding amount of money in US dollars calculated at the exchange rate on June 4, 2021.

    Then

    \begin{equation*} \$1 \text{ CAN} =\$0.83 \text{ US} \Leftrightarrow \$ x \text{ CAN} =x \cdot \$0.83 \text{ US} \end{equation*}

    implies that the function \(f\) is given by \(y=f(x)=0.83x\text{.}\)

  4. Let \(x\) be the amount of money in US dollars and let \(y=g(x)\) be the corresponding amount of money in Canadian dollars calculated at the exchange rate on June 4, 2021.

    Then

    \begin{equation*} \$1 \text{ US} =\$1.20 \text{ CAN} \Leftrightarrow \$ x \text{ US} =x \cdot \$1.20 \text{ CAN} \end{equation*}

    implies that the function \(g\) is given by \(y=g(x)=1.20x\text{.}\)

Linear Function: A linear function is any function of the form

\begin{equation*} f(x)=mx+b \end{equation*}

where \(m\) and \(b\) are given real numbers.

Example 2.1.2. Linear functions.

For the given values of \(m\) and \(b\) write the corresponding linear function:

  1. \(m=0\text{,}\) \(b=55\text{.}\)

  2. \(\displaystyle m=\frac{1}{50}\text{,}\) \(b=55\text{.}\)

  3. \(m=0.83\text{,}\) \(b=0\text{.}\)

Solution
  1. \(f(x)=0\cdot x+55=55\text{.}\)

  2. \(f(x)=\displaystyle \frac{1}{50}\cdot x+55\text{.}\)

  3. \(f(x)=0.7x\text{.}\)

Three important tasks: Let a linear function \(f(x)=mx+b\text{,}\) \(m,b\in \mathbb{R}\) be given.

  1. Determine the domain of \(f\text{.}\)

    Solution

    The domain of the function \(f(x)=mx+b\text{,}\) \(m,b\in \mathbb{R}\text{,}\) is the set of all real numbers \(\mathbb{R}\text{.}\)

  2. Determine the range of \(f\text{.}\)

    Solution

    Let \(y\in \mathbb{R}\text{.}\) The question is if, for the chosen \(y\text{,}\) we can find a real number \(x\) such that

    \begin{equation*} y=f(x)=mx+b. \end{equation*}

    In other words, we need to solve this equation for \(x\text{.}\) (Remember, at this point, \(m\text{,}\) \(b\text{,}\) and \(y\) are given real numbers.)

    The first step is to notice that

    \begin{equation*} y=mx+b\Leftrightarrow mx=y-b. \end{equation*}

    Next we need to consider two cases, \(m=0\) and \(m\not= 0\text{.}\)

    1. If \(m=0\) then, for all real numbers \(x\text{,}\) \(f(x)=0\cdot x+b=b\) and we see that \(f\) is a constant function. Its range is the set \(\{ b\}\text{.}\)

      Note: We can make the same conclusion by considering the equation \(y-b=0\cdot x=0\text{.}\) This equation has only one solution \(y=b\text{.}\)

    2. If \(m\not=0\) then

      \begin{equation*} mx=y-b \Leftrightarrow x=\frac{y-b}{m}. \end{equation*}

      In other words, if \(m\not= 0\) the equation \(mx=y-b\) has a unique solution \(\displaystyle x=\frac{y-b}{m}\text{,}\) for any \(y\in \mathbb{R}\text{.}\)

    We conclude that the range of the function \(f(x)=mx+b\text{,}\) \(m,b\in \mathbb{R}\text{,}\) is the set \(\mathbb{R}\) if \(m\not=0\) and the set \(\{ b\}\) if \(m=0\text{.}\)

  3. Discuss the monotonicity of \(f\text{.}\)

    Solution

    Let \(f(x)=mx+b\text{,}\) \(m,b\in \mathbb{R}\text{.}\) If \(m=0\) then \(f\) is a constant function. So we suppose that \(m\not=0\text{.}\)

    Let \(x_1,x_2\in \mathbb{R}\) with \(x_1\lt x_2\text{.}\) We observe that

    \begin{equation*} f(x_2)-f(x_1)=(mx_2+b)-(mx_1+b)=mx_2+b-mx_1-b=m(x_2-x_1). \end{equation*}

    Since \(x_2\gt x_1\) we have that \(x_2-x_1>0\text{.}\) This implies that the sign of \(f(x_2)-f(x_1)=m(x_2-x_1)\) depends only on the sign of \(m\text{.}\)

    In other words,

    \begin{equation*} f(x_2)-f(x_1)>0 \Leftrightarrow m>0 \text{ and } f(x_2)-f(x_1)\lt 0 \Leftrightarrow m\lt 0. \end{equation*}

    Therefore,

    1. If \(m>0\) then

      \begin{equation*} x_1\lt x_2\Rightarrow f(x_1)\lt f(x_2) \end{equation*}

      and, by definition, \(f\) is an increasing function.

    2. If \(m \lt 0\) then

      \begin{equation*} x_1\lt x_2\Rightarrow f(x_1)>f(x_2) \end{equation*}

      and, by definition, \(f\) is a decreasing function.

See Figure 2.1.

Figure 2.1. The monotonicity of the linear function \(f(x)=mx+b\) depends on the sign of the coefficient \(m\text{.}\)

Fact: The graph of a linear function is a straight line.

Example 2.1.3. Three lines.

Draw the graphs of the following functions:

  1. \(\displaystyle f(x)=2x+1\)

  2. \(\displaystyle g(x)=-2x+1\)

  3. \(\displaystyle h(x)=1\)

Solution

See Figure 2.2.

Figure 2.2. The graph of a linear function is a straight line.

Functions and Graphs:

Figure 2.3. “Are we to paint what's on the face, what's inside the face, or what's behind it?”– Pablo Picasso.

Linear Functions and Lines: Let \(m\) and \(b\) be given real numbers. Then

\begin{equation*} \begin{array}{c||c} \text{Linear function:} \ \ \amp \ \ \text{Equation of the line:}\\ f(x)=mx+b \amp y=mx+b\\ \hline \end{array} \end{equation*}

Remember! The graph of \(f=\{ (x,y):y=mx+b\}\text{.}\)

Big Question: If \(y=mx+b\) is the equation of a line, what is the meaning of the coefficients \(m\) and \(b\text{?}\) See Figure 2.4.

Figure 2.4. What is the meaning of the coefficients \(m\) and \(b\text{?}\)

Two Old Friends: Let \(y=mx+b\) be the equation of a line.

  • The number \(m\) is called the slope of the line.

    We observe that for any two points \((x_1,y_1)\) and \((x_2,y_2)\text{,}\) \(x_1\not=x_2\text{,}\) on the line we have that

    \begin{equation*} m=\frac{y_2-y_1}{x_2-x_1}=\frac{\text{Rise}}{\text{Run}} \end{equation*}
  • The number \(b\) is called the \(y\)–intercept.

Important: To find the equation of a line you need to know at least two facts about that line:

  1. If the slope \(m\) and the \(y\)–intercept \(b\) are given then the equation of the line is:

    \begin{equation*} y=mx+b. \end{equation*}
  2. If the slope \(m\) and one point \((x_1,y_1)\) on the line are given then the equation of the line is:

    \begin{equation*} y-y_1=m(x-x_1). \end{equation*}
  3. If two points \((x_1,y_1)\) and \((x_2,y_2)\) on the line are given then the equation of the line is:

    \begin{equation*} y-y_1=\frac{y_2-y_1}{x_2-x_1}\cdot(x-x_1). \end{equation*}
Example 2.1.4. Four lines.

Find the equation of the line such that:

  1. Its slope is \(m=-1.5\) and its \(y\)–intercept is \(b=-1\text{.}\)

  2. Its slope is \(\displaystyle m=\frac{1}{3}\) and it passes through the point \((-1,2)\text{.}\)

  3. It passes through points \(\displaystyle \left(-\frac{1}{2},-\frac{1}{2}\right)\) and \(\displaystyle \left(\frac{1}{3},\frac{2}{3}\right)\text{.}\)

  4. It has no slope and passes through the point \(\displaystyle \left(-\frac{1}{2},-\frac{1}{2}\right)\text{.}\)

Solution
  1. An equation of the line with the slope \(m=-1.5\) and the \(y\)–intercept \(b=-1\) is

    \begin{equation*} y=-1.5x-1. \end{equation*}
  2. To find an equation of the line with the slope \(\displaystyle m=\frac{1}{3}\) and that that passes through the point \((-1,2)\) we use the equation \(y-y_1=m(x-x_1).\)

    In our case \(\displaystyle m=\frac{1}{3}\) and \((x_1,y_1)=(-1,2)\text{.}\) Thus the equation of the line is

    \begin{equation*} y-2=\frac{1}{3}\cdot(x+1). \end{equation*}

    Note:The above “slope-point form” of the equation is good enough to answer the given problem. You may wish to rewrite it in the so-called “slope-intercept form:”

    \begin{equation*} y=\frac{1}{3}\cdot x+\frac{7}{3} \end{equation*}

    or in the so-called “general form:”

    \begin{equation*} x-3y+7=0. \end{equation*}
  3. To find an equation of the line through points \(\displaystyle \left(-\frac{1}{2},-\frac{1}{2}\right)\) and \(\displaystyle \left(\frac{1}{3},\frac{2}{3}\right)\) we use the equation \(\displaystyle y-y_1=\frac{y_2-y_1}{x_2-x_1}\cdot(x-x_1).\)

    In our case \(\displaystyle (x_1,y_1)=\left(-\frac{1}{2},-\frac{1}{2}\right)\) and \((x_2,y_2)= \displaystyle \left(\frac{1}{3},\frac{2}{3}\right)\text{.}\) Thus the equation of the line is

    \begin{equation*} y+\frac{1}{2}=\frac{\frac{2}{3}+\frac{1}{2}}{\frac{1}{3}+\frac{1}{2}}\cdot \left(x+\frac{1}{2}\right) \end{equation*}

    what is the same as

    \begin{equation*} y+\frac{1}{2}=\frac{7}{5}\cdot \left(x+\frac{1}{2}\right). \end{equation*}

    Note: The above form of the equation is good enough to answer the given problem. You may wish to rewrite it as

    \begin{equation*} y=\frac{7}{5}\cdot x+\frac{1}{5} \end{equation*}

    or as

    \begin{equation*} 7x-5y+1=0. \end{equation*}
  4. The fact that the line has no slope means that we have a case of a vertical line.

    Since the line passes through the point with the \(x\)-coordinate that equals \(\displaystyle -\frac{1}{2}\) it follows that the equation of the line is \(\displaystyle x=-\frac{1}{2}\text{.}\)

Example 2.1.5. Linear mathematical model.

In 1930, the record for the 1500–m run for men was \(3:49.2\) min (\(= 3.82\) min.) In 1950, it was \(3:43\) min (\(= 3.72\) min.) Let \(R\) represent the record in the 1500–m run for men in minutes and let \(t\) be the number of years since 1930.

  1. Find a linear function \(R(t)\) that fits the data.

  2. Use the function from part 1. to predict the record in 2021.

  3. When will the record be 3 min?

Solution
  1. Let \(R\) represent the record in the 1500–m run for men in minutes and let \(t\) be the number of years since 1930. This means that \(t=0\) corresponds to the year 1930 and \(t=20\) corresponds to the year 1950. This implies that \(R(0)=3.82\) and \(R(20)=3.72\text{.}\)

    To find a linear function \(R(t)\) that fits the data means that we need to find the equation of the line that passes through points \((0,3.82)\) and \((20,3.72)\text{.}\)

    It follows that

    \begin{equation*} R(t)-3.82=\frac{3.72-3.82}{20-0}\cdot (t-0)\Leftrightarrow R(t)-3.82=\frac{-0.1}{20}\cdot t, \end{equation*}

    what is the same as

    \begin{equation*} R(t)=-\frac{1}{200}\cdot t +3.82. \end{equation*}

    We read the phrase “\(t\) [is] the number of years since 1930” as a condition that establishes the domain of the function \(R\) as the set of all non-negative real numbers.

    See Figure 2.5.

    Figure 2.5. \(R(t)=-\frac{1}{200}\cdot t+3.82\) – a linear function \(R(t)\) that fits the data.
  2. We note that \(t=91\) corresponds to the year 2021. Hence, the given linear model gives the following prediction:

    \begin{equation*} R(91)=-\frac{91}{200}+3.82=-0.455+3.82=3.365. \end{equation*}

    Observe that \(3.365\) minutes is about \(3:22\) minutes. Wikipedia lists \(3:26.00\) as the current world record in the 1500 meters run for men. The record holder is Hicham El Guerrouj, a Moroccan middle-distance runner. In 1998 in Rome, he broke Noureddine Morceli's, an Algerian athlete, 1500 m world record of \(3:27.37\) established in 1995.

  3. To predict the year when the record be 3 minutes we solve the equation

    \begin{equation*} 3=-\frac{1}{200}\cdot t+3.82 \Leftrightarrow 600=-t+764\Leftrightarrow t=764-600=164. \end{equation*}

    Observe that \(t=164\) corresponds to year 2094. The common sense (and the fact that the current record was established in 1998) is telling us that humans would never be able to run 1500 meters run in 3 minutes.

    You will learn in calculus that linear models are very useful for certain situations but on a relatively small intervals.

Parallel Lines: Two non–vertical lines with slopes \(m_1\) and \(m_2\) are parallel if and only if

\begin{equation*} m_1=m_2. \end{equation*}
Example 2.1.6. Parallel lines.
  1. Are the lines \(2x-4y=\) and \(2x+4y=-3\) parallel?

  2. Is the line that contains the points \((1,-3)\) and \((-2,4)\) parallel to the line that contains the points \((-9,1)\) and \((-2,-2)\text{?}\)

  3. Find the equation of the line that contains the point \((3,2)\) and is parallel to the line \(3x+y=-3\text{.}\)

  4. Is the line \(x=4\) parallel to the line \(x=-4\text{?}\)

Solution
  1. From

    \begin{equation*} 2x-4y=3\Leftrightarrow -4y=-2x+3 \Leftrightarrow y=\frac{-2}{-4}x+\frac{3}{-4} \Leftrightarrow y=\frac{1}{2}x-\frac{3}{4} \end{equation*}

    we conclude that the slope of the line \(2x-4y=3\) is the number \(m_1=\frac{1}{2}\text{.}\)

    From

    \begin{equation*} 2x+4y=-3\Leftrightarrow 4y=-2x-3 \Leftrightarrow y=\frac{-2}{4}x-\frac{3}{-4} \Leftrightarrow y=-\frac{1}{2}x+\frac{3}{4} \end{equation*}

    we conclude that the slope of the line \(2x+4y=3\) is the number \(m_2=-\frac{1}{2}\text{.}\)

    From

    \begin{equation*} \frac{1}{2}=m_1\not= m_2=-\frac{1}{2} \end{equation*}

    it follows that these two lines are not parallel.

    See Figure 2.6.

    Figure 2.6. Lines \(2x-4y=3\) and \(2x+4y=-3\) are not parallel to each other.
  2. The slope of the line that contains the points \((1,-3)\) and \((-2,4)\) is the number

    \begin{equation*} m_1=\frac{-3-4}{1-(-2)}=\frac{-7}{3}=-\frac{7}{3} \end{equation*}

    The slope of the line that contains the points \((-9,1)\) and \((-2,-2)\) is the number

    \begin{equation*} m_2=\frac{-2-1}{-2-(-9)}=\frac{-3}{7}=-\frac{3}{7}. \end{equation*}

    We notice that

    \begin{equation*} m_1\not=m_2 \end{equation*}

    and conclude that these two lines are not parallel to each other.

    See Figure 2.7.

    Figure 2.7. The line that contains the points \((1,-3)\) and \((-2,4)\) is not parallel to the line that contains the points \((-9,1)\) and \((-2,-2)\text{.}\)
  3. We write the equation of the line \(3x+y=-3\) in the form \(y=-3x-3\) and note that its slope is the number \(m=-3\text{.}\)

    Hence any line parallel to this line is with the same slope \(m=-3\text{.}\) Therefore the equation of the line that contains the point \((3,2)\) and is parallel to the line \(3x+y=-3\) is given by

    \begin{equation*} y-2=-3\cdot(x-3). \end{equation*}

    We can rewrite this equation as

    \begin{equation*} y=-3x+11. \end{equation*}

    See Figure 2.8.

    Figure 2.8. The line \(y=-3x+11\) contains the point \((3,2)\) and is parallel to the line \(3x+y=-3\text{.}\)
  4. The lines \(x=4\) and \(x=-4\) are two vertical lines, hence they are parallel to each other. We note that a vertical line has no slope.

    See Figure 2.9.

    Figure 2.9. The line \(x=4\) is parallel to the line \(x=-4\text{.}\)

Perpendicular Lines. Two non vertical lines with slopes \(m_1\) and \(m_2\) are perpendicular to each other if and only if

\begin{equation*} m_1\cdot m_2=-1. \end{equation*}
Example 2.1.7. Perpendicular lines.
  1. Are the lines \(4x-3y=2\) and \(4x+3y=-7\) perpendicular to each other?

  2. Is the line that contains the points \((-3,2)\) and \((4,-1)\) perpendicular to the line that contains the points \((1,3)\) and \((-2,-4)\text{?}\)

  3. Find the equation of the line that contains the point \((2,-5)\) and is perpendicular to the line \(y=\frac{5}{2}x-4\text{.}\)

  4. Is the line \(y=5\) perpendicular to the line \(x=5\text{?}\)

Solution
  1. From

    \begin{equation*} 4x-3y=2\Leftrightarrow -3y=-4x+2 \Leftrightarrow y=\frac{-4}{-3}x+\frac{2}{-3} \Leftrightarrow y=\frac{4}{3}x-\frac{2}{3} \end{equation*}

    we conclude that the slope of the line \(4x-3y=2\) is the number \(m_1=\frac{4}{3}\text{.}\)

    From

    \begin{equation*} 4x+3y=-7\Leftrightarrow 3y=-4x-7 \Leftrightarrow y=\frac{-4}{3}x+\frac{-7}{3} \Leftrightarrow y=-\frac{4}{3}x-\frac{7}{3} \end{equation*}

    we conclude that the slope of the line \(4x+3y=-7\) is the number \(m_2=-\frac{4}{3}\text{.}\)

    From

    \begin{equation*} m_1\cdot m_2=\frac{4}{3}\cdot \left( -\frac{4}{3}\right)=-\frac{16}{9}\not= -1 \end{equation*}

    it follows that these two lines are not perpendicular to each other.

    See Figure 2.10.

    Figure 2.10. Lines \(4x-3y=2\) and \(4x+3y=-7\) are not perpendicular to each other.
  2. The slope of the line that contains the points \((-3,2)\) and \((4,-1)\) is the number

    \begin{equation*} m_1=\frac{-1-2}{4-(-3)}=-\frac{3}{7}. \end{equation*}

    The slope of the line that contains the points \((1,3)\) and \((-2,-4)\) is the number

    \begin{equation*} m_2=\frac{-4-3}{-2-1}=\frac{-7}{-3}=\frac{7}{3}. \end{equation*}

    From

    \begin{equation*} m_1\cdot m_2=-\frac{3}{7}\cdot \frac{7}{3}=-1 \end{equation*}

    we conclude that these two lines are perpendicular to each other.

    See Figure 2.11.

    Figure 2.11. The line that contains the points \((-3,2)\) and \((4,-1)\) is perpendicular to the line that contains the points \((1,3)\) and \((-2,-4)\text{.}\)
  3. We note that the slope of the line \(y=\frac{5}{2}x-4\) is the number \(m_1=\frac{5}{2}\text{.}\) Hence any line perpendicular to this line is with the slope \(m_2=-\frac{2}{5}\text{.}\)

    Therefore the equation of the line that contains the point \((2,-5)\) and is perpendicular to the line \(y=\frac{5}{2}x-4\) is given by

    \begin{equation*} y-(-5)=-\frac{2}{5}\cdot(x-2) \Leftrightarrow y+5=-\frac{2}{5}\cdot(x-2). \end{equation*}

    We can rewrite this equation as

    \begin{equation*} 2x+5y+21=0. \end{equation*}

    See Figure 2.12.

    Figure 2.12. The line \(y+5=-\frac{2}{5}\cdot(x-2)\) contains the point \((2,-5)\) and is perpendicular to the line \(y=\frac{5}{2}x-4\text{.}\)
  4. The line \(y=5\) is a horizontal line and the line \(x=5\) is a vertical line, hence they are perpendicular to each other. We note that the slope of any horizontal line equals 0, and that a vertical line has no slope, so finding the product of slopes is not possible.

    See Figure 2.13.

    Figure 2.13. The line \(y=5\) is perpendicular to the line \(x=5\text{.}\)