### Identity Function

The identity function for the operation of composition is $f(x) = x$.

The **identity function** is the function for which the output is equal to the input. If the input is $x$, then the identity function is $f(x)=x$.

$f(g(x))=g(f(x))=g(x)$

### One-to-One Functions

A function is one-to-one if every output value has a unique input value. The horizontal line test and algebraic methods are used to determine whether a function is one-to-one.

For all functions, each input corresponds to exactly one output, which can be determined by a vertical line test. In a **one-to-one function**, each output corresponds to exactly one input.

In a mapping diagram, this means that every element of the domain is mapped to only one element in the range, and vice versa. On a graph, the **horizontal line test** uses horizontal lines to determine whether a function is one-to-one; if any horizontal line intersects the graph in more than one point, the graph is not one-to-one.

$f(x)=x^2$

Not a Function | Function, Not One-to-One | One-to-One Function |
---|---|---|

The mapping shows that one domain value has two different range values. | The mapping shows that every domain value has exactly one range value, but a range value has two different domain values. | The mapping shows that every domain value has exactly one range value and that each range value only has one domain value. |

The graph shows that an $x$-value has two different $y$-values. | The graph shows that every $x$-value has exactly one $y$-value but that a $y$-value has two different $x$-values. |
The graph shows that every $x$-value has exactly one $y$-value and that each $y$-value has only one $x$-value. |