Functions, Definitions, Properties


A Function is a special kind of relation between two sets. In a way, we could say that it is a well behaved relation since, to be a function, a relation has to follow a rigid rule.

Say we have the relation . It is not a function since whenever we substitute a number, say 9, for x, we get two real values for y. If we plug in x = 9, y will equal +3 or – 3.
It's the or that makes this a relation -- but not a function.

A function is a relation defined on a domain set and a range set

such that for each element of the domain, there is

one and only one corresponding element in the range.

A range element is called an image.

Since in our relation , there will always be two values for y when we substitute a single x-value, this is not a function. We could make it a function however by eliminating the plus or minus sign before , or by adding y > 0 to the defining statement.

So, is a function since the defining statement rules out the possibility of getting two values for y when we substitute a single value for x.

Now, if we set x = 4, y can only equal 2, since y cannot be negative(y > 0).

Thus, for a relation to be a function, there must never be more than one possible value for y obtained from substitution of a single x value. If the answer is this OR that, the relation is not a function. There can be no choice about the range element once we've chosen a domain element if the relation is a function.

We can compare a function to a machine or transformer, into which we drop x-values, then crank the handle to pop out y-values.

Our machine is not functioning if it pops out
more than one
y-value from a single input x-value.

Example 1

Which of the following relations are functions?

(a) A = {(1, 0) (1, 2) (2, 3) (2, 5)} (b) B = {(0, 1) (1, 2) (2, 3) (3, 4) (4, 5)}
(c) y = 2x + 3; (d) y = 3 (e) x = 7


(a) A is not a function since x = 1 is paired with 2 y-values 0 and 2.

(b) B is a function since each x value is paired with exactly one y value.

(c) This is a function as there is only one value for 2x + 3 for each x value.

(d) Since this relation can be written as y = 3x 0, (recall that x 0 = 1) this is a function.

(e) x = 7 is a straight line parallel to the y-axis. Every value of y between and ,

The Vertical Line Test for a Function

Since we know that a function is a relation in which each x value is paired with
one and only one
y value, and since we know that when we graph a relation on
the coordinate plane, the x values are represented by vertical lines,
we can state the following:

If no vertical line intersects the graph of a relation
at more than one point,
that relation is a function.


Example 2

Check these graphs with a vertical line (x-value) to determine if they represent functions.


(a) and (d) are functions: any vertical line (x value) crosses them once and only once.

(b) and (c) are not functions: a vertical line (x value) crosses them twice, which means that a single x value produces two y values.

This relation is not well behaved. The machine ain't functioning here, which of course knocks this relation right out of the functions club.


functions notation domain
piecewise defined practice solutions


Function Notation

Functions are generally named by letters such as f, g, or h.
The correct form of the notation is f (x), g (x) or h(x), which we read f of x, g of x, or h of x.
So, instead of writing y = 4x – 7, we write f (x) = 4x – 7.

The y value associated with any x value is now called f (x).

The ordered pairs of this function are denoted as (x, f (x)).

As we can see, f (x) is simply an alias for y.

If we go to back to the idea of a function being a machine, we can call the x-values (domain elements) the input and the f (x) values (range elements) the output. Since the machine is a function, we will get one and only one f (x) each time we input a single x-value.

f(x) is just an alias for y

Example 3

If f (x) = 3x + 4, find:

a) f (0) b) f ( – 3) c) f (2) d) f (a) e) f (2m – 1)


a) f(0) = 3(0) + 4 = 4 b) f (–3) = 3(–3) + 4 = –5 c) f (2) = 3(2) + 4 = 10

d) f (a) = 3a + 4 e) f (2m – 1) = 3(2m – 1) + 4 = 6m + 1

Example 4

If g (x) = 2x2x + 1, find:

a) g(0) b) g(– 4) c) g(x + h) d) g(½)


a) g(0) = 2(0)2 – 0 + 1 = 1 b) g(– 4) = 2(– 4)2 – (– 4) + 1 =
32 + 4 + 1 = 37
c) g(x + h) = 2(x + h)2 – (x + h) + 1 =
    2(x2 + 2hx + h2) – xh + 1 =
    2x2 + 4hx + 2h2xh + 1
d) g(½) = 2(½)2 – (½) + 1 = 1


By now we should see the pattern:

f (x) defines a rule of what to do to the variable captured in the brackets.

So, if f (x) = 5x, then f (a) = 5a and f (x 3 + 7x 2 – 9x + 3) = 5(x 3 + 7x 2 – 9x + 3)

This rule f tells us to multiply by 5 anything caught in the bracket.


If g (x) = – 3x 2 + 7x – 1 then g(ah) = – 3 (ah) 2 + 7 (ah) – 1

Notice we perform exactly the same operations on (ah) as we do on (x) in the rule.

This function says to square the bracket guy and multiply it by – 3

then add 7 times the bracket guy and subtract 1.

So g(lump) = – 3 (lump) 2 + 7 (lump) – 1


Think of the brackets ( ) as a click here block like this

enter user ID

a place holder, the blanks in a website form where we enter our password or e-mail address to gain access to hotmail or whatever. The function is applied when we hit Return.
Each unique password or e-mail address (variable) is processed by a set of instructions or programs -- functions. In most cases, the 1st function searches the site's database to verify our user name and password, and the next function either lets us in or sends us back to the sign in page. On the web, we call these functions java scripts. Some of them perform the auto-responder function which automatically sends us an e-mail to confirm a subscription or a bid on E-bay. The word script is appropriate. A script is a list of actions that actors must do and say to act out or perform the play -- the processes and events which lead to a conclusion. That's what a function is.


functions notation domain
piecewise defined practice solutions

The Domain of a Function

In a function such as f (x) = 3x + 2, we refer to x as the independent variable, and f (x) as the dependent variable. This is because the value we get for f (x), (an alias for y), depends on the value we input for x. For instance, if we input x = 2, f (x) = – 4.

In a function such as g(z) = z2 1, z is the independent variable and f (z) is the dependent variable. Once we choose a value for z, f (z) is set -- but our choice for z is independent of f.

The domain of a function is the set of all elements,
real numbers, or values that are
meaningful replacements for the independent variable.


Let's consider the word meaningful. In a function such as , negative real numbers would not be meaningful replacements for x since we cannot take the square root of a negative number when working in R, the set of real numbers.

The domain of this function is ; all real numbers greater than or equal to zero.

Similarly, for the function , the independent variable s can not take on a value that is less than – 3 or greater than 3, since these values would cause 9 – s2 to be negative.

When we are asked to define the domain set of a function there are really two situations we must consider carefully.

For rational functions, we must eliminate from the domain all values of the independent variable which make the denominator equal zero.

For instance, if we consider the function


we must state that t = 5 is not in the domain since it would make the denominator equal to zero. Our statement would read: the domain set for f (t) is .

This means we can substitute t = any real number except 5 to generate a valid value for f (t).

The other situation in which we must be careful to define the domain set is for functions involving even roots, such as a square root or a 6th root. Since we cannot take even roots of negative numbers when working in the Real numbers, we must eliminate all values of the independent variable s which cause the rooted expression to become negative.

Say we have to determine the domain set of .
If s 2 is less than 25, the difference s 2 – 25 will be negative.
For instance, say we set s = 2. Then s2 – 25 would be – 21.

Since there is no real number equal to the square root of – 21,

2 is not a meaningful replacement for s.

The way to deal with this is to state that the expression under the even root sign
is greater than or equal to zero (positive); then solve the inequality.

Trig, exponential and log functions amongst others also have restricted domains by their natures. For instance, we can't take the log of zero or of a negative number, so any log function rule of correspondence must include a statement restricting the domain values to those which make the argument positive -- like this: f (x) = 2 log 3 (x – 5) + 7; x > 5 .

When x = 5 or x < 5, the argument (x – 5) becomes 0 or negative, so the domain
must be defined as x > 5. In a java script, the domain restrictions are called field or control criteria. This property defines the meaningful replacements for the field data.


Example 5

Determine the domain set for:

a) b) c) d)


a) b) c) d)


We can also write the solutions for parts (c) and (d) in interval notation.

The solutions in this case would be:

c) [–2 , 2],

d) where ( means the end value is not included and [ means the end value is included.

For more on Domain and Range, see lesssons on specific functions such as the quadratic, absolute value or rational function, in this MathRoom.


functions notation domain
piecewise defined practice solutions

Piecewise Defined Functions

Piecewise defined functions are functions which are defined with different rules over specified intervals of their domain. Postal rates and car rental rates are such functions since postal rates change with different weights and car rental rates vary for different rental periods. You don't pay the same rate when renting a car for a month as you do when renting for a day.

For example,

is a piecewise defined function.

Notice that the domain is defined over three pieces, chunks or intervals:

  1. x values less than or equal to 0,
  2. x values between 0 and 2 inclusive, ( 0, 2] and
  3. x values greater than 2,

    Here is the graph of this function:

    Notice the open circle at (2, –2). This is because
    the third part of the domain is defined on all values
    of x which are greater than 2 but not = 2,
    so we indicate that the point (2, – 2) is not included on the line f (x) = 2x – 6.

    Also notice that the function is defined differently over each of these intervals. When we graph it, we must respect the pieces or chunks of the domain stated in the function rule. In other words:

    if x = – 3, f (x) must be 4, since – 3 < 0 and f (x) = 4 for all x less than or equal to 0.

    if x = 1, we'll substitute 1 into 4 – x 2 = 4 – (1) 2 = 3

    because 1 lies on the 2nd chunk of the domain ] 0, 2] defined in the function rule.

    To find f (3), we'd plug 3 into 2x – 6 to get 0,

    since 3 > 2 -- and the 3rd part of the domain is all numbers greater than 2.

    There is a piecewise defined function known as the greatest integer or step function,
    denoted f (x) = INT(x) or f (x) = [x], which has applications in calculus and other branches of mathematics.

    If f (x) = INT(x), then f (x) = the greatest integer which is less than or equal to x.

    For example, [3.8] = 3, [– 4.2] = – 5 and [7] = 7.

    As we can see, the value of f (x) is always equal to the integer which occurs left of the value of x on the number line unless x is itself an integer. Then f (x) = x.

    Here is the graph of the basic greatest integer or step function.

    As we can see, the function moves in steps with the initial point of each step included in the function whereas the terminal point of each step is not included. The parameters a and b, of the particular function rule determine which end value is included and which are not and if the steps go up or down. The defining statement of this function has an infinite number of entries.
    That is:



    functions notation domain
    piecewise defined practice solutions


    1) If f (x) = 3x 2, and g(x) = x2 9; find:

    a) f (3) b) g(2) c) f (2) + g( 1) d) f (a + h) e) g (2a 3)


    2) Find the domain of:

    a) f (x) = 3x + 5 b) c)
    d) e)  


    a) find f (7), f (1), f (0), f (6).

    b) graph this function.

    4) Define a piecewise function f (x) to describe the picnic table in the diagram.


    functions notation domain
    piecewise defined practice solutions


    1) If f (x) = 3x – 2, and g(x) = x2 – 9; find:

    (a) f (3) = 3(3) – 2 = 7

    (b) g (–2) = (–2)2 – 9 = – 5

    (c) f (2) + g( – 1) = 3(2) – 2 + [(–1)2 – 9]= 6 – 2 + (–8) = – 4

    (d) f (a + h) = 3(a + h) – 2 = 3a + 3h – 2

    e) g(2a – 3) = (2a – 3)2 – 9 = 4a2 – 12a


    2) Find the domain of:

    a) f (x) = – 3x + 5;

    b) ; 4 – k2 > 0 so – 2 < k < 2;


    but x = 5 makes the demominator = 0 therefore




    a) find:

    f (–7) = – 2 f (1) = – 1 f (0) = – 2 f (6) = 4

    b) graph this function.


    4) (see diagram)


    functions notation domain
    piecewise defined practice solutions

    ( Functions MathRoom Index )

    MathRoom Door

    (all content © MathRoom Learning Service; 2004 - ).