1.1 Functions and Relations Part 1
1.1 Functions and Relations Part 1
• relations
Topic Outline
• relations
• functions
Topic Outline
• relations
• functions
• domain and image of a relation (function)
Topic Outline
• relations
• functions
• domain and image of a relation (function)
• algebra of functions
Functions and Relations
Functions and Relations
A × B = {(a, b) : a ∈ A, b ∈ B }.
• domain of r : Dr = {a ∈ A : (a, b) ∈ r }
• image of r : Ir = {b ∈ B : (a, b) ∈ r }.
A × B = {(1, a), (1, b), (2, a), (2, b), (3, a), (3, c )}.
Let
r1 = {(1, a), (2, b), (3, a)} and r2 = {(1, b), (2, b)}.
Clearly, r1 , r2 ⊆ A × B. Moreover,
• r1 is a relation from A to B since Dr1 = {1, 2, 3} = A.
• The image of r1 is Ir1 = {a, b}.
• r2 is a relation between A and B
with Dr2 = {1, 2}, and Ir2 = {b}.
Remark
A relation can be thought of as a machine where the elements in the domain are
the inputs used to generate outputs.
For instance, the relation
can be thought of as a machine in which the inputs are any of the numbers 1, 2,
3. The machine has a rule that if the input is odd, the output is a and if the
input is even, the output is b.
Remark
A relation can also be described as a mapping that assigns elements of A to
elements of B. The figure below indicates relation r1 from A to B.
Remark
If A and B are subsets of R, then the relation can be described using equations
or inequalities, and can be represented as graphs in the Cartesian plane.
Example: Consider the relation s = {(x , y ) : x 2 + y 2 = 4}. Some elements
of the relations are given in the table below.
√ √
x −2 0 2 −√2 √2
y 0 ±2 0 ± 2 ± 2
y
(0, 2)
-
•2 s : x2 + y2 = 4
√ √ √ √
(− 2, 2) • - √2 • ( 2, 2)
-1 Ds = {x ∈ R : −2 ≤ x ≤ 2}
Is = {y ∈ R : −2 ≤ y ≤ 2}
(−2, 0) (2, 0)
• √
−2 − 2−1 1
√
•
2
x
2
- −1
√ √ √ √
(− 2, − 2) • - −√2 • ( 2, − 2)
(0, −2)
- −2
•
Remark
If a relation r is given in equation or inequality in terms of x and y , then
• To find the domain, solve for y in terms of x and restrict x so that y takes only
real values.
• To find the image, solve for x in terms of y and restrict y so that x takes only
real values.
1
Example: Given relation t = (x , y ) : y = . Find Dt and It .
x −1
Solution: Note that y is already in terms of x and is defined for all real numbers
except when x = 1 (i.e. when the denominator is zero). Thus,
Dt = R\{1}.
To determine the image of t, we express x in terms of y :
1
y= =⇒ y (x − 1) = 1
x −1
=⇒ xy − y = 1
=⇒ xy = y + 1
y +1
=⇒ x = .
y
Hence, x is defined for all real numbers except when y = 0. Thus,
It = R\{0}.
Example: Let w = {(x , y ) : x + y 2 = 4}. Find the domain and image of w .
x + y 2 = 4 =⇒ y 2 = 4 − x
√
=⇒ y = ± 4 − x .
Dw = {x ∈ R : x ≤ 4} = (−∞, 4].
Solving for x in terms of y :
x + y 2 = 4 =⇒ x = 4 − y 2 .
Clearly, x is a real number for any value of y , that is y can assume any real
value. Since there is no restriction on y , we have
Iw = R.
Functions
y = f (x ),
(x , y ) ∈ f =⇒ y = f (x ) = x 2 .
Note that f (2) = 4 and f (−2) = 4, that is (2, 4), (−2, 4) ∈ f . Thus, we say 4 is
the image of 2 and −2 under f or we can also say that −2 and 2 are pre-images
of 4 under f .
Remark
• In a function, no two ordered pairs have the same first component.
• Graphically, each vertical line must intersect the graph of a function at most
once. This is called the vertical line test.
• r1 is a function from A to B.
• r2 is not a function from A to B since Dr2 6= A. However, if C = {1, 2},
then r2 is as a function from C to B.
• r3 is not a function since the element 2 in the domain A is paired to more
than one element.
Example: The relation s : x 2 + y 2 =√4 in√the previous√example
√ is not a
function because the ordered pairs (− 2, √ 2) and (− 2, − 2) have the
same first component, that is the element − 2 in the domain has more than
one image.
Illustration:
Example: Consider g = {(x , y ) : x = y 2 − 4} whose graph is shown below.
Notice that (−3, 1), (−3, −1) are distinct elements of g which have the
same first components. Thus, g is not a function. This can be justified
further by the vertical line test.
y
x = −3
vertical line -2 x = y2 − 4
• (−3, 1) -1
(−4, 0)
•
−3 −2 −1 1 2 3
1
x
• (−3, −1) - −1
- −2
Remark
f : A → B is a function iff given (x , y1 ), (x , y2 ) ∈ f implies y1 = y2 .
(f + g )(x ) = f (x ) + g (x )
(f − g )(x ) = f (x ) − g (x )
(fg )(x ) = f (x )g (x )
f f (x )
(x ) = , g (x ) 6= 0.
g g (x )
Remark
In the previous definitions, x must be chosen such that both f (x ) and g (x ) are
defined. Thus,
Df +g = Df −g = Dfg = Df ∩ Dg
D f = (Df ∩ Dg ) − {x : g (x ) = 0}
g
2 1
Example: Given f (x ) = and g (x ) = , find f + g , f − g , fg
x +1 x −1
f
and g and determine the domain of each function.
2(x − 1) + 1(x + 1)
=
(x + 1)(x − 1)
2x − 2 + x + 1 3x − 1
= = .
(x + 1)(x − 1) (x + 1)(x − 1)
Hence,
3x − 1
(f + g )(x ) = , ∀x ∈ R\{−1, 1}.
(x + 1)(x − 1)
2 1
(f − g )(x ) = f (x ) − g (x ) = −
x +1 x −1
2(x − 1) − 1(x + 1)
=
(x + 1)(x − 1)
2x − 2 − x − 1 x −3
= = .
(x + 1)(x − 1) (x + 1)(x − 1)
Thus,
x −3
(f − g )(x ) = , ∀x ∈ R\{−1, 1}.
(x + 1)(x − 1)
2 1 2
(fg )(x ) = f (x ) · g (x ) = · = .
x +1 x −1 (x + 1)(x − 1)
Thus,
2
(fg )(x ) = , ∀x ∈ R\{−1, 1}.
(x + 1)(x − 1)
2
f f (x ) 2 2(x − 1)
(x ) = = x +1 = ·x −1= .
g g (x ) 1 x +1 x +1
x −1
f
For the domain of ,
g
D f = (Df ∩ Dg ) − {x : g (x ) = 0}
g
= R\{−1, 1} − {x : g (x ) = 0}
= R\{−1, 1} − {1} = R\{−1, 1}.
Thus,
f 2(x − 1)
(x ) = , ∀x ∈ R\{−1, 1}.
g x +1
√
Example: Let f (x ) = x + 3 and g (x ) = x 3 . Find 2f − g + 5 and
fg − f + g , and determine their domains.
Solution:
√
(2f − g + 5)(x ) = 2f (x ) − g (x ) + 5 = 2 x + 3 − x 3 + 5,
√ √
(fg − f + g )(x ) = (fg )(x ) − f (x ) + g (x ) = x 3 x + 3 − x + 3 + x 3 .
The function g assumes real values for any x ∈ R. Thus Dg = R. However, the
function f assumes real values only when the radicand x + 3 is nonnegative, that
is x + 3 ≥ 0 or x ≥ −3. Hence, Df = [−3, ∞).
√
Example: Let f (x ) = x + 3 and g (x ) = x 3 . Find 2f − g + 5 and
fg − f + g , and determine their domains.
Solution:
√
(2f − g + 5)(x ) = 2f (x ) − g (x ) + 5 = 2 x + 3 − x 3 + 5,
√ √
(fg − f + g )(x ) = (fg )(x ) − f (x ) + g (x ) = x 3 x + 3 − x + 3 + x 3 .
The function g assumes real values for any x ∈ R. Thus Dg = R. However, the
function f assumes real values only when the radicand x + 3 is nonnegative, that
is x + 3 ≥ 0 or x ≥ −3. Hence, Df = [−3, ∞).
Therefore, the domain of the functions 2f − g + 5 and fg − f + g is just the
intersection of Df and Dg . That is,