# Functions

A function expresses the relationship between variables. Values of these variables can be numbers or nonnumerical objects such as geometric figures, functions, or even nonmathematical objects. There are many different kinds of functions, but we will dealing mainly with functions of numerical objects in terms of x.

A function describes a *rule* or *process* that associates each input
of the function to a __unique__ output. When we were first introduced to equations
in two variables, we saw them in terms of x and y

where **x** is the *independent variable* and **y** is the *dependent variable*.
When we have a function, **x** is the *input* and **f(x)** is the *output*.

where **f** is a **function of x** that doubles any value **x** assigned
to it, i.e.

Commonly functions are denoted by the letter **f** but this is not a strict notation
since other letters may also be used. Typically the **f(x)** takes place of the
**y** value to explicitly identify the independent variable being used in the
function.

A fundamental reason why we use this notation is because functions do not deal only with equations, but as verbal descriptions and mapping one element to another (the natural numbers corresponding to prime numbers, for instance). Functions are also defined by expressions of at least one variable. Once we formulate a rule for the expression in terms of the variable, then it is a function, where the expression is the defining formula for the function.

**x** is known as the argument of the function. For each value of the argument
**x** there must exist only one value of **f(x)** for it to be considered
a function. The *domain* of a function is defined as the set containing the
different values of the argument. The *range* of a function is defined as the
set containing the values of the function for the given domain.

For example, given the equation

**y** is a function and **x** is its argument.

The above equation can also be written as

from which we can explicitly see that **y** is a **function of x**.

For the above, given the domain of **x** as {0,1,2}, the range of the function
can be calculated by substituting the different values of **x** into the equation
to produce the result set:

## Vertical Line Test

Functions define a relationship for an expression to have one unique output for each input. For instance, an x value must correspond to only one y value, but more than one x value can correspond to the same y value. A way to test this relationship to see if an image on a graph is a function is to use the vertical line test. If we are able to draw a vertical line at any point on the graph and have only one intersection point, then the graph is a function. If there is more than one intersection point, it is not a function.

Let's determine if the following graphs are functions.

**(1)**

Every x value has a unique y value. This is a function.

**(2)**

Though two x values may have the same y value, each x value only has *one*
y value. This is indeed a function.

**(3)**

We can see that at least one vertical line has intersects at more than one point
with the graph. This is *not* a function.

**(4)**

This one, however, is a function. Can you see the similarities between this graph and last one?

A way to use the vertical line test is to take a ruler, make it vertical, and move it along the graph to see if there are are any points where there are two y values corresponding to an x value.

## Odd Functions and Even Functions

Functions can be odd or even. Functions are said to be **odd** if they satisfy
the identity below

which means that whenever the function takes a negative argument (-**x**), the
result is always equal to the negative value of the function with the positive argument
(**x**).

For example, given the function **f(x) = 3(x)**, solving for **x** = -1

and since

the function is odd.

Examples of odd functions:

**(1)**

**(2)**

Functions are said to be **even** if they satisfy the identity below

which means that for any negative value of the argument (-**x**), the result
is always equal to the value of the function with the positive argument (**x**).
In other words, the negative has no effect on the value of the function.

For example, given the function

and also

Here is the graph of **f(x) = x ^{2}**

Knowing whether a function is even or odd can make it a lot easier to solve.

## Composite Functions

Functions not only take on variables as arguments but can also take on other functions
as arguments. For example, given the following functions **f(x)** and **g(x)**
where

Suppose you're asked to solve for **f(g(x))**. This would be asking you to find
the function **f** of the function **g(x)**. In other words, use the function
**g(x)** as the argument of the function **f**

but remember that

Compositions are also denoted as

## Inverse Function

Some functions have inverses that have the effect of undoing whatever operations the function had done on a variable. The inverse of a function can be thought of as the opposite of that function. For example, given a function

and assuming that an inverse function for **f(x)** exists, let this function
be **g(x)**. The inverse function would have the effect of the following:

The inverse of a function **f(x)** is more correctly denoted by

Remember, not all functions have an inverse!

## Examples of Functions

### Example 1

For the function

solve for the following

**Step 1**

**Step 2**

**Step 3**

**Step 4**

**Step 5**

**Step 6**

**Step 7**

### Example 2

Determine whether the following function are even or odd

**Step 1**

**Step 2**

**Step 3**

therefore, the function is odd

### Example 3

Determine whether the following function are even or odd

**Step 1**

**Step 2**

**Step 3**

function is niether even nor odd

### Example 4

Determine whether the following function are even or odd

**Step 1**

**Step 2**

**Step 3**

function is even

### Example 5

Find the inverse of the given function

**Step 1**

**Step 2**

**Step 3**

**Step 4**

**Step 3**

therefore;