At the end of the lessons, the students will be able to:
1. Represent real-life situations using functions, including piece-wise functions; and
2. Evaluate a function.
A businessman sells various office and school supplies for a living. He purchases notebooks through a supplier that cost him a flat
fee of PHP 1,000, plus PHP 15 for every notebook bought. A table listing the total cost 𝐶(𝑥) for buying 𝑥 notebooks is given below,
with a graph showing the same information.
Notebooks Total Cost (PHP)
𝑥 𝐶(𝑥)
100 2,500
150 3,250
200 4,000
300 5,500
500 8,500
Both the table and the graph can be represented by the function 𝐶(𝑥) = 1000 + 15𝑥.
The above example is both an example of a relation and a function. The following definitions differentiate the two.
DEFINITION: Relations
A relation is a rule determining ordered pairs (𝑥, 𝑦) so that values from a given set of values (called the domain) is connected to
values from a different set of values (called the range).
Consider the following set of ordered pairs:
{(2, 3), (− 1, 5), (4, − 2), (9, 9), (0, − 6)}
The domain is taken from the first coordinates from each The range is taken from the second coordinates from each
ordered pair. In this case: ordered pair. In this case:
{2, − 1, 4, 9, 0} ⇒ {− 1, 0, 2, 4, 9} {3, 5, − 2, 9, − 6} ⇒ {− 6, − 2, 3, 5, 9}
(For ease of understanding, sort the elements in order.) (For ease of understanding, sort the elements in order.)
Lesson 1 Page 1
Lesson 1 Page 2
DEFINITION: Functions
A function is a relation where each value in the domain is related to only one value in the range.
A function is usually represented using a letter of the English alphabet, such as 𝑓, 𝑔, ℎ, 𝐹, 𝐺, 𝐻, and so on.
To put it in another way, given a set of ordered pairs (𝑥, 𝑦), every element 𝑥 in the domain can only correspond to one element 𝑦
in the range.
A function can be thought of as a machine that processes raw material (input) and makes it into a new product (output).
REPRESENTING FUNCTIONS
There are many ways of representing functions. The most common ones are listed below.
1. Set of ordered pairs
𝐹 = {(1, 1), (3, 5), (4, 6), (8, 9)} Function. Each value of 𝑥 is unique.
𝐺 = {(1, 𝐴), (2, 𝐵), (3, 𝐶), (4, 𝐷), (5, 𝐸)} Function. Each value of 𝑥 is unique.
NOT a Function. The value 3 (in bold) corresponds to two
𝐻 = {(3, 1), (9, 2), (3, 7), (8, 5)}
values: 1 and 7.
𝐼 = {(2, 1), (3, 4), (4, 1), (5, 0), (6, 5)} Function. Each value of 𝑥 is unique.
2. Table of values
A table of values show the correspondence of two sets of values in tabular form.
𝑥 0 1 4 9 16
Function. Each value of 𝑥 is unique.
𝑦 − 5 − 4 − 1 4 11
Item Water Coffee Soda Juice Tea
Function. Each item is unique.
Price 25 30 35 25 35
𝑥 5 9 5 8 6 NOT a Function. The value 5 (in bold) corresponds to two
𝑦 3 2 9 5 11 values: 3 and 9.
Lesson 1 Page 3
3. Mapping diagram
A mapping diagram is used to visually connect elements from one set to elements from another set.
Student ID Number Teacher Student Student Score
Mary 001 Mark Joshua 10
John 025 Ms. Lim Marion Mico 7
Kim 154 Sonia Charles
Function. One element in 𝑥 corresponds NOT a Function. One element in 𝑥 Function. More than one element in 𝑥
to exactly one element in 𝑦. This is corresponds to more than one element corresponds to exactly one value of 𝑦.
called a one-to-one correspondence. in 𝑦. This is called a one-to-many This is called a many-to-one
correspondence. correspondence.
4. Graph
To determine if a graph represents a function, the vertical line test can be used.
Function. The graph intersects the vertical line exactly once. NOT a Function. The graph intersects the vertical line more
than once.
5. Using an equation or a generalized rule
A function can be represented using a generalized rule.
Function. Each jeepney can only be assigned to one plate
A jeepney and its plate number
number.
Lesson 1 Page 4
NOT a Function. A person can have more than one phone
A person and their phone number
numbers.
Another way of describing a general rule is by representing a function using an equation. Equations use mathematical
symbols to express a rule. If the following condition can be seen:
1. There is no 𝑦 in the equation;
2. The exponent of 𝑦 is an even number;
3. The exponent of 𝑥 is NOT a positive integer; or
4. The relationship does NOT use the equal sign,
then, the equation CANNOT be a function.
2
𝑦 = 2𝑥 + 3 Function 𝑦 = 3𝑥 − 3 Function
NOT a Function. The
2 2
𝑦 =𝑥 − 3 exponent of 𝑦 is an even 𝑦≤𝑥 − 3 NOT a Function
number.
NOT a Function. Radicals
2𝑥−1
𝑦 = 𝑥+2
Function 𝑦 = 3𝑥 − 1 imply a fraction as an
exponent.
EVALUATING FUNCTIONS
The last among the five ways of representing a function involves using an equation to represent a general rule. It is possible to
identify specific ordered pairs by substituting certain values as the input and getting a different value as the output. This is referred
to as evaluation.
As what was seen earlier in Figure 2, an input “processed” in a “function machine” will get an output. Here’s an example of 𝑥 = 4
processed in a “function machine” 𝑓(𝑥) = 𝑥 − 3.
RULE: Evaluating Functions
To evaluate the value of the function 𝑓(𝑥) for any value 𝑥, simply replace the substitute the value of 𝑥 in the function, then
simplify to get the final result.
The following examples show how to evaluate various functions.
EXAMPLE 1.1. Evaluating Functions
INSTRUCTIONS: Given the following functions,
2 𝑥−2
𝑓(𝑥) = 3𝑥 − 2 𝑔(𝑥) = 2𝑥 − 4𝑥 + 1 ℎ(𝑥) = 4−𝑥
Evaluate the following:
5
1. 𝑓(𝑥) when 𝑥 = 0 3. 𝑓(𝑥) when 𝑥 =− 2 𝑔(𝑥) when 𝑥 = 2 7. 𝑔(𝑥) when 𝑥 =− 1
.
6 8
2. 𝑔(− 3) 4. 𝑔(0) ℎ(1) ℎ(− 3)
. .
Lesson 1 Page 5
Solution:
1. 𝑓(𝑥) when 𝑥 = 0
Since 𝑓(𝑥) = 3𝑥 − 2, we can substitute the value of 𝑥 in the function.
𝑓(𝑥) = 3𝑥 − 2 Given value of 𝑓(𝑥)
𝑓(0) = 3(0) − 2 Substitute 𝑥 with 0
=0 − 2 Multiplication
𝑓(0) = − 2 Subtraction
2. 𝑓(𝑥) when 𝑥 =− 2
Since 𝑓(𝑥) = 3𝑥 − 2, we can substitute the value of 𝑥 in the function.
𝑓(𝑥) = 3𝑥 − 2 Given value of 𝑓(𝑥)
𝑓(− 2) = 3(− 2) − 2 Substitute 𝑥 with − 2
=− 6 − 2 Multiplication
𝑓(− 2) = − 8 Subtraction
3 𝑔(𝑥) when 𝑥 = 2
.
2
Since 𝑔(𝑥) = 2𝑥 − 4𝑥 + 1, we can substitute the value of 𝑥 in the function.
𝑔(𝑥) = 2𝑥2 − 4𝑥 + 1 Given value of 𝑔(𝑥)
𝑔(2) = 2(2)2 − 4(2) + 1 Substitute 𝑥 with 2
= 2(4) − 4(2) + 1 Exponents
=8 − 8 + 1 Multiplication
𝑔(2) = 1 Subtraction and Addition
4. 𝑔(𝑥) when 𝑥 =− 1
2
Since 𝑔(𝑥) = 2𝑥 − 4𝑥 + 1, we can substitute the value of 𝑥 in the function.
𝑔(𝑥) = 2𝑥2 − 4𝑥 + 1 Given value of 𝑔(𝑥)
𝑔(− 1) = 2(− 1)2 − 4(− 1) + 1 Substitute 𝑥 witn − 1
= 2(1) − 4(− 1) + 1 Exponents
=2 + 4 + 1 Multiplication
𝑔(− 1) = 7 Addition
5 𝑔(− 3)
.
The expression 𝑔(− 3) means that the function 𝑔(𝑥) is evaluated with 𝑥 =− 3. Therefore,
𝑔(𝑥) = 2𝑥2 − 4𝑥 + 1 Given value of 𝑔(𝑥)
𝑔(− 3) = 2(− 3)2 − 4(− 3) + 1 Substitute 𝑥 with − 3
= 2(9) − 4(− 3) + 1 Exponents
Lesson 1 Page 6
= 18 + 12 + 1 Multiplication
𝑔(− 3) = 31 Addition
6 𝑔(0)
.
𝑔(0) means that the function 𝑔(𝑥) is evaluated with 𝑥 = 0. Therefore,
𝑔(𝑥) = 2𝑥2 − 4𝑥 + 1 Given value of 𝑔(𝑥)
𝑔(0) = 2(0)2 − 4(0) + 1 Substitute 𝑥 with 0
= 2(0) − 4(0) + 1 Exponents
=0 − 0 + 1 Multiplication
𝑔(0) = 1 Subtraction and Addition
Lesson 1 Page 7
7. ℎ(1)
ℎ(1) means that the function ℎ(𝑥) is evaluated with 𝑥 = 1. Therefore,
𝑥−2
ℎ(𝑥) = 4−𝑥
Given value of ℎ(𝑥)
(1)−2
ℎ(1) = 4−(1)
Substitute 𝑥 with 1
−1
= 3
Subtraction
1
ℎ(1) = − 3
Rewriting the expression
8 ℎ(− 3)
.
ℎ(− 3) means that the function ℎ(𝑥) is evaluated with 𝑥 =− 3. Therefore,
𝑥−2
ℎ(𝑥) = 4−𝑥
Given value of ℎ(𝑥)
(−3)−2
ℎ(− 3) = 4−(−3)
Substitute 𝑥 with − 3
−5
= 7
Subtraction
5
ℎ(− 3) = − 7
Rewriting the expression
PIECEWISE FUNCTIONS
A function represents one general rule or formula that describes the entire situation. However, there are many situations where
more than one formula is required to describe the situation. In these cases, piecewise functions are required.
DEFINITION: Piecewise Functions
A piecewise function is a type of function divided into different “subfunctions” where each “subfunction” is applied to certain
parts or interval of the function’s domain.
The function of the amount paid as income tax can be expressed as a piecewise function. The tax table from the Bureau of Internal
Revenue is given below.
Actual Text (from the BIR
Annual Income Mathematical Representation
website)
Not over PHP 250,000 0% 0 If 𝑥≤250, 000
Over PHP 250,000 but not 20% of the excess over
over PHP 400,000 P250,000 0. 2(𝑥 − 250, 000) If 250, 000 < 𝑥≤400, 000
Over PHP 400,000 but not P30,000 + 25% of the excess
over PHP 800,000 over P400,000 30, 000 + 0. 25(𝑥 − 400, 000) If 400, 000 < 𝑥≤250, 000
Over PHP 800,000 but not P130,000 + 30% of the excess
over PHP 2,000,000 over P800,000 130, 000 + 0. 3(𝑥 − 800, 000) If 800, 000 < 𝑥≤2, 000, 000
Over PHP 2,000,000 but P490,000 + 32% of the excess
not over PHP 8,000,000 over P2,000,000 490, 000 + 0. 32(𝑥 − 2, 000, 000) If 2, 000, 000 < 𝑥≤8, 000, 000
P2,410,000 + 35% of the
Over 8,000,000 2, 410, 000 + 0. 35(𝑥 − 8, 000, 00 If 𝑥 > 8, 000, 000
excess over P8,000,000
In this case, if 𝑥 represents a person’s annual income, then that person’s income tax 𝐼(𝑥) is represented mathematically as:
𝐼(𝑥) = { 0 If 𝑥≤250, 000
Lesson 1 Page 8
0. 2(𝑥 − 250, 000) If 250, 000 < 𝑥≤400, 000
30, 000 + 0. 25(𝑥 − 400, 000) If 400, 000 < 𝑥≤800, 000
130, 000 + 0. 3(𝑥 − 800, 000) If 800, 000 < 𝑥≤2, 000, 000
490, 000 + 0. 32(𝑥 − 2, 000, 000) If 2, 000, 000 < 𝑥≤8, 000, 000
2, 410, 000 + 0. 35(𝑥 − 8, 000, 000) If 𝑥 > 8, 000, 000
The formula that you use to determine how much you pay is determined by how much you earn. For example,
● If you earn PHP 200,000 in a year, then you will use 0 as the formula to determine the payment of taxes.
● If you earn PHP 450,000 in a year, then you will use 30, 000 + 0. 25(𝑥 − 400, 000) as the formula to determine the
payment of taxes.
● If you earn PHP 1,000,000 in a year, then you will use 130, 000 + 0. 3(𝑥 − 800, 000) as the formula to determine the
payment of taxes.
An example of a piecewise is called an absolute value function.
DEFINITION: Absolute Value Functions
The function 𝑓 is called an absolute value function, denoted as 𝑓(𝑥) = |𝑥| is a piecewise function defined as
𝑓(𝑥) = {
𝑥 If 𝑥≥0
− 𝑥 If 𝑥 < 0
For values of 𝑥 less than 0, − 𝑥 is used to determine the value of 𝑓(𝑥). The following are
the table of values:
𝑓(𝑥)
𝑥
− 3 − 𝑥→ − (− 3) = 3
− 2 − 𝑥→ − (− 2) = 2
− 1 − 𝑥→ − (− 1) = 1
For values greater than or equal to 0, 𝑥 is used to determine the value of 𝑓(𝑥) instead.
𝑥 𝑓(𝑥)
0 𝑥→0
1 𝑥→1
2 𝑥→2
The graph above is another representation of the same function in graph form.
Lesson 1 Page 9
EXAMPLE 1.2. Evaluating Functions (Piecewise)
INSTRUCTIONS: Given the function
𝑓(𝑥) ={
𝑥−3 If 𝑥 < 1
4𝑥 + 2 If 𝑥≥1
Evaluate the following:
3
1. 𝑓(− 3) 2. 𝑓(0) 𝑓(1) 4. 𝑓(4)
.
Solution:
1. 𝑓(− 3)
In this case, 𝑥 =− 3. Thus, we will be using 𝑥 − 3 to get the value of 𝑓(𝑥). Thus,
if 𝑥 < 1
𝑓(𝑥) = {𝑥 − 3 4𝑥 + Original function
if 𝑥≥1
𝑓(𝑥) = 𝑥 − 3 Subfunction used when 𝑥 =− 3
𝑓(− 3) = − 3 − 3 Substitution: 𝑥 =− 3
𝑓(− 3) = − 6 Subtraction
2. 𝑓(0)
In this case, 𝑥 = 0, Thus, we will be using 𝑥 − 3 to get the value of 𝑓(𝑥). Thus,
if 𝑥 < 1
𝑓(𝑥) = {𝑥 − 3 4𝑥 + Original function
if 𝑥≥1
𝑓(𝑥) = 𝑥 − 3 Subfunction used when 𝑥 = 0
𝑓(0) = 0 − 3 Substitution: 𝑥 = 0
𝑓(0) = − 3 Subtraction
3 𝑓(1)
.
In this case, 𝑥 = 1. Thus, we will be using 4𝑥 + 2 to get the value of 𝑓(𝑥). Thus,
if 𝑥 < 1
𝑓(𝑥) = {𝑥 − 3 4𝑥 + Original function
if 𝑥≥1
𝑓(𝑥) = 4𝑥 + 2 Subfunction used when 𝑥 = 1
𝑓(1) = 4(1) + 2 Substitution: 𝑥 = 1
=4 + 2 Multiplication
𝑓(1) = 6 Addition
4. 𝑓(4)
In this case, 𝑥 = 4. Thus, we will be using 4𝑥 + 2 to get the value of 𝑓(𝑥). Thus,
if 𝑥 < 1
𝑓(𝑥) = {𝑥 − 3 4𝑥 + Original function
if 𝑥≥1
𝑓(𝑥) = 4𝑥 + 2 Subfunction used when 𝑥 = 4
𝑓(4) = 4(4) + 2 Substitution: 𝑥 = 4
= 16 + 2 Multiplication
= 18 Addition
Lesson 1 Page 10
⮚ A relation is a rule describing a set of ordered pairs (𝑥, 𝑦). The set of all first coordinates 𝑥 is called the domain,
while the set of all second coordinates 𝑦 is called the range.
⮚ A function is a relation where all elements in the domain correspond to only one element in the range.
SYN ⮚ There are multiple ways of representing a function:
o Listing sets of ordered pairs
THE o Using a table of values
o Using a mapping diagram
SIS o Using the vertical line test on a graph
o Using an equation or generalized rule
⮚ To evaluate a function, simply substitute the variable with the desired number and simplify.
Web Sources: ⮚ 11.3 – Piecewise Functions (n.d.) Hunter College – MATH101.
⮚ 1.1: Four Ways to Represent a Function (n.d.) LibreTexts: LumenLearning.
Mathematics. [Link]
[Link] chapter/read-define-and-write-piecewise-functions/
ulus__Early_Transcendentals_(Stewart)/01%3A_Functions_and_M Textbooks:
odels/1.01%3A_Four_Ways_to_Represent_a_Function ⮚ Orines, F. (2016). Next Century Mathematics 11: General
⮚ Bureau of Internal Revenue (n.d.) Income Tax. Department of Mathematics. Phoenix Publishing House, Inc.
Finance, Bureau of Internal Revenue. ⮚ Santos, D., Biason, M. (2016). MATH ACTIVATED: General Math.
[Link] Salesiana Books by Don Bosco Press, Inc.
html/
⮚ Commission on Higher Education (2016). Teaching Guide for Images, Figures, and Graph Credits:
Senior High School: General Mathematics. Work licensed under ⮚ All figures and graphs created using GeoGebra unless otherwise
a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 stated.
International License. To view a copy of this license, visit
[Link]
Lesson 1 Page 11