# Functions

## What is a Function?

A
**
function
**
is a way of dealing with an
**
"input"
**
, applying some
**
"rule"
**
(the function), and then getting an
**
"output"
**
.

A
**
function
**
is a set of
ordered pairs
in which no two different ordered pairs have the same
$x$
-coordinate. An equation that produces such a set of ordered pairs defines a function.

What is the catch? There can be at most one output for every input. The inputs that make "sense" form the domain of the function, and the answers or outputs form the range .

## Function Notation

We can call the input
**
$x$
**
, the rule
$f$
, and then the output is
$f\left(x\right)$
, read "
$f$
of
$x$
".

This DOES NOT mean " $f$ times $x$ " , it's just a notation device to record the input and output.

For example, find the output of the function $f\left(x\right)={x}^{2}$ when the input, $x=3$ .

To find the output value when $x=3$ , substitute $3$ for $x$ in the function.

$f\left(3\right)={3}^{2}$

${3}^{2}$ means $3$ times $3$ .

$\begin{array}{l}f\left(3\right)=3\times 3\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}=9\end{array}$

(Note: $f\left(3\right)$ is not $f$ times $3$ )

Think of $f\left(x\right)={x}^{2}$ as $f\left(\right)={\left(\right)}^{2}$ ; that way you can safely plug in negative numbers or even other expressions:

$f\left(-5\right)={\left(-5\right)}^{2}=25$

$f\left(x+h\right)={\left(x+h\right)}^{2}$

## Functions and Relations

A function is a special type of relation . A relation is just a set of ordered pairs $\left(x,y\right)$ . In formal mathematical language, a function is a relation for which:

if $\left({x}_{1},y\right)$ and $\left({x}_{2},y\right)$ are both in the relation, then ${x}_{1}={x}_{2}$ .

This just says that in a function, you can't have two ordered pairs with the same $x$ -value but different $y$ -values.

If you have the graph of a relation, you can use the vertical line test to find out whether the relation is a function.