What is a function?

Topic guide · Updated 2026-11-26

Quick answer

A function is a rule that assigns exactly one output to each input. In notation, f(x) is the output of f at input x. On a graph, a relation is a function if no vertical line crosses it more than once (the vertical line test).

−4−3−2−112345678−112345
  • f(x)=x^2-2x
  • g(x)=f(x-3)+1
  • y=g(x)
Open in graphing calculator

Function notation in the calculator

Define functions with names and reuse them:

f(x) = x^2 − 2x
g(x) = f(x − 3) + 1
y = g(x)

You can also evaluate: typing f(4) shows 8. Use f'(x) to graph the derivative.

Functions vs relations

Every function is a relation, but not every relation is a function. y = x² is a function; x = y² is not, because x = 4 pairs with both y = 2 and y = −2.

Frequently asked questions

What is the difference between an equation and a function?

An equation is a statement that two expressions are equal. A function is a rule. Many equations, like y = 2x + 1, define functions; others, like x² + y² = 1, do not.