UNIT 3: DISCRETE STRUCTURES
MODULE: BASIC MATHEMATICS (8.1)
by GEOFFREY B
Contact: 256788783018
Contents
1 SETS 3
1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Methods of Representing Sets . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.1 Roster Method (Listing Method) . . . . . . . . . . . . . . . . . . 3
1.3.2 Set-Builder Method . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Types of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Examples on Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6 Set Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6.1 Union (A ∪ B) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6.2 Intersection (A ∩ B) . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6.3 Complement (A′ or Ac ) . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6.4 Difference (A − B or A \ B) . . . . . . . . . . . . . . . . . . . . . 5
1.6.5 Symmetric Difference (A△B) . . . . . . . . . . . . . . . . . . . . 5
1.7 Examples on Set Operations . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.8 Venn Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.8.1 Basic Venn Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.9 Cartesian Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.10 Power Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 RELATIONS AND FUNCTIONS 8
2.1 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 Conditions for a Function: . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Domain and Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Domain and Range of Functions (Continuous) . . . . . . . . . . . . . . . 9
3 EQUATIONS OF A LINE 9
3.1 Slope of a Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.1 Types of Slope: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Forms of Linear Equations . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.1 Slope-Intercept Form . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.2 Point-Slope Form . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.3 Two-Point Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.4 General Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1
3.3 Examples on Equations of Lines . . . . . . . . . . . . . . . . . . . . . . . 11
3.4 Applications of Linear Equations . . . . . . . . . . . . . . . . . . . . . . 12
4 GRAPHS OF FUNCTIONS AND RELATIONS 13
4.1 Common Functions and Their Graphs . . . . . . . . . . . . . . . . . . . . 13
4.1.1 Constant Function: f (x) = c . . . . . . . . . . . . . . . . . . . . . 13
4.1.2 Linear Function: f (x) = mx + c . . . . . . . . . . . . . . . . . . . 13
4.1.3 Quadratic Function: f (x) = x2 . . . . . . . . . . . . . . . . . . . 13
4.1.4 Cubic Function: f (x) = x3 . . . . . . . . . . . . . . . . . . . . . . 14
4.1.5 Absolute Value Function: f (x) √ = |x| . . . . . . . . . . . . . . . . 14
4.1.6 Square Root Function: f (x) = x . . . . . . . . . . . . . . . . . . 14
4.2 Graphing Linear Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.3 Graphing Quadratic Functions . . . . . . . . . . . . . . . . . . . . . . . . 15
4.4 Graphing Absolute Value Functions . . . . . . . . . . . . . . . . . . . . . 15
4.5 Graphing Square Root Functions . . . . . . . . . . . . . . . . . . . . . . 15
4.6 Applications of Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5 PRACTICE QUESTIONS (UBTEB/UVTAB STYLE) 16
6 SUMMARY OF KEY FORMULAS 18
2
1 SETS
1.1 Definition
A set is a well-defined collection of distinct objects. The objects in a set are called
elements or members.
1.2 Notation
• Sets are usually denoted by capital letters: A, B, C, . . .
• Elements are denoted by lowercase letters: a, b, c, . . .
• a ∈ A means "a belongs to set A" or "a is an element of A"
• a∈
/ A means "a does not belong to set A"
• Empty set (null set): ∅ or {}
• Universal set: U (contains all elements under consideration)
1.3 Methods of Representing Sets
1.3.1 Roster Method (Listing Method)
List all elements within curly braces.
Examples:
A = {1, 2, 3, 4, 5}
B = {a, e, i, o, u}
C = {2, 4, 6, 8, . . .} (infinite set)
1.3.2 Set-Builder Method
Describe the properties that elements must satisfy.
Examples:
A = {x : x is a natural number less than 6}
B = {x : x is a vowel in the English alphabet}
C = {x : x = 2n, n ∈ N}
1.4 Types of Sets
1. Finite Set: A set with a countable number of elements.
A = {1, 2, 3, 4, 5} n(A) = 5
2. Infinite Set: A set with uncountable number of elements.
B = {1, 2, 3, 4, . . .} (natural numbers)
3
3. Empty Set (Null Set): A set with no elements.
∅ = {}
4. Singleton Set: A set with exactly one element.
C = {5}
5. Equal Sets: Two sets with exactly the same elements.
A = {1, 2, 3}, B = {3, 1, 2} ⇒ A = B
6. Equivalent Sets: Two sets with the same number of elements (not necessarily
same elements).
A = {1, 2, 3}, B = {a, b, c} ⇒ n(A) = n(B) = 3
7. Subset: Set A is a subset of set B if every element of A is also an element of B.
A ⊆ B ⇐⇒ ∀x(x ∈ A ⇒ x ∈ B)
8. Proper Subset: A ⊂ B if A ⊆ B and A ̸= B.
9. Power Set: The set of all subsets of a set. If n(A) = n, then n[P (A)] = 2n .
1.5 Examples on Sets
Example 1: Given A = {1, 2, 3, 4, 5} and B = {3, 4, 5, 6, 7}, determine: a) Is 4 ∈ A? b)
Is 6 ∈ A? c) Is B ⊆ A? d) List all subsets of {a, b}.
Solution:
a) 4 ∈ A Yes
b) 6 ∈/ A No
c) B ⊈ A because 6, 7 ∈ /A
d) P ({a, b}) = {∅, {a}, {b}, {a, b}}
1.6 Set Operations
1.6.1 Union (A ∪ B)
The union of sets A and B is the set of all elements that belong to A or B (or both).
A ∪ B = {x : x ∈ A or x ∈ B}
1.6.2 Intersection (A ∩ B)
The intersection of sets A and B is the set of all elements that belong to both A and B.
A ∩ B = {x : x ∈ A and x ∈ B}
4
1.6.3 Complement (A′ or Ac )
The complement of set A is the set of all elements in the universal set U that are not in
A.
A′ = {x ∈ U : x ∈ / A}
1.6.4 Difference (A − B or A \ B)
The difference of sets A and B is the set of elements that are in A but not in B.
A − B = {x : x ∈ A and x ∈
/ B}
1.6.5 Symmetric Difference (A△B)
The symmetric difference of sets A and B is the set of elements that are in either A or
B but not in both.
A△B = (A − B) ∪ (B − A)
1.7 Examples on Set Operations
Example 2: Given U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, A = {1, 2, 3, 4, 5}, B = {4, 5, 6, 7, 8}
Find: a) A ∪ B b) A ∩ B c) A′ d) B ′ e) A − B f) B − A g) A△B
Solution:
a) A ∪ B = {1, 2, 3, 4, 5, 6, 7, 8}
b) A ∩ B = {4, 5}
c) A′ = {6, 7, 8, 9, 10}
d) B ′ = {1, 2, 3, 9, 10}
e) A − B = {1, 2, 3}
f) B − A = {6, 7, 8}
g) A△B = (A − B) ∪ (B − A) = {1, 2, 3, 6, 7, 8}
1.8 Venn Diagrams
Venn diagrams are graphical representations of sets using circles or closed curves.
1.8.1 Basic Venn Diagrams
A A A∩B B
Example 3 (Venn Diagram Problem): In a survey of 100 students:
5
• 60 study Mathematics (M)
• 50 study Computer Science (C)
• 30 study both
Find how many study neither.
Solution:
Total = n(M ) + n(C) − n(M ∩ C) + n(neither)
100 = 60 + 50 − 30 + n(neither)
100 = 80 + n(neither)
n(neither) = 20
Venn Diagram representation:
U = 100
M only: 30 C only: 20
Both: 30
Neither: 20
Example 4 (UBTEB Style): In a class of 50 students, 35 use Facebook (F), 25 use
Instagram (I), and 10 use both. How many use: a) Facebook only b) Instagram only c)
At least one platform d) Neither platform
Solution:
a) F only = 35 − 10 = 25
b) I only = 25 − 10 = 15
c) At least one = 25 + 15 + 10 = 50
d) Neither = 50 − 50 = 0
Example 5 (Three Sets): In a survey of 150 people about their preferred programming
languages:
• 70 like Python (P)
• 60 like Java (J)
• 50 like C++ (C)
• 30 like Python and Java
• 25 like Python and C++
• 20 like Java and C++
• 15 like all three
6
Find how many like: a) Python only b) At least one language c) None of these languages
Solution:
First, find the number who like exactly two (excluding all three):
P ∩ J only = 30 − 15 = 15
P ∩ C only = 25 − 15 = 10
J ∩ C only = 20 − 15 = 5
Now find those who like exactly one:
P only = 70 − (15 + 10 + 15) = 70 − 40 = 30
J only = 60 − (15 + 5 + 15) = 60 − 35 = 25
C only = 50 − (10 + 5 + 15) = 50 − 30 = 20
a) Python only = 30
b) At least one:
= 30 + 25 + 20 + 15 + 10 + 5 + 15
= 120
c) None = 150 − 120 = 30
1.9 Cartesian Product
The Cartesian product of sets A and B, denoted A × B, is the set of all ordered pairs
(a, b) where a ∈ A and b ∈ B.
A × B = {(a, b) : a ∈ A, b ∈ B}
Properties:
• n(A × B) = n(A) × n(B)
• A × B ̸= B × A (generally)
Example 6: If A = {1, 2} and B = {a, b, c}, find A × B and B × A.
Solution:
A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}
B × A = {(a, 1), (a, 2), (b, 1), (b, 2), (c, 1), (c, 2)}
n(A × B) = 2 × 3 = 6
n(B × A) = 3 × 2 = 6
1.10 Power Set
The power set of a set A, denoted P (A), is the set of all subsets of A.
Properties:
• If n(A) = n, then n[P (A)] = 2n
7
• Always includes ∅ and A itself
Example 7: Find the power set of A = {a, b, c}.
Solution:
P (A) = {∅,
{a}, {b}, {c},
{a, b}, {a, c}, {b, c},
{a, b, c}}
n[P (A)] = 23 = 8
2 RELATIONS AND FUNCTIONS
2.1 Relations
A relation from set A to set B is a subset of A × B. It associates elements of A with
elements of B.
Example 8: Let A = {1, 2, 3} and B = {a, b}. A relation R = {(1, a), (1, b), (2, a)}.
2.2 Functions
A function (or mapping) from set A to set B, denoted f : A → B, is a relation where
each element of A is associated with exactly one element of B.
2.2.1 Conditions for a Function:
1. Every element in domain A must be mapped
2. Each element maps to exactly one element in codomain B
Example 9: Determine if each relation is a function: a) f = {(1, 2), (2, 3), (3, 2)} b)
g = {(1, 2), (1, 3), (2, 4)} c) h = {(1, 5), (2, 5), (3, 5)}
Solution:
a) Each x maps to exactly one y ⇒ Function
b) x = 1 maps to two y-values ⇒ Not a function
c) Each x maps to one y (even though same y) ⇒ Function
2.3 Domain and Range
• Domain: Set of all first elements (x-values)
• Range: Set of all second elements (y-values)
Example 10: Find domain and range of f = {(1, 4), (2, 5), (3, 6), (4, 7)}
Solution:
Domain = {1, 2, 3, 4}
Range = {4, 5, 6, 7}
8
2.4 Domain and Range of Functions (Continuous)
√
Example 11: Find domain and range of f (x) = x−2
Solution:
Domain: x − 2 ≥ 0 ⇒ x ≥ 2
Domain = [2, ∞)
Range: y ≥ 0 ⇒ [0, ∞)
Example 12: Find domain and range of f (x) = 1
x−3
Solution:
Domain: x − 3 ̸= 0 ⇒ x ̸= 3
Domain = (−∞, 3) ∪ (3, ∞)
Range: y ̸= 0 ⇒ (−∞, 0) ∪ (0, ∞)
Example 13: Find domain and range of f (x) = x2 + 1
Solution:
Domain: All real numbers = (−∞, ∞)
Range: y ≥ 1 ⇒ [1, ∞)
√
Example 14: Find domain and range of f (x) = 4 − x2
Solution:
Domain: 4 − x2 ≥ 0 ⇒ x2 ≤ 4 ⇒ −2 ≤ x ≤ 2
Domain = [−2, 2]
Range: 0 ≤ y ≤ 2 ⇒ [0, 2]
Example 15 (Computer Application): The time t to process a file of size s MB is
t = 2s + 3. Find domain and range if file sizes range from 0 to 100 MB.
Solution:
Domain: 0 ≤ s ≤ 100
Range: When s = 0, t = 3
When s = 100, t = 2(100) + 3 = 203
Range: 3 ≤ t ≤ 203
3 EQUATIONS OF A LINE
3.1 Slope of a Line
The slope m of a line passing through points (x1 , y1 ) and (x2 , y2 ) is:
y2 − y 1 rise
m= =
x2 − x 1 run
9
3.1.1 Types of Slope:
• m > 0: line increases (rises to the right)
• m < 0: line decreases (falls to the right)
• m = 0: horizontal line
• m undefined: vertical line
Example 16: Find the slope of the line through (2, 3) and (5, 9).
Solution:
9−3 6
m= = =2
5−2 3
Example 17: Find the slope of the line through (−1, 4) and (3, −2).
Solution:
−2 − 4 −6 3
m= = =−
3 − (−1) 4 2
3.2 Forms of Linear Equations
3.2.1 Slope-Intercept Form
y = mx + c
where m is the slope and c is the y-intercept.
3.2.2 Point-Slope Form
y − y1 = m(x − x1 )
where m is the slope and (x1 , y1 ) is a point on the line.
3.2.3 Two-Point Form
y − y1 x − x1
=
y2 − y 1 x2 − x 1
3.2.4 General Form
Ax + By + C = 0
where A, B, and C are constants.
10
3.3 Examples on Equations of Lines
Example 18: Find the equation of the line through (2, 3) with slope 4.
Solution:
Using point-slope form: y − 3 = 4(x − 2)
y − 3 = 4x − 8
y = 4x − 5
Example 19: Find the equation of the line through (2, 3) and (5, 9).
Solution:
9−3 6
m= = =2
5−2 3
Using point-slope with (2, 3) :
y − 3 = 2(x − 2)
y − 3 = 2x − 4
y = 2x − 1
Example 20: Find the equation of the line with slope − 23 passing through (3, −1).
Solution:
2
y − (−1) = − (x − 3)
3
2
y+1=− x+2
3
2
y =− x+1
3
Example 21: Find the slope and y-intercept of 3x + 2y = 6.
Solution:
3x + 2y = 6
2y = −3x + 6
3
y =− x+3
2
3
Slope = − , y-intercept = 3
2
Example 22: Find the equation of the horizontal line through (4, −2).
Solution:
Horizontal line: y = constant
y = −2
Example 23: Find the equation of the vertical line through (4, −2).
Solution:
Vertical line: x = constant
x=4
11
3.4 Applications of Linear Equations
Example 24 (Cost Function - Computer Application): The cost C of producing x
units of software is linear. Fixed cost is $5000 and variable cost is $20 per unit. a) Find
the cost function b) Find the cost for 500 units c) Find the number of units that can be
produced for $15,000
Solution:
a) C(x) = mx + b
b = fixed cost = 5000
m = variable cost per unit = 20
C(x) = 20x + 5000
b) C(500) = 20(500) + 5000 = 10, 000 + 5000 = $15, 000
c) 20x + 5000 = 15000
20x = 10000
x = 500 units
Example 25 (Depreciation): A computer purchased for $2000 depreciates linearly to
$200 after 5 years. a) Find the linear depreciation function V (t) where t is years. b) Find
the value after 3 years. c) When will it be worth $800?
Solution:
Points: (0, 2000) and (5, 200)
200 − 2000 −1800
m= = = −360
5−0 5
V (t) = −360t + 2000
b) V (3) = −360(3) + 2000 = −1080 + 2000 = $920
c) − 360t + 2000 = 800
−360t = −1200
1200
t= = 3.33 years
360
Example 26 (Break-Even Analysis): A company has fixed costs of $10,000 and
variable costs of $30 per unit. Each unit sells for $50. a) Find cost function C(x) b) Find
revenue function R(x) c) Find break-even point
Solution:
a) C(x) = 30x + 10000
b) R(x) = 50x
c) Break-even when R(x) = C(x)
50x = 30x + 10000
20x = 10000
x = 500 units
12
4 GRAPHS OF FUNCTIONS AND RELATIONS
4.1 Common Functions and Their Graphs
4.1.1 Constant Function: f (x) = c
y
y=2
4.1.2 Linear Function: f (x) = mx + c
y
y = 2x + 1
4.1.3 Quadratic Function: f (x) = x2
y
y = x2
13
4.1.4 Cubic Function: f (x) = x3
y
y = x3
4.1.5 Absolute Value Function: f (x) = |x|
y
y = |x|
√
4.1.6 Square Root Function: f (x) = x
y
√
y= x
4.2 Graphing Linear Functions
Example 27: Graph y = 2x − 1 for x = −2 to 3.
Solution: Create a table of values:
x -2 -1 0 1 2 3
y = 2x − 1 -5 -3 -1 1 3 5
Plot points and draw line through them.
14
4.3 Graphing Quadratic Functions
Example 28: Graph y = x2 − 4x + 3 for x = 0 to 4.
Solution: Create a table of values:
x 0 1 2 3 4
2
y = x − 4x + 3 3 0 -1 0 3
Vertex at x = − 2a
b −4
= − 2(1) = 2, y = −1 Graph is parabola opening upward.
Example 29: Graph y = −x + 2x + 3 for x = −2 to 4.
2
Solution: Create a table of values:
x -2 -1 0 1 2 3 4
2
y = −x + 2x + 3 -5 0 3 4 3 0 -5
Vertex at x = − 2a
b 2
= − 2(−1) = 1, y = 4 Graph is parabola opening downward.
4.4 Graphing Absolute Value Functions
Example 30: Graph y = |x − 2| + 1 for x = −1 to 5.
Solution: Create a table of values:
x -1 0 1 2 3 4 5
y = |x − 2| + 1 4 3 2 1 2 3 4
Graph is V-shaped with vertex at (2, 1).
4.5 Graphing Square Root Functions
√
Example 31: Graph y = x − 1 + 2 for x = 1 to 5.
Solution: Domain: x ≥ 1 Table of values:
√x 1 2 3 4 5
y = x−1+2 2 3 3.41 3.73 4
Graph starts at (1, 2) and increases slowly.
4.6 Applications of Graphs
Example 32 (Computer Application - Download Speed): The download speed s
(Mbps) varies with time t (minutes) according to:
s = −t2 + 6t + 5
Graph this function for 0 ≤ t ≤ 7 and find: a) Maximum speed and when it occurs b)
When speed is 8 Mbps
Solution: Table of values:
t 0 1 2 3 4 5 6 7
s 5 10 13 14 13 10 5 -2
15
a) Maximum at t = − 2a
b 6
= − 2(−1) = 3 minutes Maximum speed = 14 Mbps
b) When s = 8:
−t2 + 6t + 5 = 8
−t2 + 6t − 3 = 0
t2 − 6t + 3 = 0
√ √
6± 36 − 12 6 ± 24 6 ± 4.90
t= = =
2 2 2
t1 ≈ 0.55 minutes, t2 ≈ 5.45 minutes
5 PRACTICE QUESTIONS (UBTEB/UVTAB STYLE)
1. Given U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, A = {2, 4, 6, 8, 10}, B = {1, 2, 3, 4, 5} Find:
(a) A ∪ B
(b) A ∩ B
(c) A − B
(d) B − A
(e) A′ ∩ B
(f) (A ∪ B)′
2. In a survey of 80 people, 50 like coffee, 40 like tea, and 20 like both. How many
like neither?
3. If A = {a, b, c} and B = {1, 2}, find A × B and B × A. Verify n(A × B) =
n(A) × n(B).
4. Find the power set of A = {x, y, z}. How many subsets does it have?
5. Determine whether each relation is a function:
(a) f = {(1, 2), (2, 4), (3, 6), (4, 8)}
(b) g = {(1, 3), (1, 4), (2, 5), (3, 6)}
(c) h = {(1, 5), (2, 5), (3, 5), (4, 5)}
6. Find domain and range of:
√
(a) f (x) = x + 3
(b) f (x) = 2
x−4
(c) f (x) = x − 4
2
√
(d) f (x) = 9 − x2
7. Find the equation of the line through:
(a) (2, 5) and (4, 9)
(b) (−1, 3) and (2, −3)
16
(c) (0, 4) with slope − 21
8. Find slope and y-intercept of:
(a) 2x + 3y = 12
(b) 4x − y = 7
9. A computer purchased for $2500 depreciates linearly to $300 after 4 years.
(a) Find the depreciation function V (t)
(b) Find value after 2 years
(c) When will it be worth $1000?
10. Graph the following functions for the given intervals:
(a) y = 2x + 1, −3 ≤ x ≤ 3
(b) y = x2 − 2x − 3, −2 ≤ x ≤ 4
(c) y = |x + 1| − 2, −4 ≤ x ≤ 2
√
(d) y = x + 2, −2 ≤ x ≤ 7
11. In a survey of 120 students about programming languages:
• 60 know Python
• 50 know Java
• 40 know C++
• 25 know Python and Java
• 20 know Python and C++
• 15 know Java and C++
• 10 know all three
Find:
(a) How many know Python only?
(b) How many know exactly one language?
(c) How many know at least one language?
(d) How many know none?
12. A company’s profit function is P (x) = −2x2 + 40x − 150 where x is thousands of
units.
(a) Find the domain and range in context (units from 0 to 20 thousand)
(b) Graph the function
(c) Find the maximum profit
17
6 SUMMARY OF KEY FORMULAS
Topic Key Formulas
Union A ∪ B = {x : x ∈ A or x ∈ B}
Intersection A ∩ B = {x : x ∈ A and x ∈ B}
Complement A′ = {x ∈ U : x ∈ / A}
Difference A − B = {x : x ∈ A and x ∈ / B}
Cardinality n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
Cartesian Product n(A × B) = n(A) × n(B)
Power Set n[P (A)] = 2n(A)
Slope m = xy22 −y
−x1
1
Slope-Intercept y = mx + c
Point-Slope y − y1 = m(x − x1 )
Contact Information
For questions or clarification:
Geoffrey B
Tel: 256788783018
These notes are prepared for the BASIC MATHEMATICS module (8.1) following the
UBTEB/UVTAB curriculum framework.
18