Functions Inc Transformations Notes
Functions Inc Transformations Notes
We have seen and used the notation f (x) many times, but not given a formal definition to the
notion of a function; we do so now.
A is known as the domain and Bas the co-domain. The set of images of a , i.e. { f ( a ) :a ∈ A } is a
subset of B ,sometimes written as f ( A ). This is known as the range.
Note that this is a very broad definition. At this stage we may associate an element a ∈ A with a
unique b ∈ B or multiple elements of B. If we associate a with more than one value of b , the
mapping is called one to many. If instead multiple values in A are associated with the same b , we
call the mapping many to one. A function is defined as follows:
A function from A to B is a mapping such that all elements of A are uniquely associated with some
b ∈ B.
Thus, a mapping may fail to be a function if a has multiple images; if a has no images, we don’t even
have a mapping.
Subtle question: what is the difference between the co-domain and the range?
This last function is known as the divisor function, denoted τ (n), and has some prominence in
Number Theory. Can you justify the statement about the range (see the appendix)?
Note that we are not saying that each image comes from distinct elements in the domain, i.e.
f ( x )=f ( y ) ⇏ x= y . E.g. f : Z → Z , f ( x )=x 2. Then f ( 1 ) =1=f (−1 ).
We will now assume that all domains and co-domains are R unless otherwise specified. Consider
1
f ( x )=. Is this a function? No – it isn’t defined for x=0 . We must amend the domain to (for
x
example) x ∈ R−{0 }, which means “reals without 0”. We could also write (−∞ , 0 ) ∪(0 , ∞ ).
Another example would be f ( x )= √ x , which requires x ≥ 0 . When finding ranges, it can be useful to
think in graphical terms, or to consider transformations of known graphs. Here are some common
examples. We shall assume that n ∈ N :
Graphs:
Composite functions: Consider two functions
f : A → B , g : B→ C
3 x +1 5
(iii) Given that f ( x )= , x ≠ , find g(x ) such that fg ( x )=x . What is gf ( x ) ?
2 x−5 2
Sol:
We write g ( x )=f −1 ( x ) , the inverse function of f ; it returns the output of f to the original input.
There is a proviso: f needs to be one-one i.e. everyone value in the range must come from only one
value in the domain. If f is not one-one, we can restrict the domain to make it so; there may be
more than one way to do this however.
2
e.g. f : R → R , f ( x )=x + 4 x−5
We can write f ( x )= ( x +2 )2−9 ,so that x=± √ f + 9−2; not one-one. We can choose
f ( x )= √ x +9−2, if we restrict the domain of f to x ≥−2, or f −1 ( x )=−√ x +9−2, corresponding
−1
to x ≤−2. This is shown in the diagram above. Furthermore, we can see that for the inverse
function, we are swapping the input and output, i.e. y and x . Geometrically, this corresponds to
reflecting in the line y=x . In this case, y=f (x ) meets y=f −1 ( x ) on the line y=x . In general, y=x
and y=f ( x ) ⇒ x=f ( x ) ⇒ f −1 ( x )=f −1 f ( x )=x , so that f ( x )=f −1 ( x ). Thus, intersections of y=f
with y=x are also intersections of y=f −1 ( x ) and y=f (x ). The converse is not true: e.g. f ( x )=−x
has inverse f −1 ( x )=−x, i.e. f ( x )=f −1 ( x ) everywhere, but clearly not all the corresponding points
are on y=x .
Nevertheless, solving x=f (x) or x=f −1 (x ) is likely to be easier than solving f ( x )=f −1 (x ). In the
above
x=f ( x )
2
⇒ x=x +4 x−5
2
⇒ 0=x + 3 x −5
−3 ± √ 29
⇒ x=
2
Which solution we have depends on the domain of f . Now consider solving f ( x )=f −1 (x ) directly.
x + 4 x−5=√ x+ 9−2
2
−3 ± √29
x= , 0 ,−5
2
Only one is valid. This was rather more work!
Transformations of functions:
Algebraic transformations correspond to geometric ones. We shall use the following function to
demonstrate, considering the effect on the points marked:
2) af (x). We are multiplying each y -value by a , thus we have a stretch, scale factor a in the
y -direction (or “parallel to the y -axis”). e.g. a=1.5
If a is negative, we are changing positive y -values to negative (and vice versa), which corresponds to
reflecting in the x -axis, or y=0 line. e.g. a=−1
3) f (x+ a). This may be less obvious. Consider the point (−2 , 1) . This tells us that f (−2 )=1.
To obtain the same output for f (x+ a), we can input x=−2−a: f (−2−a+ a )=1. Thus, we
have a translation by (−a0 ). This may be the opposite of intuition. e.g. a=1
4) f ( ax ). The corresponding point to (−3 , 1 ) will be ( −3a ,1), since f (a (−3a ))=f (−3 )=1.
x
Thus, we need instead of x as our input in order to obtain a given y -value, so we have a
a
1
stretch in the x -direction, scale factor . e.g. a=2
a
If a is negative, we also reflect in the y -axis, or the x=0 line. e.g. a=−1
We need to be careful when considering combinations of transformations (composite functions). For
“ y transformations, we follow BIDMAS. For x , as with the above, we reverse the order. x and y
transformations can be interchanged in order. This can be seen as follows:
y=f ( ax +b )
Rearrange for x
ax +b=f −1 ( y )
−1
f ( y )−b
⇒ x=
a
If we rename the variables, switching x to Y and y to X , we get
−1
f ( X )−b
Y=
a
This is now a “Y ” transformation of Y =f −1 ( X ) and represents a translation −b units in the Y
1
direction, then a stretch s.f. in the Y direction. Putting x for Y gives the expected result.
a
e.g. y=3 sin ( 2 x−90 )+ 1. The y transformations are a stretch s.f. 3 and a translation by (01) (in
that order). The x transformations are a translation by (900) and a stretch s.f. 12 (in that order). We
can combine the translations to translation (901) . This is illustrated below:
3 sin ( 2 x −90 ) +1
Note that some functions have algebraic properties that mean that seemingly different
transformations can give the same effect.
e.g. 1) y=x 2 transformed to y=4 x 2 could be regarded as a stretch, s.f. 4 in the y direction.
1
However, we could also write y=4 x 2 as y= ( 2 x )2; this is a stretch, s.f. in the x direction.
2
|x|=√ x 2
Or equivalently,
{−xx xx≥<00
e.g. |3|=3 ,|−3|=3
Thus, the mod function on the LHS is “doing nothing”: it’s the |x|=x portion, but on the other side it
changes the sign of the input: it’s the |x|=−x version of the function. We can check the other value:
LHS ¿ 2
|( ) || |
4
3
+3 =
17 17
3
= , RHS ¿ 5
3
4
3
−1 =
|( ) || |
17 17
3
= . In this case, the mod function is the
3
|x|=x version. We can see that either the modulus function does the same thing to each
expression, or that it does the opposite, i.e. it changes one sign but not the other. This means that
we could have written 2 x+3=5 x−1 or 2 x+3=−( 5 x−1 ) , which leads to the same values.
Graphically,
We see that the intersections are on the “positive” branch of y=|2 x +3| and both of y=|5 x −1|
3) |2 x+ 5|+1=|3 x −1|.
Define f : R → { 0 , 1 } by f ( x )= {10xxisisrational
irrational
What would this look like? There are an infinite number of rationals, so would it look like a
horizontal line through the origin? But there are an infinite number of irrationals (more?), so
perhaps a horizontal line through 1. Would it look like both? What if we “zoom in”? In any given
interval between two rational numbers, there are an infinite number of irrationals, so y=1 ? But
between any two irrationals there are an infinite number of rations, so y=0? This also raises
continuity issues: there appear to be “jumps” everywhere.
{
0 x is rational
Define g : R → {0 , 1 } by g ( x )= 1
x is irrational
n
With this version, the “jumps” get ever smaller, so that the function “tends” towards zero.
Arithmetic functions:
These are functions from N →C . They often feel quite different from other functions; our example
τ is one such. Recall that we said that the range was N . This can be proved by considering the prime
factorisation of n :
k
n=∏ pia i
i=1
Here Π is notation for “product”, like Σ for sum. pi are the different primes, a i the corresponding
powers. A factor will occur precisely when we make a (natural number) choice for each prime from
k
the interval [ 0 , ai ], thus there are ∏ ( ai +1 ) such. We may simply chose 2n−1 ,which will have
i=1
n−1+1=n factors.
Notice also that ∃ a ,b ∈ N s.t. τ ( ab )=τ ( a ) τ ( b ) (we say that τ is multiplicative for a and b . Can you
see a condition on a and b that will ensure this property (momentary pause….)?
( a , b )=1, i.e. they are coprime. This is common in arithmetic functions and those that satisfy the
above property for ( a , b )=1 are known simply as multiplicative. Some work ∀ a , b and are
completely multiplicative.