A function is a relation that assigns exactly one output value to every input value. If \(f(x) = x^2\), then each value of \(x\) produces exactly one value of \(f(x)\). The vertical line test captures this idea geometrically: a graph represents a function if and only if every vertical line crosses the graph at most once; if any vertical line meets the graph in two or more points, the relation is not a function. Two sets describe a function's behavior: the domain is the set of all permissible input values, and the range is the set of all possible output values. Common restrictions on the domain come from division by zero and from taking even roots of negative numbers. For \(f(x) = \frac{1}{x - 3}\), the denominator cannot be zero, so \(x \neq 3\) and the domain is \((-\infty, 3) \cup (3, \infty)\). For \(f(x) = \sqrt{x - 2}\), the radicand must be non-negative, so \(x \geq 2\) and the domain is \([2, \infty)\).
Function composition builds new functions by feeding the output of one function into another. The composition \((f \circ g)(x)\) equals \(f(g(x))\): you first evaluate \(g(x)\) and then apply \(f\) to that result. For example, with \(f(x) = 2x + 1\) and \(g(x) = x^2\), the value of \((f \circ g)(3)\) is found by first computing \(g(3) = 9\) and then \(f(9) = 2(9) + 1 = 19\). Compositions are particularly useful for chaining operations and for describing transformations in stages.
An inverse function reverses the action of the original function: if \(f(a) = b\), then \(f^{-1}(b) = a\). Graphically, the graph of \(f^{-1}\) is the reflection of the graph of \(f\) across the line \(y = x\). To find an inverse algebraically, replace \(f(x)\) with \(y\), swap \(x\) and \(y\) throughout the equation, and then solve for \(y\); the resulting expression is \(f^{-1}(x)\). A useful check is to verify that \(f(f^{-1}(x)) = x\). Some functions are not defined by a single rule over their entire domain; a piecewise function uses different expressions for different intervals, such as \(f(x) = x^2\) when \(x \geq 0\) and \(f(x) = -x\) when \(x < 0\).