You are on page 1of 13

MODULE 03: Variables

Variables are basically anything that represents a particular number or elements in a


set. One misconception about variables is that they are mostly letters in the English
alphabet, technically, it is partly true.
You have been exposed to variables even in elementary Mathematics without even
realizing it, since the term variable was only introduced in Algebra. Take these for
example:
1 + 1 = ___
or
1+1=?
What is the difference between these two statements?
Actually, nothing, well, aside from the symbol used at the end. However, content-wise,
nothing. Why? The blank and the question mark means the same thing – it signifies the
location of the value of whatever 1 plus 1 is. It indicates that there is a value missing at
that part of the statement.
This means the same thing even if we replace it by a box as we are accustomed to
sometimes or any figure that registers as “missing” in our minds.
The difference in high school is that instead of these symbols, we use letters like:
1+1=x
or
1+1=θ
but it means the same thing. We are just accustomed to seeing “blank”, question mark,
or boxes to mean a missing value, that when we replace it with something else, we get
confused. Some get frustrated by the letters probably because of “bad” memories
during high school. You have probably seen something like this in social media
platforms, especially Facebook:

Now, you might be willing to find for the missing value at the end, however, if we
present it like this:
x + x + x = 18
x + y + y = 14
y–z=2
z + x + y-1 = ?
you get frightened.
“BuT sIr, FrUiTs ArE nOt ThE sAmE aS LetTeRs”
Yes, they are different, but in the statement, they mean the same thing. To make things
clearer the actual values are:
6 + 6 + 6 = 18
6 + 4 + 4 = 14
4–2=2
2+6+4-1=?
Where are we getting at? The apples are only to represent the initially unknown value 6,
the bananas represent 4 or 3, and the cherries, 2. So if we replace the apples with
squares, the bananas with triangle, and the cherries with circles, it would still be the
same sentence. Or, let’s say we place your face to replace the apples, the face of your
pet to replace the bananas, and the face of your crush to replace the cherries, it would
still be the same thing:
The apples, x, squares or your face represent the value of 6
The bananas, y, triangles or the face of your pet represent the value of 4 or 3
The cherries, z, circles or the face of your crush represent the value of 2
 
There is absolutely no difference, meaning-wise, regardless of what you use to
represent – those are variables.
So why do we use letters as variables? Which is easier, drawing apples, writing down
the letter x, constructing squares, or drawing your face?
The letters as variables are only for convenience, but variables themselves could be
anything. This also means that the image a while ago is a legitimate Mathematics
problem. Referring to the previous lesson, Mathematics is a language, just because we
are used to letters in Algebra doesn’t mean that letters are exclusive to Algebra and vice
versa. We use letters only for convenience.
As aforementioned, variables have two functions, to represent a particular number or
elements in a set.:
The first function, representing a particular number, is shown in the previous
discussion. Variables can be used to represent a missing value, or a value in a
statement initially unknown. For example,
Twice a number plus 5 is 6
Since we do not know what the “number” is initially, we use a variable to represent it
first so we can easily find what the number is, if possible. Let’s say x would represent
the number:
2x + 5 = 6
 
The second function, representing elements in a set, uses the variables to summarize
a group of numbers that are too laborious to mention or write down. For example, if
every one in Grade 5 - Matapat  got 95 as a grade (literally everyone, no one got higher
or lower than 95), instead of enumerating their names, I would just use their section to
represent everyone:
“Grade 5 - Matapat got 95”
In this case, the Grade 5 - Matapat is the variable itself.
Let’s say that you want to say “the square of all numbers greater than 2 is greater than
4.” Instead of enumerating all numbers greater than 2, which is infinite by the way, we
simply use a variable to represent it. So,
Let x represent all numbers greater than 2, x2 > 4.
or
If x > 2, then x2 > 4

Converting to Mathematical
Statement
The language of Mathematics uses symbols for its statements. Like English alphabet is
for the English language, Filipino alphabet (English alphabet plus ñ and ng) is for the
Filipino language (after we included all the borrowed words from foreign languages),
and your own syntaxes in coding.
The crux is how to convert (or translate) to Mathematical syntaxes. Take for example
the previous statement:
Twice a number plus 5 is 6
Just like translating one language to another, we consider the context first, then
translate correspondingly.
“Twice” means two times or multiplied by 2
“a number” the unknown value, represented by a variable, let’s have x
“plus 5” means added by 5
“6” is 6
The linking verb, “is”, pertains to the equality of values between the subject and the
predicate in the English syntax. We use “=” to represent equality.
So, 2x + 5 = 6
Another example:
Given any real number, its square is nonnegative
“real number” represents all numbers that can be plotted on the real number line, since
there is an infinite number of elements under the Set of Real Numbers, it will be
represented by a variable, let’s say, y
“its square” does not pertain to the geometric figure, but the power of 2, or 2 as an
exponent of what “its” refers to, which is the real number.
“is nonnegative” literally means “not negative”, which is either zero or positive. In
symbols, since we have zero as the basis for positivity or negativity, “> 0” is positive, “<
0” is negative.
“Let y be a real number, y2 ≥ 0”
 
The sum of the square of two numbers equals the square of their sum
“sum” means the result of addition, so + is involved
“square of ___” means that whichever its object is, it is raised to the power of 2
“two numbers” and “their” would be represented by two different variables, using only
one would bring about confusion as to what value it pertains, let’s say a and b.
“equal” means equal, “=”
In “The sum of the square of two numbers”, the object of the preposition of “The sum of”
is “the square…” which means that the sum supersedes the square in the order of
operations, meaning you get the square of each term first before adding.
a2 + b2
In “the square of their sum”, on the other hand, the object of the preposition of “the
square of” is “their sum”, which means that you get the sum first before applying the
square.
(a + b)2
So, “The sum of the square of two numbers equal the square of their sum” in symbols is
a2 + b2 = (a + b)2
What is important in converting to mathematical syntax is to know the concepts that
represent each English term or phrase. So if you had no idea that “squaring a number”
means raising the number by the power of 2, you might end up drawing a literal square
box on the number.
Examples:
Using x to represent the missing value:
Thrice a number is twice the same number increased by 5
3x = 2x + 5
 
Using a, b to represent the missing value:
The product of two numbers is more than the square of the sum of the two
numbers
ab > (a + b)2
The linking verb is connected to “more than” indicating that the first value has a greater
value than the second, represented by the symbol “>”. For lesser values than the
succeeding value, “<”
 
Using p to represent the missing value:
The square root of a number is at least 5 less than its square
√(p) ≥ p2 – 5
“at least” means the succeeding value is the minimum, which implies that it is either
equal to it or greater
“less than” implies subtracting the preceding value from the succeeding. If it succeeds a
linking however, the preceding value is lower than the succeeding one.
To clarify:
x subtracted by y
x–y
x subtracted from y
y–x
x less than y
y–x
x is less than y
x<y

The Language of Sets


A set is a Many that allows itself to be thought of as a One.
Georg Cantor
 
Use of the word set as formal mathematical term was introduced in 1879 by Georg
Cantor (1845-1918).
A set is a collection of distinct objects. This means that {1,2,3} is a set but {1,1,3} is not
because 1 appears twice in the second collection. The second collection is called
a multiset. Sets are often specified with curly brace notation { }.
The set of even numbers can be written:
{2,4,6,8,…}
The opening and closing curly braces denote a set, the numbers or objects inside the
braces are called elements. The symbol …  is called ellipsis and read “and so forth”
meaning that the set of even numbers are infinite.
Notation:
A. The Roster Notation.
 If S is a set, the notation x ∈ S means that x is an element of S. The notation x ∉ S means that x
is not an element of S. A set may be specified using the set-roster notation by writing all of its
elements between braces.
For example, {1,2,3} denotes the set whose elements are 1,2, and 3. A variation of the
notation is sometimes used to describe a very large set, as when we
write {1,2,3,..,100} to refer to the set of all integers from 1 to 100.
Examples:
            A= {1,2,3,4}                 B= {p,h,i,l,n,e,s}                      C = {5, 10, 15,…}
B. The Verbal Description Method.
It is a method of describing a set in words. We can describe the sets named in number.
Examples are Set A is the set of counting numbers less than 5; Set B is the set of letters
in the word “Philippines”; Set C is the set of positive multiples of 5.
C. The Set-Builder Notation
            It is a method that lists the rules that determines whether an object is an element
of the set rather than the actual elements.
Examples:
A= {x | x is a counting number less than 5} read as “ the set of all x’s such that x is a
counting number less than 5”. The vertical bar after the first x is translated as “such that”
B= {x | x is a letter in the word “Philippines”}
C={x | x is a positive multiple of 5}
D= {x ∈ Z | x is odd, x < 10} read as “ the set of all x’s, where x is an element of integers
such that x is odd and x is less than 10”
Set-builder on the other hand requires your knowledge in Mathematical
syntaxes. Here are common symbols we use in set-builder
∈          element of
∉          not an element of
s.t. or |  such that
∀          for all
∃          there exists
ℝ         set of real numbers
ℚ         set of rational numbers
ℤ          set of integers
ℕ         set of natural numbers
∪          union of
∩          intersection of
            A superscript + or – on the  ℝ,  ℚ, or  ℤ means positive or negative,
respectively. For example,
ℝ+ means the set of positive real numbers
ℤ- means the set of negative integers

Definition: Empty Set


The empty set is a set containing no objects. It is written as a pair of curly braces with
nothing inside {  } or by using the symbol ∅.
As we shall see, the empty set is a handy object. It is also quite strange. The set of all
humans that weigh at least eight tons, for example, is the empty set. Sets whose
definition contains a contradiction or impossibility are often empty.
            Example: Is {0} = 0?
            Answer: {0} ≠ 0 because {0} is a set with one element, namely 0, whereas 0 is
just a symbol that represents the number zero.

Definition: Universal Set


            The universal set, denoted by U, at least for a given collection of set
theoretic computations, is the set of all possible objects.
            If we declare our universal set to be the integers then {1/2 , 2/3} is not a well -
defined set because the objects used to define it are not members of the universal set.
The symbols {1/2, 2/3} do define a set if a universal set that includes 1/2 and 2/3 is
chosen.

Definition: Cardinality of Set


            The cardinality of a set is its size. For a finite set, the cardinality of a set is the
number of members it contains. In symbolic notation the size of a set S is written |
S| or n(S), n denotes cardinality. We will deal with the idea of the cardinality of an
infinite set later.
Examples:
Find the cardinality of each set:

1. S = {1,2,3}
2. T = {1,1,2,3,3,3}

Solution:

1. For the set S = {1,2,3} we show cardinality by writing |S|= 3 or n(S) = 3.

2. For the set T = {1,1,2,3,3,3}, the cardinality of set T is |T| = 3. Although there are 6
elements in the set 1 and 3 are repeated element, therefore there are only 3 unique
elements. The set { 1,1,2,3,3,3} is still the set {1,2,3}

Definition: Equal Set and Equivalent Set


            We say two sets are equal if they have exactly the same elements.
Example 1:
 If S = {1,2,3} then 3 ∈ S and 4 ∉ S. The set membership symbol is often used in
defining operations that manipulate sets. The set T= {2,3,1} is equal to S because they
have the same members: 1, 2, and 3.
While we usually list the members of a set in a “standard” order (if one is available)
there is no requirement to do so and sets are indifferent to the order in which their
members are listed.
Example 2: Which of these sets are equal: A = {x,y,z}, B={z,y,z,x}, C= {y,x,y,z}, D=
{y,z,x,y)?
Answer: A,B,C, and D are equal set to each other. All sets have exactly the same
elements: x, y, and z. A,B,C and D are simply different ways to represent the same set.
We can say that A=B=C=D
Two sets that contains exactly the same number of elements are called equivalent
sets. If we are given A = {1,2,3,4} and B = {m,a,t,h}, we can say that set A is equivalent
to set B (A≈B). Both sets contain four elements; hence, they are equivalent.

Subsets
If A and B are sets, then A is called a subset of B, written A ⊆ B, if and only if, every
element of A is also an element of B.
            Symbolically:
            A ⊆ B    means that - for  all elements x , if x ∈ A then x ∈ B (if x is an element of
A, then x is an element of B)
The phrases A is contained in B and B contains A are alternative ways of saying that A
is a subset of B.
Example 1: What are the subset(s) of A = {a,b,c}?
Solution: If A = {a,b,c} then A has eight different subsets:
∅      {a}       {b}       {c}
{a,b}      {a,c}    {b,c}  {a,b,c}
Notice that A ⊆ A and in fact each set is a subset of itself. The empty set ∅ is a subset
of every set.
Example 2: Let A be the set of positive integers and set B be all integers greater
than or equal to zero but less than 100. Is B ⊆ A?
Solution: False. Zero is not a positive integer. Thus zero is in B but not in A, so B is not
a subset of A.

Proper Subset
                   Set A is a proper subset of set B, written as A ⊂ B, if there is at least one
element in B not contained in A.
Example: Consider the sets A = {a,b,c} and B = {a,b,c,d}. We can say that A ⊂ B since
each element in A is also an element in B, and there is at least one element in B that is
not contained in A. We cannot say that B ⊂ A because d is an element of B, but d ∉ A.
Hence B is not a proper subset of A. 

Operation on Sets
In arithmetic, we have operations such as addition, subtraction, multiplication, and
division that enable us to combine numbers. In sets, we have the intersection, union,
difference, and complement of a set.
Intersection of Sets
The intersection of two sets S and T is the collection of all objects that are in both
sets.
It is written S ∩ T.  The symbol ∩ is a special math symbol called upside down cap, it
usually represents intersection of sets.  Using curly brace notation
S ∩ T = {x : (x ∈ S) and (x ∈ T)}
The symbol and in the above definition is an example of a Boolean or logical operation.
It is only true when both the propositions it joins are also true. It has a symbolic
equivalent ∧. This lets us write the formal definition of intersection more compactly:
S ∩ T = {x : (x ∈ S) ∧ (x ∈ T)}
Example:
Given: A = {1, 2, 3, 4, 5, 6} , B = {2, 4, 6} and C = {1, 3, 5, …}
            Find: a.) A ∩ B        b.) A ∩ C        c.) B ∩ C
Solutions:
a. The elements in A that are also in B are 2, 4, and 6. Hence, A ∩ B = {2, 4, 6}
b. The elements of A that are also in C are 1, 3, and 5. Hence, A ∩ C = {1, 3, 5}
c. Examining sets B and C, we see that there are no elements common to both.
Therefore,
B ∩ C = { } or   B ∩ C = ∅
If A and B are sets and A ∩ B = ∅ then we say that A and B are disjoint, or disjoint sets.
Therefore, in the example above B ∩ C is a disjoint set.
 
UNION OF SETS
The union of two sets S and T is the collection of all objects that are in either set. It is
written S ∪ T. Using curly brace notion
S ∪ T = {x : (x ∈ S) or (x ∈ T)}
The symbol or is another Boolean operation, one that is true if either of the propositions
it joins are true. Its symbolic equivalent is ∨ which lets us re-write the definition of union
as:
S ∪ T = {x : (x ∈ S) ∨ (x ∈ T)}
Example: Suppose P = {1, 2, 3},  Q = {1, 3 ,5}, and R = {2, 3, 4, 5}
 Then:
P ∪ Q = {1 ,2, 3, 5}          P ∪ R  = {1, 2, 3, 4, 5}        and     Q ∪ R  = {1, 2, 3, 4, 5}
 
COMPLEMENT OF A SET
The complement of a set S is the collection of objects in the universal set that are not
in S. The complement is written Sc or S’ however, it should be apparent that the
complement of a set always depends on which universal set U is chosen.
Example:
            Given U = {1, 2, 3, 4, 5},        A = {1, 3, 5}                 B= {1, 5}          and C={  }
            Find:   a. Ac                     c. Cc                           e. (A ∪ B)c
                       b. Bc           d. (A ∩ B)c                        f. (Ac ∩ Cc)
 
Solutions:
a. The complement of A is the set of elements in U but not in A. These elements are 2
and 4. Thus, Ac = {2, 4}
b. Bc = {2, 3, 4}
c. Cc = {1, 2, 3, 4, 5} = U
d. (A ∩ B)c
    A ∩ B = {1,5}
Thus, (A ∩ B)c = {2, 3, 4}
e. (A ∪ B)c
      A ∪ B = {1, 3, 5}
      Thus, (A ∪ B)c = {2, 4}
f. (Ac ∩ Cc) = {2, 4}
 
SET DIFFERENCE
The difference of set S and T, written as S – T, is a set of elements in S that are not in
T.
Since complementation is done before intersection the symbolic definition of the
difference of sets can be rewritten:
S − T = {x : x ∈ S ∩ Tc}
If we were to take the set operations
A ∪ B ∩ Cc
and put in the parenthesis we would get
(A ∪ (B ∩ (Cc)))
Example:
Given: A = { r, o, y, g, b, i, v}                      B = {r, y, b}, find A – B.
Solution:
            Taking A and subtracting B means that elements in A that are not B. Thus,
A – B = { o, g, i, v } 
Notice how intersection and complement can be used together to create the difference
operation and that the definition can be rephrased to use simple operations. There is a
set of rules that reduces the number of parenthesis required. These are called operator
precedence rules.

 Other things being equal, operations are performed left-to-right.


 Operations between parentheses are done first, starting with the innermost of
nested parenthesis.
 All complement are computed next.
 All intersections are done next.
 All unions are performed next.
 Tests of set membership and computations, equality or inequality are performed
last.

Cartesian Product
Given sets A and B, the Cartesian product of A and B, denoted as A x B and read as “A
cross B” is the set of all ordered pairs (a,b), where a is in A and b is in B.
Symbolically;
                        A x B = { (a,b) | a ∈ A, and b ∈ B}
Example:
Let A = {1, 2, 3} and B = {u, v}
Find:

1. A x B
2. B x A
3. B x B

Solutions:

1. A x B = {(1,u), (2,u), (3,u), (1,v), (2,v), (3,v)}


2. B x A = {(u, 1), (u, 2), (u, 3), (v, 1), (v, 2), (v, 3)}
3. B x B = {(u,u), (u,v), (v,u), (v,v)}

Venn Diagrams
A Venn diagram is a way of depicting the relationship between sets. Each set is shown
as a circle and circles overlap if the sets intersect.
The following are Venn diagrams for the intersection and union of two sets. The shaded
parts of the diagrams are the intersections, unions, complements and difference,
respectively.

Example: On a Venn diagram, shade the region(s) corresponding to A ∪ B′.


Solution:
To shade the set we need to compare the Venn diagram for A with the Venn diagram
for B′, and bear in mind the meaning of union.

We combine these two Venn diagrams using set union. This means that any region that
is shaded in either of the diagrams above will be shaded in A ∪ B′

Application of Venn Diagram


Example 1: Out of 50 students, 20 are members of the Math Club and 34 are members
of the Forensic Club. If 8 are in both clubs, how many students are in a) neither of the
clubs and b) either clubs?

You might also like