{{ 'ml-label-loading-course' | message }}

{{ tocSubheader }}

{{ 'ml-toc-proceed-mlc' | message }}

{{ 'ml-toc-proceed-tbs' | message }}

An error ocurred, try again later!

Chapter {{ article.chapter.number }}

{{ article.number }}. # {{ article.displayTitle }}

{{ article.intro.summary }}

Show less Show more Lesson Settings & Tools

| {{ 'ml-lesson-number-slides' | message : article.intro.bblockCount }} |

| {{ 'ml-lesson-number-exercises' | message : article.intro.exerciseCount }} |

| {{ 'ml-lesson-time-estimation' | message }} |

This lesson explores *linear functions* by reviewing concepts such as slope and functions. Following that will be a discussion about the classification of variables. Additionally, real-world problems will be solved to provide a comprehensive understanding of such functions.
### Catch-Up and Review

**Here are a few recommended readings before getting started with this lesson.**

Challenge

Vincenzo and Magdalena are two friends eager to explore the world of gaming and programming. They are developing their own mobile game by coding and testing together. As part of their development process, they are monitoring the temperature of their computers. The diagram shows how the temperature of each changes over time.

a Find and interpret the slopes and the $y-$intercepts of the lines.

b For each graph, write a linear function that relates $y$ to $x.$

Discussion

A linear function is a function with a constant rate of change. A linear function can be represented by a linear equation in two variables. Graphically, a linear function is a nonvertical line.

Using that line, the rate of change can be determined by finding the horizontal change $Δx$ and the vertical change $Δy$ between any two points on the line. Any function whose graph is not a straight line cannot be linear.Discussion

A nonlinear function is a function that does not have a constant rate of change. In other words, a nonlinear function is a function whose graph is not a straight line. Instead, the graph may take the form of any curve other than a straight line.

The functions above are all examples of nonlinear functions since their rate of change vary.

Example

Vincenzo and Magdalena have planned for two characters in their upcoming mobile game. When the game begins, these characters will be positioned at random points within the game environment. Let the points where these characters are located be $M(x,y)$ and $N(z,w)$
### Hint

### Solution

Is every line that passes through points $M$ and $N$ necessarily a linear function?

{"type":"choice","form":{"alts":["Yes","No"],"noSort":false},"formTextBefore":"","formTextAfter":"","answer":1}

What is the condition for being a function? What happens if the $x-$coordinates of $M$ and $N$ are the same.

Recall that a function is a relation in which each input is assigned to *exactly* one output. Now, consider the case where $M$ and $N$ have the same $x-$coordinate, for example $3.$
**not** a function. *always* a function through those points.

$PointMN Coordinates(3,y)(3,w) $

In such a case, when the input is set to $3,$ there will be two separate outputs, namely $y$ and $w.$ This contradicts the definition of a function. Therefore, a line that passes through points with the same $x-$coordinate is
However, if the points have different $x-$coordinates, there is

Pop Quiz

Analyze the given graph and determine whether it represents a function. If it is a function then determine if it is a linear function or a nonlinear function.

Discussion

Numerical data, also called quantitative data, is measurable data expressed using numbers. Some examples of numerical data are age, height, and weight of a person. Consider the following personal information.

Person | Age | Weight | Shoe Size | Number of Siblings | Eye Color |
---|---|---|---|---|---|

Dejen | $15$ | $43.4$ | $6$ | $0$ | Blue |

Madge | $16$ | $56.7$ | $7$ | $3$ | Green |

Yulia | $20$ | $64.8$ | $7.5$ | $1$ | Brown |

A person's age, weight, shoe size, and number of siblings are examples of numerical data. In contrast, a person's eye color cannot be expressed in numbers and is an example of categorical data. Additionally, numerical data can be either discrete data that can only take specific values or continuous data that can take *any* value within an interval.

Data | Numerical? | Type |
---|---|---|

Age | Yes $✓$ | Continous |

Weight | Yes $✓$ | Continous |

Shoe Size | Yes $✓$ | Discrete |

Number of Siblings | Yes $✓$ | Discrete |

Eye Color | No $×$ | Non-applicable |

Discussion

A quantity that can take any value within a given interval is a continuous quantity. Such quantities not limited to specific, separate values, and they can be measured very precisely. Length, time, temperature, weight, and age are examples of continuous quantities.

Each point on the number line corresponds to a specific age, and the line itself represents the possible ages. A person's age can be any real number, depending on the precision of the measurement. For example, using whole years, this person was $5$ years old. However, with more precise measurements, their age could be expressed as $5.5$ years, $8$ years and $2$ months, and even $8$ years and $88$ days.

Discussion

A discrete quantity is a quantity that can only take distinct, separate values in an interval. There are no values between these distinct values. The number of students in a class, the number of tickets for a concert, and the number of goals scored in a soccer match are examples of discrete quantities. These values are countable and typically represented by integers or whole numbers.

Note that the value of the quantity can only be specific amounts such as $0,$ $1,$ or $2,$ as buying a fraction of the ticket is not an option. Although discrete quantities are often restricted to whole numbers, there are exceptions. Depending on the context, discrete quantities can take values from a set like ${-0.8,-0.4,0,0.4,0.8}.$

Example

In the process of developing their mobile game, Vincenzo and Magdalena find it necessary to analyze certain numerical data related to user interactions within the game. After some brainstorming, they identify several variables for consideration.
### Hint

### Solution

### Variable $L$

### Variable $T$

### Variable $S$

### Variable $V$

### Summary

$L:T:S:V: the number of levels in the gamethe time it takes for a player to complete a levelthe score of a playerthe speed at which the character moves $

Classify these variables as either continuous or discrete. {"type":"pair","form":{"alts":[[{"id":0,"text":"<span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.68333em;vertical-align:0em;\"><\/span><span class=\"mord mathdefault\">L<\/span><\/span><\/span><\/span>"},{"id":1,"text":"<span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.68333em;vertical-align:0em;\"><\/span><span class=\"mord mathdefault\" style=\"margin-right:0.13889em;\">T<\/span><\/span><\/span><\/span>"},{"id":2,"text":"<span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.68333em;vertical-align:0em;\"><\/span><span class=\"mord mathdefault\" style=\"margin-right:0.05764em;\">S<\/span><\/span><\/span><\/span>"},{"id":3,"text":"<span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.68333em;vertical-align:0em;\"><\/span><span class=\"mord mathdefault\" style=\"margin-right:0.22222em;\">V<\/span><\/span><\/span><\/span>"}],[{"id":0,"text":"Discrete"},{"id":1,"text":"Continuous"},{"id":2,"text":"Discrete"},{"id":3,"text":"Continuous"}]],"lockLeft":false,"lockRight":false},"formTextBefore":"","formTextAfter":"","answer":[[0,1,2,3],[0,1,2,3]]}

A continuous quantity can take any value in a certain interval. A discrete quantity can only take distinct values, so there is a gap between possible values.

To determine if a variable is continuous or discrete, check if there is a gap between possible values. Analyze each given variable separately to reach an answer.

The number of levels is typically counted in whole numbers. It cannot take a real number value, so it is discrete.

The time it takes for a player to complete a level can be any real number. Time can be measured with high precision, including fractions of seconds. Therefore, $T$ is continuous.

A player's score can typically take whole numbers. Scores are limited to whole numbers, so it is discrete.

The speed at which the character moves can be measured on a continuous scale. That is, it can take any real value, including fractions. Therefore, $V$ is continuous.

In conclusion, discrete variables take on distinct values, often whole numbers. Continuous variables, on the other hand, can take any value within a given interval.

Variable | Can it take all values in a certain interval? | Type |
---|---|---|

$L$ | No | Discrete |

$T$ | Yes | Continuous |

$S$ | No | Discrete |

$V$ | Yes | Continuous |

Discussion

A function is said to have a continuous domain when the independent variable of the function is a continuous quantity. The graph of such a function is typically a curve or a line. Consider the graph of the function, which shows the relationship between a person's age and weight.

The domain of this function consist of all real numbers from $0$ to $10,$ indicating that the function has a continuous domain.Discussion

A function is said to have a discrete domain when the independent variable of the function is a discrete quantity. A function of this type can be identified by its graph, which is composed of any number of unconnected points. Consider the function that models the costs of concert tickets, specifically for $0,$ $1,$ $2,$ $3,$ and $4$ tickets.

The domain of this function is the set of integers from $0$ to $4,$ indicating that the function has a discrete domain.Example

Vincenzo and Magdalena are continuing the development of their own mobile game. In their game, players start with $100$ virtual coins and spend $5$ coins per day on in-game activities.

a Write a function to represent the amount of coins $y$ a player has left $x$ days after starting the game.

b Make a table to find the remaining number of coins for a player after $2,$ $4,$ $6,$ $8,$ and $10$ days from starting the game.

c Graph the function. Does the function have a continuous domain or a discrete domain?

a **Function:** $y=-5x+100$

b **Table:**

Days, $x$ | Number of coins, $y$ |
---|---|

$2$ | $90$ |

$4$ | $80$ |

$6$ | $70$ |

$8$ | $60$ |

$10$ | $50$ |

c **Graph:**

The function have a discrete domain.

a The number of coins a player has can be expressed as a linear function. Use the slope-intercept form to write the function.

b Substitute the number of days into the function from Part A.

c Draw a coordinate plane where the horizontal axis represents the number of days and the vertical axis represents the remaining number of coins.

a Recall that a player starts with $100$ coins and they can spend $5$ coins each day. This refers to a decrease at a constant rate. Therefore, the number of coins a player has $(y)$ can be expressed as a linear function of the number of days the game has been played $(x).$ The slope-intercept form can be used to write that function.

$y=mx+b $

In this form, $m$ is the slope and $b$ is the $y-$intercept. In this case, the initial amount of virtual coins is $100,$ so $b=100.$ The spending rate is $5$ coins per day, so the slope is $-5$ because the coins are decreasing. Therefore, the linear function is as follows.
$y=-5x+100 $

b Make a table of values for the function written in Part A.

Days $x$ | $-5x+100$ | Number of Coins $y$ |
---|---|---|

$2$ | ||

$4$ | ||

$6$ | ||

$8$ | ||

$10$ |

How about finding the remaining number of coins for a player after $2,$ $4,$ $6,$ $8,$ and $10$ days from starting the game? Try substituting the values of days into the formula and evaluate.

Days $x$ | $-5x+100$ | Number of Coins $y$ |
---|---|---|

$2$ | $-5(2)+100$ | $90$ |

$4$ | $-5(4)+100$ | $80$ |

$6$ | $-5(6)+100$ | $70$ |

$8$ | $-5(8)+100$ | $60$ |

$10$ | $-5(10)+100$ | $50$ |

Great work so far!

c The function can be graphed using the table created in Part B.

Days $x$ | Number of Coins $y$ |
---|---|

$2$ | $90$ |

$4$ | $80$ |

$6$ | $70$ |

$8$ | $60$ |

$10$ | $50$ |

Plot the ordered pairs $(x,y)$ on a coordinate plane where the $x-$axis represents the number of days and the $y-$axis represents the remaining number of coins.

Since the function has a discrete domain, the points are not connected with a straight line. There are missing points in this graph. When other points are included, the graph of the function will be as follows.

Example

As part of their development process, Vincenzo and Magdalena monitor the battery power consumption of a test laptop.

The table shows the percentage, $y$ in decimal form, of battery power remaining $x$ hours after the laptop is turned on.

Hours, $x$ | $0$ | $2$ | $3$ |
---|---|---|---|

Power Remaining, $y$ | $1.0$ | $0.4$ | $0.1$ |

a Write and graph a linear function in point-slope form that relates the percentage of power remaining $y$ to the number of hours $x.$

b Interpret the slope, $x-$intercept, and $y-$intercept in this context.

c After how many hours is the battery power at $25%?$

a **Function:** $y−0.1=-0.3(x−3)$

**Graph:**

b See solution.

c $2.5$ hours

a First, use the given points to calculate the slope. Then, identify the $y-$intercept.

b Recall the meaning of $x$ and $y$ in the context of the problem.

c Use the function obtained in Part A.

a Take a look at the given table. It is asked to write a linear function that relates $y$ to $x$ in point-slope form.

Hours, $x$ | $0$ | $2$ | $3$ |
---|---|---|---|

Power Remaining, $y$ | $1.0$ | $0.4$ | $0.1$ |

$y−y_{1}=m(x−x_{1}) $

In this form, $m$ is the slope and $(x_{1},y_{1})$ is a point on the line. Start by identifying the slope using two points from the given table. Substitute, for example, the points $(0,1)$ and $(2,0.4)$ into the slope formula and calculate $m.$
The slope of the line is $-0.3.$ Considering the given table, the function passes through the point $(3,0.1).$ Now that the slope and a point is known, the function can be written.
$y−0.1=-0.3(x−3) $

Finally, plot the given points on a coordinate plane and draw a line that passes through them. The graph of the function is a solid line because the function has a continuous domain.
b Using the graph drawn in Part A, the slope and intercepts of the line can be determined. The line intersects the $y-$axis at $(0,1),$ while it intersects the $x-$axis at $(331 ,0)$ because each unit on the $x-$axis is $31 $ in length. To confirm it, substitute $0$ for $y$ in the equation of the line and solve the equation for $x.$

$y−0.1=-0.3(x−3)$

Substitute

$y=0$

$0−0.1=-0.3(x−3)$

▼

Solve for $x$

SubTerm

Subtract term

$-0.1=-0.3(x−3)$

DivEqn

$LHS/(-0.3)=RHS/(-0.3)$

$-0.3-0.1 =x−3$

ExpandFrac

$ba =b⋅(-10)a⋅(-10) $

$31 =x−3$

AddFrac

Add fractions

$3+31 =x$

Rewrite

Rewrite $3+31 $ as $331 $

$331 =x$

RearrangeEqn

Rearrange equation

$x=331 $

$0.3=10030 =30% $

Therefore, the slope indicates that the power decreases by $30%$ per hour. Note that the $y-$intercept is $(0,1).$
$1=100% $

The $y-$intercept indicates that the battery power is at $100%$ when the laptop is turned on. The $x-$intercept is $(331 ,0).$ It indicates that the battery lasts $331 $ hours, which can also be rewritten as follows. $331 h$

▼

Rewrite

Rewrite

Rewrite $331 h$ as $3h+31 h$

$3h+31 h$

HourToMin

$1h=60min$

$3h+31 ⋅60min$

MoveRightFacToNumOne

$b1 ⋅a=ba $

$3h+360min $

CalcQuot

Calculate quotient

$3h+20min$

Rewrite

Rewrite $3h+20min$ as $3h and20min$

$3h and20min$

c The function rule can be used to find the number of hours it will take to get $25$ percent of battery power.

$y−0.1=-0.3(x−3) $

Since the $y-$variable represents the power remaining in decimal form, $25%$ must be written as a decimal first.
$25%=0.25 $

Now substitute $y=0.25$ into the function and solve it for $x.$
$y−0.1=-0.3(x−3)$

Substitute

$y=0.25$

$0.25−0.1=-0.3(x−3)$

▼

Solve for $x$

SubTerm

Subtract term

$0.15=-0.3(x−3)$

DivEqn

$LHS/(-0.3)=RHS/(-0.3)$

$-0.30.15 =x−3$

CalcQuot

Calculate quotient

$-0.5=x−3$

AddEqn

$LHS+3=RHS+3$

$2.5=x$

RearrangeEqn

Rearrange equation

$x=2.5$

Closure

Finally, the challenge presented at the beginning of the lesson will be solved. In the challenge, Vincenzo and Magdalena are monitoring the temperatures of their computers which tend to increase while running applications.

It is helpful to answer the questions by recalling the concepts and rules presented throughout the lesson.

a Find and interpret the $y-$intercept and the slope of each line.

b For each graph, write a linear function that relates $y$ to $x.$

a **Table:**

Vincenzo's Computer | Magdalena's Computer | |
---|---|---|

$y-$intercept | $32$ | $24$ |

The initial temperature of the computer is $32_{∘}C.$ | The initial temperature of the computer is $24_{∘}C.$ | |

Slope | $6$ | $8$ |

Its temperature increases by $6_{∘}C$ per hour. | Its temperature increases by $8_{∘}C$ per hour. |

b **Vincenzo's Computer:** $y=6x+32$

**Magdalena's Computer:** $y=8x+24$

a Identify the point where each line intersect the $y-$axis. For each line, identify two points on the line and substitute them into the Slope Formula to find its slope.

b Use the slope-intercept form to write the functions.

a The $y-$intercept of a line is the $y-$value where the line crosses the $y-$axis.

The $y-$intercept of the blue line is $32$ and the $y-$intercept of the red line is $24.$ Note that the $y-$axis represents the temperature in Celsius degrees. Since the time is zero at those points, the $y-$intercepts represent the initial temperatures of the computers.

Vincenzo's Computer | Magdalena's Computer | |
---|---|---|

$y-$intercept | $32$ | $24$ |

The initial temperature of the computer is $32_{∘}C.$ | The initial temperature of the computer is $24_{∘}C.$ |

$m=x_{2}−x_{1}y_{2}−y_{1} $

It is necessary to determine one more point on each line in order to use the formula.
The blue line passes through the points $(0,32)$ and $(4,56),$ while the red line passes through the points $(0,24)$ and $(1,32).$ Substitute these points into the Slope Formula.

Blue Line | Red Line | |
---|---|---|

Points | $(0,32)$ and $(4,56)$ | $(0,24)$ and $(1,32)$ |

$m=x_{2}−x_{1}y_{2}−y_{1} $ | $4−056−32 $ | $1−032−24 $ |

Evaluate | $424 =6$ | $18 =8$ |

In this context, the slope of the functions indicate how quickly the temperature of a computer rises within an hour.

Vincenzo's Computer | Magdalena's Computer | |
---|---|---|

Slope | $6$ | $8$ |

Its temperature increases by $6_{∘}C$ per hour. | Its temperature increases by $8_{∘}C$ per hour. |

Magdalena's computer temperature increases faster than Vincenzo's when both are running the applications. Note also that both functions have continuous domains as the inputs can take any value.

b The slope and the $y-$intercept of the lines are found in Part A.

Blue Line | Red Line | |
---|---|---|

$y-$intercept | $32$ | $24$ |

Slope | $6$ | $8$ |

$y=mx+b $

In this form, $m$ is the slope and $b$ is the $y-$intercept. Blue Line | Red Line | |
---|---|---|

$y-$intercept | $32$ | $24$ |

Slope | $6$ | $8$ |

Equation | $y=6x+32$ | $y=8x+24$ |

The blue line corresponds to Vincenzo's computer temperature, whereas the red line corresponds to Magdalena's computer temperature.

Loading content