relation n function notes
relation n function notes
SciAstra
1 Introduction
In this chapter, we will study relations and functions. These concepts are fun-
damental to many areas of mathematics and have important applications in
computer science, physics, economics, and other fields.
2 Relations
In mathematics, we frequently use the term ”relation.” A relation is a math-
ematical concept that describes the connection between two or more objects..
Relations are critical in algebra, geometry, calculus, and other areas of mathe-
matics.
A relation is a set of ordered pairs. We use the notation a ∼ b to indicate
that (a, b) is an element of the relation. For example, consider the set of all
pairs of integers where the first integer is less than the second:
R = {(a, b) | a, b ∈ Z, a < b}
Here, Z denotes the set of integers. We can also represent this relation using a
graph, where each integer is a node and there is an arrow from a to b if a < b.
Solution:
The relation R from A to B can be defined as follows:
R=(2,x),(2,y),(2,z),(1,a),(3,a),(2,e),(3,e),(2,i),(1,o),(3,o),(2,u),(3,u)
3 Types of Relations
There are several types of relations that we can define. Some of the important
ones are:
1
3.1 Reflexive Relation
A relation R is reflexive if (a, a) is an element of R for all a in the domain. For
example, the relation ≤ on the set of real numbers is reflexive because a ≤ a for
all a.
3.1.1 Properties
Reflexive relations have several important properties, some of which are:
Idempotent
A reflexive relation R is idempotent, which means that R ◦ R = R. Here,
R ◦ R represents the composition of R with itself, i.e., R ◦ R = {(a, c) ∈ A × A |
∃b ∈ A such that (a, b) ∈ R and (b, c) ∈ R}.
For example, let A = {1, 2, 3} and R = {(1, 1), (2, 2), (3, 3)}. Then, we have
R ◦ R = {(1, 1), (2, 2), (3, 3)} = R. Hence, R is idempotent.
3.1.2 Applications
Reflexive relations have many applications in various fields of mathematics and
computer science. Some examples include:
Example:
Let A = 1, 2, 3 and B = a, b, c. Define a function f from A to B such that
f (1) = b, f (2) = a, and f (3) = c. Is the function symmetric?
Solution:
The function f from A to B can be defined as follows: f(1)=b, f(2)=a, f(3)=c
2
To check if f is symmetric, we need to see if (a, b) ∈ f implies (b, a) ∈ f for
all a, b ∈ A. Since f (1) = b and f (2) = a, we have (a, b) ∈ f . But f (1) = b and
f (2) = a do not satisfy f (2) = b and f (1) = a, so (b, a) ∈ / f . Therefore, the
function f is not symmetric. Applications:
Symmetric relations have many applications in various fields of mathematics
and computer science. Some examples include:
Example:
Let A = 1, 2, 3, 4 and B = a, b, c. Define a function f from A to B such that
f (1) = b, f (2) = a, f (3) = b, and f (4) = c. Is the function transitive?
Solution:
The function f from A to B can be defined as follows:
f(1)=b, f(2)=a, f(3)=b, f(4)=c
To check if f is transitive, we need to see if (a, b) ∈ f and (b, c) ∈ f implies
(a, c) ∈ f for all a, b, c ∈ A. Since f (2) = a and f (1) = b, we have (a, b) ∈ f .
Similarly, since f (3) = b and f (4) = c, we have (b, c) ∈ f . But f (2) = a and
f (4) = c do not satisfy f (2) = c, so (a, c) ∈
/ f . Therefore, the function f is not
transitive.
Example:
Let A = a, b, c and B = 1, 2, 3. Define a function f from A to B such that
f (a) = 1, f (b) = 2, and f (c) = 3. Is the function transitive?
Solution:
3
The function f from A to B can be defined as follows:
f(a)=1, f(b)=2, f(c)=3
To check if f is transitive, we need to see if (a, b) ∈ f and (b, c) ∈ f implies
(a, c) ∈ f for all a, b, c ∈ A. Since f (a) = 1 and f (b) = 2, we have (a, b) ∈ f .
Similarly, since f (b) = 2 and f (c) = 3, we have (b, c) ∈ f . Also, since f (a) = 1
and f (c) = 3, we have (a, c) ∈ f . Therefore, the function f is transitive.
4 Functions
A function is a special type of relation where each input has exactly one output.
We use the notation f (a) = b to indicate that a maps to b under the function
f . For example, consider the function f : R → R defined by f (x) = x2 .
2 4
1 2 3
6
The arrow diagram shows that the domain of the function is 1,2,3, the range
is 2,4,6, and each element in the domain is mapped to a unique element in the
range.
4
4.1 Properties of Functions
Functions have several important properties that we need to be aware of. These
properties help us to analyze and manipulate functions in various ways.
(i) No it cannot be a function since the same input 3 gives two different outputs
(ii) Yes it is a function
Example: Figure out the domain where the following functions become equal:
x2 , 2x − 1
Solution:
x2 = 2x − 1
x2 − 2x + 1 = 0
(x − 1)2 = 0
Example:
Solution:
5
To check whether R is a function or not, we need to ensure that for every
element in A, there is only one image in B. In other words, there should be no
element in A that maps to more than one element in B. Let’s check:
(1, a) and (1, b) both map to 1, so this violates the definition of a function.
(2, c) and (3, d) both map to distinct elements in B, so they do not violate the
definition of a function.
y = x2 + 3x + 2
y − 2 = x2 + 3x
2
p the square: y − 2 + (9/4)
Completing p = (x + (3/2)) Taking square root: x +
(3/2) = ± (y − (1/4)) x = (−3/2) (y − (1/4)) p
Therefore, the inverse of f is given by f ( − 1)(x) = (−3/2) ± (x − (1/4)).
6
Note: To ensure that f has an inverse, we need to check that it is a one-
to-one function, i.e., that no two distinct elements in the domain map to the
same element in the range. This can be done by checking the discriminant
of the quadratic equation that defines f. In this case, the discriminant is
32 − 4(1)(2) = 1, which is positive, so f is invertible.
f
1 2
f-1
5 Conclusion
We have studied the fundamental concepts of relations and functions. We have
seen how to define and represent different types of relations, and how to analyze
the properties of functions. These concepts have wide-ranging applications and
are essential for further study in mathematics and related fields.