A **relation** is a set of ordered pairs. Relations can be represented in a variety of ways, including lists, diagrams, equations, and graphs. The **domain of a relation** is the set of the first coordinates of the ordered pairs in the relation. The first coordinate is often represented by the variable $x$*.* The **range of a relation** is the set of the second coordinates of the ordered pairs in the relation. The second coordinate is often represented by the variable $y$*.*

A type of relation that is particularly important is called a function. A **function** is a relation in which each element of the domain corresponds to exactly one element of the range.

The **domain of a function** is the set of the first coordinates of the ordered pairs. A value in the domain of the function is called the **input**. The independent variable represents the input values of a function.

The **range of a function** is the set of the second coordinates of the ordered pairs. A value in the range of the function is called the **output**. The dependent variable represents the output values of a function.

In a function, each input has a unique output. If $y$ is a function of $x$, then every $x$-value corresponds to only one $y$-value.

Relation That Is Not a Function | Relation That Is a Function |
---|---|

The mapping diagram represents the set of ordered pairs $\{(1,5),(1,7),(2,7),(3,9)\}$. The relation is not a function because the value of 1 in the domain corresponds to both 5 and 7 in the range. |
The mapping diagram represents the set of ordered pairs $\{(1,5),(2,7),(3,7)\}$. Each value in the domain corresponds to only one value in the range, so the relation is a function. Note that a value in the range can correspond to more than one value in the domain. |

A function can be named by a letter, such as $f$. When the function $f$ is written as an equation, the dependent variable is sometimes written as $f(x)$ rather than $y$. Read $f(x)$ as "$f$ of $x$." It represents the value of the function $f$ at $x$. While functions are frequently called $f$, they may be named with any letter to distinguish among several functions or describe the output.

For example, three functions may be named $f$, $g$, and $h$.### Domain and Range

$x$ | $f(x)$ |
---|---|

15 | 30 |

20 | 40 |

25 | 50 |

When a function is represented by an equation, analyze the equation to determine all possible input and output values.

- For the domain, look for values that would make the function undefined. This includes values that would make the denominator of a fraction equal to zero or values that would make an expression under a square root have a negative value.
- For the range, look for any values that could not be the output of the function. For example, if an expression is squared or a square root, the value cannot be negative. A fraction with a nonzero numerator cannot be equal to zero.

Write the domain and range. Both the domain and range are all real numbers.

Using inequality notation, the domain is written as:### Evaluating Functions

1. Write the equation.

2. Replace each $x$ with the desired value or expression.

3. Simplify the resulting expression.

The input of a function can also be an algebraic expression. In this case, the output will also be an algebraic expression, not just a number.

### Operations with Functions

### Operations with Functions

Operation | $f(x)= 3x$ and $g(x)= x-1$ |
---|---|

Addition | $\begin{aligned}(f+g)(x)&= {\color{#c42126}f(x)} + {\color{#0047af}g(x)}\\&= {\color{#c42126}3x} + {\color{#0047af}(x-1)}\\&=4x-1\end{aligned}$ |

Subtraction | $\begin{aligned}(f-g)(x) &= {\color{#c42126}f(x)} - {\color{#0047af}g(x)}\\ &={\color{#c42126}3x} \color{black}- {\color{#0047af}(x-1)}\\ &=3x-x+1\\ &=2x+1\end{aligned}$ |

Multiplication | $\begin{aligned}(f\cdot g)(x)&= {\color{#c42126}f(x)} \cdot {\color{#0047af}g(x)}\\&={\color{#c42126}3x} \cdot {\color{#0047af}(x-1)}\\&=3x^2-3x\end{aligned}$ |

Division | $\begin{aligned}\left ( \frac{f}{g} \right ) (x) &= \frac{{\color{#c42126} f(x)}}{{\color{#0047af} g(x)}}\\&=\frac{{\color{#c42126} 3x}}{{\color{#0047af} x-1}}\end{aligned}$ |