5 Functions

5.1 Defining Functions

Objectives:

  • Discover how sets can be used to define functions

  • Prove statements involving functions and their sets, including domain, codomain, and range

5.1.1 Review of Functions

Example 5.1.1.

Define each of the terms below:

Domain:

Blank space for you to write your work.

Codomain:

Blank space for you to write your work.

Range:

Blank space for you to write your work.

For the function below, give the domain, codomain, and range as sets:

x21122112
Blank space for you to write your work.

Example 5.1.2.

A social media company wants to map every user’s unique username (the domain called U) to the email address they signed up with (the codomain called E). The function f:UE maps a username to its corresponding email.

Could two different usernames be mapped to the same email address? Would this be a problem for the system? Discuss the pros and cons.

Blank space for you to write your work.

Say the company wants to make a “reverse lookup” feature that helps find a username associated with a given email. Given your answer to the previous question, what is a potential problem with this? What condition would need to be true about the origianl function f to guarantee the reverse lookup is unambiguous?

Blank space for you to write your work.

Anytime there is a relationship between two corresponding entities, we wish to find a function that describes exactly how the two entities are related.

An object falling with time: we know that a(t)=9.8 meters per second squared, which helps us calculate position when giving an initial position and velocity. The subject of physics survives on understanding relationships between physical entities.

Profit changing with different investments: If you invest more in gold than in stocks, what can you expect your money to do in the short-term? What about the long-term? Financial analysts need these functions to better inform their clients. Specifically, the subject of optimization handles finding maximum revenues and minimum costs given certain constraints.

We have already seen as well how functions can describe entire business processes. Our society survives based on the power of the functions it exploits. As mathematicians it behooves us to be very knowledgeable about how to use functions.

Moving forward we need a strong understanding of functions, and we will take our time seeing how functions, numbers, and sets all interact with one another. The goal of functions is to grasp the concepts of calculus! This content will be assumed in MATH-409, with perhaps only one or two days given for review.

5.1.2 Well-Defined Functions

Definition 5.1.3.

Let X and Y be two nonempty sets. A function f from X to Y is a rule from X to Y that assigns to every element xX a unique element yY. We usually will write f(x)=y (read “f of x equals y”) to describe that the function f maps x to y.

The set X is called the domain of f, and the set Y is called the codomain of f.

An important subset of the codomain is the range of f, defined as

f(X):={yY(xX)f(x)=y}.

In the expression “f(x)=y”, x is considered the input of the function, with y being the corresponding output of the function.

Note that we define a function as a “rule”. A natural question might be, “What is a rule?” For now we will understanding what this means intuitively - later we will define a function as a special case of relation (Chapter 7).

Example 5.1.4.

Let X={a,b,c,d} and Y={1,2,3,4}. Define the graph of f from X to Y to be

f={(a,2),(b,4),(c,4),(d,1)}.

Write this function f using the mapping diagram below.

XY

What is the range of this function?

Blank space for you to write your work.

Interpret the definition of graph given above in the context of the graph you know about.

Blank space for you to write your work.

Example 5.1.5.

For each of the following, explain why the given description does not describe a function.

  1. (a)

    Define f:{1,2,3}{1,2,3} via f(a)=a1.

    Blank space for you to write your work.
  2. (b)

    Define g: via g(n)=nn1.

    Blank space for you to write your work.
  3. (c)

    Define h: via

    h(x)={11x323x5.
    Blank space for you to write your work.
  4. (d)

    Define s: via s(a/b)=a+b.

    Blank space for you to write your work.

The last example from the previous page is an example of a function that is not well-defined. If there are multiple different ways to express a value of an input, the output must be the same irrespective of the expression. For example, even though 1/2=2/4, s(1/2)s(2/4), so technically s cannot be a function as the same value is being mapped to two different outputs.

Example 5.1.6.

Let f: be defined by f(x)=x2+1. Show that f()=[1,) by showing these two are equal as sets.

Blank space for you to write your work.

Example 5.1.7.

Let X = { 4 } . Then let f:X be defined as f(x)=2x+1x4. Show that f(X)={2}.

Blank space for you to write your work.