Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Functions






The Input-Output Machine

A function is a rule that takes an input and produces exactly one output. Give it a number, and it returns a number — always the same output for the same input, never ambiguous, never uncertain. This consistency is what makes functions the central object of study in mathematics: they capture relationships that are predictable and repeatable.

The notation f(x)f(x) names both the rule and its output. The letter ff identifies the function, the variable xx represents an arbitrary input, and f(x)f(x) denotes the output that results. From this simple framework emerges the machinery for describing motion, growth, change, and structure across every branch of mathematics and its applications.



What is a Function

A function is a rule that assigns exactly one output to each input. The input is a value chosen from some allowed set, the output is the value the rule produces, and the defining requirement is uniqueness: each input yields one and only one output.

This uniqueness is what separates functions from more general relationships. A relationship might associate a single input with multiple outputs — given a person's age, there could be many people with that age. A function cannot do this. Given an input, the output is determined completely. There is no ambiguity, no choice, no list of possibilities.

The notation f(x)=x2+1f(x) = x^2 + 1 defines a function. The rule says: take the input xx, square it, add one. For x=3x = 3, the output is f(3)=10f(3) = 10. For x=2x = -2, the output is f(2)=5f(-2) = 5. Each input produces exactly one result.

Multiple inputs can share the same output — both f(2)f(2) and f(2)f(-2) equal 55 in the example above — and this is perfectly acceptable. The restriction runs only one direction: one input, one output. The reverse, one output coming from multiple inputs, is allowed.

Functions vs Relations

A relation is any set of ordered pairs — any collection of input-output associations, with no restrictions on how many outputs an input can have. Every function is a relation, but not every relation is a function.

The relation {(1,2),(1,3),(2,5)}\{(1, 2), (1, 3), (2, 5)\} is not a function because the input 11 is paired with two different outputs, 22 and 33. There is no single answer to "what output does 11 produce?" The relation {(1,2),(2,3),(3,5)}\{(1, 2), (2, 3), (3, 5)\} is a function because each input appears exactly once.

The equation x2+y2=1x^2 + y^2 = 1 defines a relation: the set of all points on the unit circle. But it is not a function of xx, because most xx-values correspond to two yy-values. At x=0x = 0, both y=1y = 1 and y=1y = -1 satisfy the equation. A function would have to choose one or the other.

The distinction matters because functions have predictable behavior that relations lack. Knowing the input determines the output — this is the property that makes functions useful for modeling, calculation, and analysis.

The Vertical Line Test

The vertical line test determines whether a graph represents a function. If every vertical line intersects the graph at most once, the graph is a function. If any vertical line intersects the graph more than once, the graph is not a function.

The test works because a vertical line consists of all points with a fixed xx-value. If the line crosses the graph twice, those two intersection points have the same xx-coordinate but different yy-coordinates — meaning the same input produces two different outputs, violating the definition of a function.

A parabola opening upward passes the test: every vertical line hits it at most once. A circle fails: vertical lines through the interior hit it twice. A horizontal line passes: each vertical line intersects it exactly once. A vertical line fails spectacularly: a single vertical line intersects it infinitely many times.

The test applies only to graphs in the standard xyxy-plane where xx represents input and yy represents output. It is a visual check, useful for quickly identifying whether a curve could represent a function.

Representing Functions

Functions can be represented in multiple forms, each with its own advantages.

An equation gives an explicit formula: f(x)=3x7f(x) = 3x - 7 tells exactly how to compute the output from any input. Equations are precise, compact, and allow calculation at any point in the domain.

A table lists specific input-output pairs. It shows concrete values but only at selected points — the function's behavior between listed values must be inferred or interpolated.

A graph displays the function visually, showing shape, trends, and features at a glance. It reveals where the function increases or decreases, where it reaches maximum or minimum values, and how it behaves across its entire domain. Reading exact values from a graph requires estimation.

A verbal description explains the rule in words: "the function that doubles its input and subtracts five." Verbal forms connect functions to real-world contexts but lack the precision of equations.

Each representation captures the same underlying relationship. Converting between them — writing an equation from a graph, building a table from an equation, describing a pattern in words — is a fundamental skill.

Function Notation

The notation f(x)f(x) names a function and its output simultaneously. The letter ff identifies the function — the rule itself — while f(x)f(x) denotes the output when the input is xx.

Reading f(x)f(x) as "f of x" emphasizes the relationship: the value of ff at xx. The parentheses do not indicate multiplication. The expression f(x)f(x) is a single object, not ff times xx.

Other letters serve the same purpose. The notation g(t)g(t) names a function gg with input variable tt. The notation P(n)P(n) might represent a function PP that takes integers nn as input. The choice of letters often reflects context: tt for time, nn for counting numbers, xx for a generic variable.

Specific values replace the variable to indicate particular outputs. If f(x)=x2+1f(x) = x^2 + 1, then f(3)f(3) means the output when x=3x = 3, which equals 1010. The notation f(a)f(a) means the output at some unspecified value aa. The notation f(x+1)f(x + 1) means: take x+1x + 1 as the input, apply the rule.

Named functions like ff and gg are distinguished from anonymous expressions like x2+1x^2 + 1 written without a function name. Both describe the same rule, but naming allows reference to the function as an object in its own right.

Evaluating Functions

Evaluating a function means finding the output for a given input. The process depends on how the function is represented.

From an equation, evaluation is substitution. To find f(5)f(5) when f(x)=2x23x+1f(x) = 2x^2 - 3x + 1, replace every xx with 55:

f(5)=2(5)23(5)+1=5015+1=36f(5) = 2(5)^2 - 3(5) + 1 = 50 - 15 + 1 = 36


From a table, evaluation is lookup. Find the input value in one column and read the corresponding output from the other column. If the exact input is not listed, the table does not directly provide the answer.

From a graph, evaluation is geometric. Locate the input value on the horizontal axis, move vertically to the curve, then read the output from the vertical axis. Precision depends on the scale and clarity of the graph.

Evaluating with expressions as input requires careful substitution. For f(x)=x2+1f(x) = x^2 + 1, finding f(a+2)f(a + 2) means replacing xx with a+2a + 2:

f(a+2)=(a+2)2+1=a2+4a+4+1=a2+4a+5f(a + 2) = (a + 2)^2 + 1 = a^2 + 4a + 4 + 1 = a^2 + 4a + 5


The parentheses around a+2a + 2 are essential — without them, order of operations produces errors.

Input, Output, and Variables

The input to a function is called the independent variable — its value is chosen freely from the allowed set. The output is the dependent variable — its value depends on, and is determined by, the input.

Convention uses xx for the independent variable and yy for the dependent variable, so y=f(x)y = f(x) states that yy is determined by xx through the function ff. But variables can be named anything. A function describing position over time might use tt for time and ss for position: s=f(t)s = f(t).

The set of all allowed inputs is the domain. The set of all possible outputs is the range. Together, domain and range describe what goes in and what comes out.

The language of dependence appears throughout applications. "Revenue depends on price." "Temperature depends on time." "Height depends on age." Each statement implies a functional relationship, with the second quantity determined by the first. Identifying which variable is independent and which is dependent is essential for setting up function models correctly.

Determining Whether a Relationship is a Function

Different representations require different tests to determine whether a relationship qualifies as a function.

From a set of ordered pairs, check for repeated inputs with different outputs. The set {(2,5),(3,7),(2,9)}\{(2, 5), (3, 7), (2, 9)\} is not a function because 22 appears twice with different outputs. The set {(2,5),(3,7),(4,5)}\{(2, 5), (3, 7), (4, 5)\} is a function — the repeated output 55 causes no problem.

From a table, examine the input column. If any input value appears more than once with different corresponding outputs, the table does not represent a function.

From a graph, apply the vertical line test. If any vertical line crosses the graph more than once, the relationship is not a function.

From an equation, consider whether solving for yy yields a unique value for each xx. The equation y=x2y = x^2 defines a function: each xx gives exactly one yy. The equation y2=xy^2 = x does not define yy as a function of xx: for x=4x = 4, both y=2y = 2 and y=2y = -2 satisfy the equation.

From a verbal description, analyze the rule. "Assign to each person their biological mother" defines a function. "Assign to each person their sibling" does not — a person may have multiple siblings or none.

Special Values

Certain outputs carry particular significance and receive special attention.

The zeros of a function are the input values where the output equals zero — the solutions to f(x)=0f(x) = 0. On a graph, zeros correspond to xx-intercepts, the points where the curve crosses the horizontal axis. Finding zeros is central to solving equations: the equation x25x+6=0x^2 - 5x + 6 = 0 asks for the zeros of f(x)=x25x+6f(x) = x^2 - 5x + 6.

The yy-intercept is the output when the input is zero, namely f(0)f(0). On a graph, this is the point where the curve crosses the vertical axis. Not every function has a yy-intercept — if 00 is not in the domain, f(0)f(0) does not exist.

Undefined points are inputs where the function has no output. Division by zero, square roots of negative numbers, and logarithms of non-positive numbers all produce undefined results. The function f(x)=1/xf(x) = 1/x is undefined at x=0x = 0. The function g(x)=xg(x) = \sqrt{x} is undefined for x<0x < 0 when restricted to real outputs.

Identifying these special values — where the function equals zero, where it is undefined, where it crosses the axes — anchors the analysis of any function.

Functions in Context

Functions model relationships in the real world. The input and output carry units, the domain reflects physical constraints, and the function values have practical meaning.

A function C(n)C(n) might give the cost in dollars to produce nn items. Here nn must be a non-negative integer (or non-negative real, if fractional production makes sense), and C(n)C(n) represents actual currency. The statement C(100)=450C(100) = 450 means producing 100100 items costs \450$.

A function d(t)d(t) might give the distance in meters traveled after tt seconds. The domain might be [0,10][0, 10] if the motion is observed for ten seconds. The zeros of dd indicate when the object is at the starting position. The range indicates how far the object travels.

Interpreting functions in context means translating between mathematical statements and real-world meaning. What does f(5)=20f(5) = 20 mean? What does it mean for the function to be increasing? What real-world constraint limits the domain?

Context also imposes restrictions absent from pure mathematics. Time cannot be negative, populations must be non-negative integers, percentages lie between 00 and 100100. These constraints shape the domain when functions model reality.

The Landscape of Function Topics

The concept of function branches into interconnected topics, each exploring a different aspect of how functions behave and how they relate to one another.

Domain and range describe what goes in and what comes out — the allowed inputs and the resulting outputs.

Graphs provide visual representation, turning algebraic rules into geometric objects that can be seen, traced, and compared.

Analyzing functions means systematically describing behavior: where the function increases, where it decreases, where it reaches extreme values.

Properties characterize functions by their features — symmetry, monotonicity, boundedness, continuity, and more.

Arithmetic combines functions through addition, subtraction, multiplication, and division, building new functions from existing ones.

Transformations shift, stretch, compress, and reflect graphs, showing how changes to the formula affect the picture.

Composition chains functions together, using the output of one as the input to another.

Inverse functions reverse the process, recovering input from output when such reversal is possible.

Piecewise functions use different rules on different intervals, capturing relationships that change behavior at boundaries.

Function families group functions by shared structure — linear, quadratic, exponential, and others — each with characteristic shapes and properties.