DP Math AI · HL / SL · Functions

SL 2.2—Functions, domains, range, graphs

Get started
Notes Quiz

What is a Function?

A function is a mathematical rule that takes an input value and produces exactly one output value. Think of it as a machine: you feed in a number x, and the machine applies a rule to produce an output f(x).

Function: A function f is a rule that assigns to each input value x in its domain exactly one output value, written f(x).

The critical requirement is the one output per input rule. If a single input could produce two different outputs , for example, f(x)=±x​ , then the relationship is merely a relation, not a function.

Note

A function can map different inputs to the same output. For example, f(x)=x2 maps both x=−2 and x=2 to the output 4. This is perfectly fine , it's only a problem if one input gives two different outputs.

Analogy

Think of a function like a vending machine. Each button press (input) gives you exactly one product (output). Different buttons might give the same snack, but pressing one button can never give you two different snacks at once.

What is a Function?

Function Notation

The standard way to write a function is f(x), where:

  • f is the name of the function
  • x is the input variable (also called the argument)
  • The expression defining the rule is written on the right-hand side of an equation

Other letters are commonly used depending on context. For instance:

  • v(t) , velocity as a function of time
  • C(n) , cost as a function of number of items
  • h(t) , height as a function of time
Exam Tip

Exam questions often use f(x), g(x), and h(x) to label different functions in the same problem. Keep track of which letter refers to which rule!

An alternative notation you may encounter is the mapping notation:
f:x→y
This means exactly the same as f(x)=y , the function f maps input x to output y.

Evaluating a function means substituting a specific number in place of x:

Example

Let f(x)=x+4​.

Find f(5):
f(5)=5+4​=9​=3

Find f(0):
f(0)=0+4​=4​=2

Free preview

9 more sections in this topic

← Previous topicSL 2.1—Equations of a lineNext topic →SL 2.3—Graph of a function
Koncepts

Learn it properly. Then practise like it's the real paper.

Start free

Features

  • Lessons
  • Past papers
  • Library
  • Homework Help
  • Duels

More

  • For parents
  • Compare
  • Plans & pricing
  • DP for students

Legal

  • Privacy
  • Terms
  • Account deletion

© 2026 Koncepts (product of PrepAiro, Inc). All rights reserved.
DP, IB, EE and TOK are terms of the International Baccalaureate Organization.

Made for IB DP students.