FUNCTIONS · FOUNDATIONS

Function fundamentals

A function is a rule that assigns each allowed input exactly one output. This simple idea is one of the central structures in mathematics.

\[f:A\to B,\qquad x\mapsto f(x)\]

1. Definition

A function \(f:A\to B\) consists of a domain \(A\), a codomain \(B\), and a rule that assigns every \(x\in A\) exactly one value \(f(x)\in B\).

Domain

The set of permitted inputs.

Codomain

The set in which outputs are declared to live.

Image / range

The outputs actually attained: \(f(A)=\{f(x):x\in A\}\).

Function value

For a specific input \(x\), the output is written \(f(x)\).

2. Example

Let \(f:\mathbb{R}\to\mathbb{R}\) be defined by \(f(x)=x^2\). Then \(f(3)=9\) and \(f(-3)=9\). The domain and codomain are both \(\mathbb{R}\), but the range is only \([0,\infty)\).

\[f(3)=3^2=9\qquad\text{and}\qquad f(-3)=(-3)^2=9\]

3. Graph of a function

The graph of \(f\) is the set of points \((x,f(x))\). A vertical line may intersect the graph at most once; otherwise one input would have more than one output.

y = x²

4. Domain restrictions

The formula alone may restrict which inputs are allowed.

Rational\(f(x)=1/x\): require \(x\neq0\).
Square root\(f(x)=\sqrt{x}\): over the reals require \(x\ge0\).
Logarithm\(f(x)=\ln x\): require \(x>0\).

5. Common function families

Linear\(f(x)=mx+b\)
Quadratic\(f(x)=ax^2+bx+c\)
Polynomial\(f(x)=a_nx^n+\cdots+a_0\)
Rational\(f(x)=p(x)/q(x)\)
Exponential\(f(x)=a^x\)
Logarithmic\(f(x)=\log_a x\)
Trigonometric\(\sin x,\cos x,\tan x\)
PiecewiseDifferent rules on different parts of the domain.
Absolute value\(f(x)=|x|\)

6. One-to-one and onto

A function is injective if different inputs never produce the same output. It is surjective if every element of the codomain is attained. A function that is both is bijective, and only then does it have an inverse on the stated domain and codomain.

7. Worked example

Find the natural real domain and range of \(f(x)=\sqrt{x-2}+1\).

  1. The square root requires \(x-2\ge0\), so the domain is \([2,\infty)\).
  2. Because \(\sqrt{x-2}\ge0\), we have \(f(x)\ge1\).
  3. Every value \(y\ge1\) occurs, since \(x=(y-1)^2+2\).
\[\operatorname{Dom}(f)=[2,\infty),\qquad \operatorname{Range}(f)=[1,\infty)\]

8. Practice

  1. Find the domain of \(f(x)=1/(x-4)\).
  2. Find the range of \(f(x)=x^2+3\) over \(\mathbb R\).
  3. Is \(f(x)=x^2\) injective on \(\mathbb R\)? What about on \([0,\infty)\)?
Show answers

1) \(\mathbb R\setminus\{4\}\). 2) \([3,\infty)\). 3) Not injective on \(\mathbb R\), but injective on \([0,\infty)\).

9. Continue learning

Once domain, range and notation are clear, the next step is to understand how graphs transform and how functions combine.