🎯 In this section you will learn

πŸ“Œ Definition of a Function

A function is a rule that assigns exactly one output to each input. The set of all possible inputs is called the domain, and the set of all possible outputs is called the range.

$$ f: X \to Y $$
A function f maps each element x in set X to exactly one element y in set Y
Example 1Function vs. Non-Function

Function: $f(x) = x^2$. For every input $x$, there is exactly one output $x^2$.

Not a function: A relation that assigns a person to their birth date. (One person has exactly one birth date, but multiple people can share the same date β€” actually that is still a function from people to dates. Let's use a better example: a circle $x^2 + y^2 = 1$. For $x=0$, $y$ can be $1$ or $-1$, so it's not a function.)

πŸ”’ Function Notation

We write $f(x)$ to denote the value of the function $f$ at the input $x$. For example, if $f(x) = 2x + 3$, then $f(4) = 2(4) + 3 = 11$.

$$ f(x) = \text{"f of x"} \quad \text{means the output when the input is } x $$
πŸ’‘ Important
The letter $f$ is the name of the function. The notation $f(x)$ does NOT mean $f$ multiplied by $x$. It is a single value.

🎯 Domain and Range

ConceptDefinitionExample
DomainAll possible input values ($x$)$f(x)=\sqrt{x}$ has domain $[0,\infty)$
RangeAll possible output values ($y$)$f(x)=x^2$ has range $[0,\infty)$
Example 2Finding Domain and Range

Question: Find the domain and range of $f(x) = \sqrt{x-3}$.

β‘ 
Domain
The square root requires $x-3 \ge 0 \Rightarrow x \ge 3$. So domain is $[3, \infty)$.
β‘‘
Range
As $x$ increases from $3$ to $\infty$, $\sqrt{x-3}$ increases from $0$ to $\infty$. So range is $[0, \infty)$.
Example 3Domain of a Rational Function

Question: Find the domain of $f(x) = \frac{2x}{x^2 - 4}$.

Solution: The denominator cannot be zero. $x^2 - 4 = (x-2)(x+2) = 0$ when $x = 2$ or $x = -2$. So domain is all real numbers except $2$ and $-2$: $(-\infty, -2) \cup (-2, 2) \cup (2, \infty)$.

πŸ“ˆ Vertical Line Test

The vertical line test is a visual way to determine if a graph represents a function. If any vertical line intersects the graph more than once, then the graph is not a function.

πŸ“Œ Vertical Line Test
A graph represents a function if and only if no vertical line intersects the graph at more than one point.
Example 4Applying the Vertical Line Test

Parabola $y = x^2$: Any vertical line $x = a$ hits the parabola exactly once. So it is a function.

Circle $x^2 + y^2 = 1$: A vertical line $x = 0$ hits the circle at two points: $(0,1)$ and $(0,-1)$. So it is NOT a function.

πŸ–ΌοΈ Visual Examples

Interactive graph below. Select a function and see whether it passes the vertical line test:

πŸ” Key Takeaway
A function must assign exactly one output to each input. The vertical line test is a fast way to check this from a graph.

πŸ“ Practice Problems

Problem 1Domain

Find the domain of $f(x) = \frac{1}{x-5}$.

Show solution

Denominator cannot be zero: $x-5 \neq 0 \Rightarrow x \neq 5$. Domain: $(-\infty, 5) \cup (5, \infty)$.

Problem 2Range

Find the range of $f(x) = x^2 + 2$.

Show solution

Since $x^2 \ge 0$, $x^2 + 2 \ge 2$. Range: $[2, \infty)$.

Problem 3Vertical Line Test

Does the graph of $y = \sin x$ represent a function? Why?

Show solution

Yes. Any vertical line $x = a$ intersects the sine graph exactly once because sine is a function.

Problem 4Function Evaluation

If $f(x) = 3x^2 - 2x + 1$, find $f(2)$ and $f(-1)$.

Show solution

$f(2) = 3(4) - 2(2) + 1 = 12 - 4 + 1 = 9$.
$f(-1) = 3(1) - 2(-1) + 1 = 3 + 2 + 1 = 6$.

← Back to Module Page