Skip to main content
Mathematics LibreTexts

2.2: Linear Functions .

  • Page ID
    139263
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Definition: Linear Function

    A linear function is a function whose graph produces a line.

    Linear functions can always be written in the form:

    \(f(x)=b+m x \quad\) or \(\quad f(x)=m x+b \quad\) These are equivalent where \(b\) is the initial or starting value of the function (when input, \(\mathrm{x}=0\) ), and \(m\) is the constant rate of change of the function.

    Many people like to write linear functions in the form \(f(x)=b+m x\) because it corresponds to the way we tend to speak: "The output starts at \(\mathrm{b}\) and increases at a rate of m."

    For this reason alone we will use the form \(f(x)=b+m x\) for many of the examples, but remember they are equivalent and can be written correctly both ways.

    Here, \(m\) is the constant rate of change of the function (also called the slope). The slope determines if the function is an increasing function or a decreasing function.

    If \(m>0\) then the function is increasing
    If \(m<0\) then the function is decreasing
    If \(m=0\), the rate of change is zero, and the function is a horizontal line

    NOTE: A vertical line has a slope that is undefined. A vertical line is NOT a function.

    Example \(\PageIndex{1}\)

    Marcus currently owns 200 songs in his iTunes collection. Every month, he adds 15 new songs. Write a formula for the number of songs, \(N\), in his iTunes collection as a function of the number of months, \(m\). How many songs will he own in a year?

    Solution

    The initial value for this function is 200 , since he currently owns 200 songs, so \(N(0)=200\). The number of songs increases by 15 songs per month, so the rate of change is 15 songs per month. With this information, we can write the formula:
    \[
    N(m)=200+15 m \text {. }
    \]
    \(N(m)\) is an increasing linear function.
    With this formula we can predict how many songs he will have in 1 year (12 months): \(N(12)=200+15(12)=200+180=380\). Marcus will have 380 songs in 12 months.Add example text here.

    You Try It \(\PageIndex{1}\)

    You have just bought a new Sony 55” 3D television set for $2300. The TV’s value decreases at a rate of $250 per year. Construct a linear function to represent this situation. Clearly indicate what your variables represent.

    Answer

    V(n) = 2300 – 250n, where V(n) gives the value (in dollars) of the TV after n years.

    Calculating Rate of Change

    Given two values for the input \(x_1\) and \(x_2\), and two corresponding values for the output, \(y_1\) and \(y_2\), or a set of points, \(\left(x_1, y_1\right)\) and \(\left(x_2, y_2\right)\), if we wish to find a linear function that contains both points we can calculate the rate of change, \(m\) :

    \[
    m=\frac{\text { change in output }}{\text { change in input }}=\frac{\Delta y}{\Delta x}=\frac{y_2-y_1}{x_2-x_1}
    \]

    Rate of change of a linear function is also called the slope of the line.

    Example \(\PageIndex{2}\)

    The population of a city increased from 23,400 to 27,800 between 2002 and 2006. Find the rate of change of the population during this time span.

    Solution

    The rate of change will relate the change in population to the change in time. The population increased by \(27800-23400=4400\) people over the 4 year time interval. To find the rate of change, the number of people per year the population changed by:
    \[
    \frac{4400 \text { people }}{4 \text { years }}=\frac{1100}{1} \frac{\text { people }}{\text { year }}=1100 \text { people per year }
    \]
    (Note: You should recognize the slope as a unit rate from chapter 2!)
    Notice that we knew the population was increasing, so we would expect our value for \(m\) to be positive. This is a quick way to check to see if your value is reasonable.

    You Try It \(\PageIndex{2}\)

    In the year 1998, the surface elevation of Lake Powell was 3,843 feet above sea level. In the year 2001, the surface elevation of Lake Powell was 3,609 feet above sea level.

    Determine the rate of change in this situation.

    Answer

    The surface elevation of Lake Powell is decreasing at a rate of 78 feet per year.

    We can now find the rate of change given two input-output pairs, and can write an equation for a linear function once we have the rate of change and initial value. If we have two input-output pairs and they do not include the initial value of the function, then we will have to solve for it.

    Example \(\PageIndex{3}\)

    Working as an insurance salesperson, David earns a base salary and a commission on each new policy, so David's weekly income, \(I\), depends on the number of new policies, \(n\), he sells during the week. Last week he sold 3 new policies, and earned \(\$ 760\) for the week. The week before, he sold 5 new policies, and earned \(\$ 920\). Find an equation for \(I(n)\), and interpret the meaning of the components of the equation.

    Solution

    The given information gives us two input-output pairs: \((3,760)\) and \((5,920)\). We start by finding the rate of change.

    \[
    \left.m=\frac{920-760}{5-3}=\frac{160}{2}=\frac{80}{1} \text { (or just } 80\right)
    \]

    Keeping track of units can help us interpret this quantity. Income increased by \(\$ 160\) when the number of policies increased by 2 , so the rate of change is \(\frac{\$ 80}{1 \text { policy }}\). David earns a commission of \(\$ 80\) for each policy sold during the week.

    We can then solve for the initial value

    \[\begin{array}{ll}
    I(n)=b+80 n & \text { then when } n=3, I(3)=760, \text { giving } \\
    760=b+80(3) & \text { this allows us to solve for } b \\
    b=760-80(3)=520 &
    \end{array}
    \]

    This value is the starting value for the function. This is David's income when \(n=0\), which means no new policies are sold. We can interpret this as David's base salary for the week, which does not depend upon the number of policies sold.

    Writing the final equation: \(I(n)=520+80 n\)

    Our final interpretation is: David's base salary is \(\$ 520\) per week and he earns an additional \(\$ 80\) commission for each policy sold during the week.

    You Try It \(\PageIndex{3}\)

    The balance in your college payment account, C, is a function of the number of quarters, q, you attend. Interpret the function C(q) = 20000 – 4000q in words.

    Answer

    Your College account starts with $20,000 in it and you withdraw $4,000 each quarter (or your account contains $20,000 and decreases by $4000 each quarter.) You can pay for 5 quarters before the money in this account is gone.

    When working with applied problems involving functions, use the following strategy.

    Note Problem Solving Strategy

    1) Identify changing quantities, and then carefully and clearly define descriptive
    variables to represent those quantities. When appropriate, sketch a picture or
    define a coordinate system.
    2) Carefully read the problem to identify important information. Look for information
    giving values for the variables, or values for parts of the functional model, like
    slope and initial value. Also identify what you are trying to find, identify, solve, or
    interpret.
    3) Identify a solution pathway from the provided information to what we are trying to
    find. Often this will involve checking and tracking units, building a table or even
    finding a formula for the function being used to model the problem.
    4) Solve or evaluate using the formula you found for the desired quantities.
    5) Reflect on whether your answer is reasonable for the given situation and whether it
    makes sense mathematically.
    6) Clearly convey your result using appropriate units, and answer in full sentences
    when appropriate.

    Example \(\PageIndex{4}\)

    Arielle saved up $3500 for her summer visit to Seattle. She anticipates spending $400 each week on rent, food, and fun. How long can she afford to stay in Seattle?

    Solution

    In the problem, there are two changing quantities: time and money. The amount of money she has remaining while on vacation depends on how long she stays. We can define our variables, including units.

    Output: \(M\), money remaining, in dollars Input: \(t\), time, in weeks

    Reading the problem, we identify two important values. The first, \(\$ 3500\), is the initial value for \(M\). The other value appears to be a rate of change - the units of dollars per week match the units of our output variable divided by our input variable. She is spending money each week, so you should recognize that the amount of money remaining is decreasing each week and the slope is negative.

    To answer the question, it would be helpful to have an equation modeling this scenario. Using the intercept and slope provided in the problem, we can write the equation: \(M(t)=3500-400 t\), where \(M\) is the amount of money remaining after \(t\) weeks.

    To find out how long she can stay, we need to find out how long it will take for her to use up all of the money she has saved. So we are looking for the number of weeks, \(t\), when \(M=0\). Set the output to zero, and solve for the input:
    \[
    \begin{array}{l}
    0=3500-400 t \\
    t=\frac{3500}{400}=8.75
    \end{array}
    \]

    Interpreting this, we could say: Arielle will have no money left after 8.75 weeks.

    When modeling any real life scenario with functions, there is typically a limited domain over which that model will be valid - almost no trend continues indefinitely. In this case, it certainly doesn't make sense to talk about input values less than zero. It is also likely that this model is not valid after the horizontal intercept (unless Arielle is going to start using a credit card and go into debt).

    The domain represents the set of input values and so the reasonable domain for this function is \(0 \leq t \leq 8.75\).

    However, in a real world scenario, the rental might be weekly or nightly. She may not be able to stay a partial week and so all options should be considered. Arielle could stay in Seattle for 0 to 8 full weeks (and a couple of days), but would have to go into debt to stay 9 full weeks, so restricted to whole weeks, a reasonable domain without going in to debt would be \(0 \leq t \leq 8\), or \(0 \leq t \leq 9\) if she went into debt to finish out the last week.

    The range represents the set of output values and she starts with \(\$ 3500\) and ends with \(\$ 0\) after 8.75 weeks so the corresponding range is \(0 \leq M(t) \leq 3500\).

    If we limit the rental to whole weeks however, if she left after 8 weeks because she didn't have enough to stay for a full 9 weeks, she would have \(M(8)=3500-400(8)=\) \(\$ 300\) dollars left after 8 weeks, giving a range of \(300 \leq M(t) \leq 3500\). If she wanted to stay the full 9 weeks she would be \(\$ 100\) in debt giving a range of \(-100 \leq M(t) \leq 3500\).

    Most importantly remember that domain and range are tied together, and whatever you decide is most appropriate for the domain (the independent variable) will dictate the requirements for the range (the dependent variable).

    Example \(\PageIndex{5}\)

    Jamaal is choosing between two moving companies. The first, U-Haul, charges an upfront fee of $20, then 59 cents per mile. The second, Budget, charges an up-front fee of $16, then 63 cents per mile3. When will U-Haul be the better choice for Jamal?

    Solution

    The two important quantities in this problem are the cost, and the number of miles that are driven. Since we have two companies to consider, we will define two functions:

    Input: \(m\), miles driven
    Outputs: \(Y(m)\) : cost, in dollars, for renting from U-Haul
    \(B(m)\) : cost, in dollars, for renting from Budget

    Reading the problem carefully, it appears that we were given an initial cost and a rate of change for each company. Since our outputs are measured in dollars but the costs per mile given in the problem are in cents, we will need to convert these quantities to match our desired units: \(\$ 0.59\) a mile for U-Haul, and \(\$ 0.63\) a mile for Budget. Looking to what we're trying to find, we want to know when U-Haul will be the better choice. Since all we have to make that decision from is the costs, we are looking for when U-Haul will cost less, or when \(\mathrm{Y}(m)<\mathrm{B}(m)\).

    Using the rates of change and initial charges, we can write the equations:

    \[
    \mathrm{Y}(m)=20+0.59 m \quad \mathrm{~B}(m)=16+0.63 m
    \]

    These graphs are sketched below, with \(Y(m)\) drawn dashed.

    clipboard_e92d78f5e06383127a8237367e93add97.png

    To find the intersection, we set the equations equal and solve: \(\mathrm{Y}(m)=\mathrm{B}(m)\).

    \[
    \begin{array}{c}
    20+0.59 m=16+0.63 m \\
    -0.04 m=-4 \\
    m=100
    \end{array}
    \]

    This tells us that the cost from the two companies will be the same if 100 miles are driven. Either by looking at the graph, or noting that \(Y(m)\) is growing at a slower rate, we can conclude that U-Haul will be the cheaper price when more than 100 miles are driven.

    Example \(\PageIndex{6}\)

    A town’s population has been growing linearly. In 2004 the population was 6,200. By 2009 the population had grown to 8,100. If this trend continues,

    a. Predict the population in 2013
    b. When will the population reach 15000?

    Solution

    The two changing quantities are the population and time.

    Input: \(t\), years since 2004 Output: \(P(t)\), the town's population

    The problem gives us two input-output pairs. Converting them to match our defined variables, the year 2004 would correspond to \(t=0\), giving the point \((0,6200)\). Notice that through our clever choice of variable definition, we have "given" ourselves the vertical intercept of the function. The year 2009 would correspond to \(t=5\), giving the point \((5,8100)\).

    To predict the population in \(2013(t=9)\), we would need an equation for the population. Likewise, to find when the population would reach 15000 , we would need to solve for the input that would provide an output of 15000. Either way, we need an equation. To find it, we start by calculating the rate of change:

    \[
    m=\frac{8100-6200}{5-0}=\frac{1900}{5}=\frac{380 \text { people }}{1 \text { year }}=380 \text { people per year }
    \]

    Since we already know the vertical intercept of the line, we can immediately write the equation: \(P(t)=6200+380 t\)

    To predict the population in 2013, we evaluate our function at \(t=9\) \(P(9)=6200+380(9)=9620\)

    If the trend continues, our model predicts a population of 9,620 in 2013.

    To find when the population will reach 15,000 , we can set \(P(t)=15000\) and solve for \(t\).

    \[
    \begin{array}{l}
    15000=6200+380 t \\
    8800=380 t \\
    t \approx 23.158
    \end{array}
    \]

    Our model predicts the population will reach 15,000 in a little more than 23 years after 2004 , or somewhere around the year 2027.

    You Try It \(\PageIndex{4\)

    In 2004, a school population was 1001. By 2008 the population had grown to 1697. Assume the population is changing linearly.

    a. How much did the population grow between the year 2004 and 2008?
    b. How long did it take the population to grow from 1001 students to 1697
    students?
    c. What is the average population growth per year?
    d. Find an equation for the population, P, of the school t years after 2004.
    e. Using your equation, predict the population of the school in 2011.

    Answer

    a. 696 students

    b. 4 years

    c. 174 students per year

    d. P(t) = 174t + 1001 e. 2219 students


    2.2: Linear Functions . is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?