Back to Course
Functions Basics
What Is a Function?
A function is a rule that assigns exactly one output to every valid input. Think of it as a machine: you feed in a number, it applies a fixed process, and spits out a result.
Unique Output: Each input can only produce one output. If inputting 3 gives both 7 and 9, that rule is not a function.
Multiple Inputs, Same Output: Different inputs can share the same output. $f(2) = 5$ and $f(4) = 5$ is perfectly valid.
Process-Oriented: A function describes how to transform inputs, not just a static set of pairs.
Function notation uses $f(x)$ (read 'f of x') to name the rule and show where the input goes. The letter $f$ is the name of the rule, $x$ is the input, and $f(x)$ is the output value.
$$f(x) = \text{expression in } x$$
The notation packages the rule name, the input variable, and the output into one compact symbol.
$f$=Name of the function (can be any letter: $g$, $h$, $P$, $C$, etc.)(—)
$x$=The input variable (placeholder for the value you plug in)(—)
$f(x)$=The output value — the result after the rule is applied to $x$(depends on context)
$f(3)$
→Evaluate the rule with $x = 3$
$f(a + b)$
→Evaluate the rule with $x = a + b$ — substitute the entire expression
Naming Flexibility: Different letters signal meaning in context — $C(q)$ for cost as a function of quantity, $P(t)$ for profit as a function of time.
Not Multiplication: $f(x)$ does NOT mean $f \times x$. It means 'the value of function $f$ at input $x$'.
Example Function: $$g(x) = x^2 - 3x + 2$$
Domain and Range
The domain of a function is the set of all valid input values — the numbers you're allowed to plug in without breaking the rule.
Real-World Restrictions: If $f(q)$ represents the cost of producing $q$ items, the domain might be $q \geq 0$ (you can't produce negative items) or $q \in \{0, 1, 2, 3, \ldots\}$ (whole items only).
Mathematical Restrictions: Denominators cannot be zero, and square roots (of real numbers) cannot have negative radicands.
Stating the Domain: Write as an inequality ($x \geq 2$), an interval ($[2, \infty)$), or in set notation ($\{x \in \mathbb{R} \mid x \geq 2\}$).
The range of a function is the set of all possible output values — every result the function can actually produce when you feed it valid inputs from the domain.
Dependent on Domain: The range depends on which inputs you allow. Restrict the domain and the range changes too.
Finding the Range: Plug in domain values and collect all outputs. For continuous functions, look for minimum/maximum values.
Not Every Real Number: Even if the codomain is 'all real numbers', the range might be smaller — e.g., $f(x) = x^2$ never produces negative outputs.
Domain Restriction Quick Reference
•
Denominator: expression under fraction ≠ 0
•
Square root: expression under root ≥ 0
•
Logarithm: expression inside log > 0
•
Real-world context: non-negative values, whole numbers, or specific intervals
Evaluating Functions
Evaluating a function means substituting a specific number (or expression) for the input variable and simplifying to get the output.
$$f(a) = \text{replace every } x \text{ with } a, \text{ then simplify}$$
Evaluation is mechanical: swap out the variable, then compute.
$f(a)$=The function evaluated at the specific input $a$(depends on context)
$a$=Any number or expression substituted for $x$(—)
$f(-x)$
→Substitute $-x$ for every $x$ — useful for checking even/odd symmetry
$f(x + h)$
→Substitute $x + h$ for every $x$ — needed for difference quotients
Substitute Everything: Every occurrence of $x$ gets replaced — including inside exponents, fractions, and parentheses.
Simplify Fully: After substitution, carry out all arithmetic. $f(3) = (3)^2 - 2(3) + 1 = 9 - 6 + 1 = 4$.
Expression Inputs: You can evaluate at expressions, not just numbers. $f(a+b)$ means substitute $(a+b)$ everywhere $x$ appears.
Linear Functions
A linear function produces a constant rate of change — the output changes by the same amount for every unit increase in input. Its graph is always a straight line.
$$f(x) = mx + b$$
The output equals the slope times the input plus a starting value (y-intercept).
$m$=Slope — the rate of change (rise over run)(units of output per unit of input)
$b$=Y-intercept — the output when $x = 0$(same as output)
$x$=The input variable(depends on context)
$f(x)$=The output value(depends on context)
$m = 0$
→Constant function — $f(x) = b$, a horizontal line
$b = 0$
→Direct proportionality — $f(x) = mx$, the line passes through the origin
$m > 0$
→Increasing function — output rises as input grows
$m < 0$
→Decreasing function — output falls as input grows
Slope as Rate: If $f(t) = 40t + 100$ models savings over months, you save $40/month (slope) starting from $100 (intercept).
Finding Slope from Two Points: Given $(x_1, y_1)$ and $(x_2, y_2)$, the slope is $m = \frac{y_2 - y_1}{x_2 - x_1}$.
Domain and Range: For a linear function, both are typically all real numbers unless real-world constraints apply.
Quadratic Functions
A quadratic function has a squared term, giving it a parabolic (U-shaped or inverted U-shaped) graph. The output changes at an accelerating (or decelerating) rate.
$$f(x) = ax^2 + bx + c$$
A polynomial of degree 2 that produces a parabola when graphed.
$a$=Leading coefficient — controls whether the parabola opens up or down and how wide/narrow it is(—)
$b$=Linear coefficient — affects the horizontal position of the vertex(—)
$c$=Constant term — the y-intercept ($f(0) = c$)(same as output)
$a > 0$
→Parabola opens upward — vertex is the minimum point
$a < 0$
→Parabola opens downward — vertex is the maximum point
$a = 0$
→Degenerates to a linear function $f(x) = bx + c$
Direction: The sign of $a$ tells you which way the parabola opens — positive means a smile (minimum), negative means a frown (maximum).
Width: Larger $|a|$ makes a narrower parabola (steeper curve); smaller $|a|$ makes a wider, flatter one.
Y-Intercept: Always at $(0, c)$ — plug in $x = 0$ to find where the graph crosses the y-axis.
The vertex of a parabola is its highest or lowest point. Its x-coordinate is found using a simple formula derived from the coefficients.
$$x_v = -\frac{b}{2a}, \quad f(x_v) = c - \frac{b^2}{4a}$$
The vertex sits at the axis of symmetry — a vertical line $x = -\frac{b}{2a}$ that divides the parabola into two mirror halves.
$x_v$=X-coordinate of the vertex (input value at the turning point)(same as input)
$f(x_v)$=Y-coordinate of the vertex (maximum or minimum output)(same as output)
$b = 0$
→Vertex is on the y-axis at $x = 0$, so the vertex is $(0, c)$
Maximum vs Minimum: If $a > 0$, the vertex is the minimum. If $a < 0$, the vertex is the maximum.
Axis of Symmetry: The vertical line $x = x_v$ is the mirror line — points equally distant from it have the same y-value.
Vertex Form: Rewriting as $f(x) = a(x - h)^2 + k$ directly reveals the vertex at $(h, k)$.
Piecewise Functions
A piecewise function uses different rules for different parts of its domain. Each rule applies only to inputs that satisfy a specific condition.
$$f(x) = \begin{cases} \text{rule}_1 & \text{if condition}_1 \\ \text{rule}_2 & \text{if condition}_2 \\ \vdots & \vdots \end{cases}$$
Different formulas govern different intervals or conditions of the input.
$\text{rule}_i$=The expression used for inputs satisfying condition $i$(—)
$\text{condition}_i$=The domain restriction for which rule $i$ applies(—)
Check Conditions First: To evaluate $f(a)$, check which condition $a$ satisfies, then use the matching rule.
Non-Overlapping Conditions: The conditions should cover the entire domain without overlapping — each input belongs to exactly one rule.
Real-World Use: Tax brackets, shipping costs, and bulk pricing are all piecewise — the rule changes at thresholds.
Composition of Functions
Function composition chains two functions together: the output of one becomes the input of the next. It represents applying one process after another.
$$(f \circ g)(x) = f(g(x))$$
First apply $g$ to $x$, then feed that result into $f$.
$(f \circ g)(x)$='f composed with g' — apply $g$ first, then $f$(depends on context)
$g(x)$=The inner function — evaluated first(—)
$f(\cdot)$=The outer function — applied to the result of $g(x)$(—)
$f \circ g \neq g \circ f$
→Composition is generally NOT commutative — order matters
Right to Left: $f(g(x))$ means work from the inside out — compute $g(x)$ first, then plug that into $f$.
Order Matters: If $f(x) = 2x$ and $g(x) = x + 3$, then $f(g(x)) = 2(x+3) = 2x + 6$ but $g(f(x)) = 2x + 3$ — different results.
Domain of Composition: The domain of $f \circ g$ is all $x$ in the domain of $g$ such that $g(x)$ is in the domain of $f$.