All lessons
ƒ

Function Basics

Relations, domain, range, and notation — the foundation.

Interactive graph

Interactive Lab
Drag corner to resize ↘

Drag the sliders in the Desmos graph. Watch how each parameter reshapes the curve in real time.

Concepts

Relation vs. Function

VisualEvery input on the x-axis shoots one arrow upward. If two arrows ever land on the same x but different y, it's just a relation — not a function.

AlgebraA function is a relation where each input xx maps to exactly one output f(x)f(x). The vertical line test catches violations visually.

f:X→Yf: X \to Y
  • • Passes vertical line test → function
  • • f(x) reads 'f of x', not 'f times x'

Domain

VisualSweep a vertical line across the grid. The x-values where the graph exists form the domain.

Algebradom(f)={x∈R:f(x) is defined}\text{dom}(f) = \{x \in \mathbb{R} : f(x) \text{ is defined}\}

  • • Watch for: division by zero, even roots of negatives, logs of non-positives

Range

VisualSweep a horizontal line. The y-values the graph reaches form the range.

Algebraran(f)={f(x):x∈dom(f)}\text{ran}(f) = \{f(x) : x \in \text{dom}(f)\}

Function Notation

VisualDrop the point aa onto the curve — the height f(a)f(a) is the function's value at aa.

AlgebraIf f(x)=x2−2f(x)=x^2-2, then f(3)=32−2=7f(3) = 3^2-2 = 7.

f(x)=x2−2  ⟹  f(a)=a2−2f(x) = x^2 - 2 \implies f(a) = a^2 - 2

Key formulas

Function notation
f(x)f(x)
Output of f at input x
Domain
dom(f)={x:f(x) defined}\text{dom}(f) = \{x : f(x)\text{ defined}\}
Allowed inputs
Range
ran(f)={f(x):x∈dom(f)}\text{ran}(f) = \{f(x) : x \in \text{dom}(f)\}
Achievable outputs

Finished reading?

Mark this lesson complete to update your mastery.

Quick practice

Full practice
easyfunction basics
Is the relation {(1,2),(2,3),(3,2)}\{(1,2),(2,3),(3,2)\} a function?
easyfunction basics
If f(x)=2x+3f(x)=2x+3, find f(5)f(5).
mediumfunction basics
Find the domain of f(x)=1x−4f(x)=\dfrac{1}{x-4}.
mediumfunction basics
Find the range of f(x)=x2+3f(x)=x^2+3.
hardfunction basics
Find the domain of f(x)=x+2x−1f(x)=\dfrac{\sqrt{x+2}}{x-1}.