3.1 Function Definition, Domain, Range, and Piecewise Functions

Key Takeaways

  • A relation is a function if and only if each input x in the domain maps to exactly one output y in the range (passing the Vertical Line Test graphically).

  • The domain of an algebraic function is the set of all real numbers except those that cause division by zero, negative radicands under even roots, or non-positive arguments in logarithms.

  • The range of a function represents the complete set of output values y = f(x), determined algebraically through inequality analysis or graphically by observing vertical span.

  • Piecewise functions are evaluated by identifying which interval rule applies to the given input x, paying special attention to strict vs. non-strict inequalities at boundary points.

Last updated: August 2026

3.1 Function Definition, Domain, Range, and Piecewise Functions

1. Fundamentals of Relations and Functions

In precalculus and higher-level mathematics, a relation is any set of ordered pairs (x,y)(x, y) that associates elements from a domain set XX to a range set YY. A function ff is a special type of relation in which each input element xx in the domain is paired with exactly one output element yy in the range.

We express this relationship using function notation:

y=f(x)y = f(x)

where xx represents the independent variable (the input) and yy represents the dependent variable (the output).

Domain (Inputs x)  --->  [ Function f ]  --->  Range (Outputs y = f(x))

The Vertical Line Test (VLT)

Graphically, a curve in the Cartesian coordinate plane represents a function of xx if and only if no vertical line intersects the graph at more than one point. If a vertical line touches the graph at two or more points, then a single input xx corresponds to multiple outputs yy, violating the definition of a function.

Relation TypeGraphical FeatureFunction?Example
FunctionEvery vertical line intersects at most onceYesf(x)=x2−4x+3f(x) = x^2 - 4x + 3, f(x)=∣x∣f(x) = \vert x\vert
Non-FunctionAt least one vertical line intersects twice or moreNoCircle x2+y2=25x^2 + y^2 = 25, Sideways parabola x=y2x = y^2

2. Algebraic Determination of Domain

The domain of a real-valued function f(x)f(x) is the set of all real numbers xx for which the expression f(x)f(x) evaluates to a real number. Unless an explicit restricted domain is stated in a problem context, we assume the domain is the implied (natural) domain—the largest subset of R\mathbb{R} for which the formula is mathematically valid.

To find the domain algebraically, search for the three primary domain restrictions in algebra:

Three Core Domain Restriction Rules

  1. Rational Expressions (Division by Zero): If f(x)=g(x)h(x)f(x) = \frac{g(x)}{h(x)}, set the denominator unequal to zero: h(x)≠0h(x) \neq 0.
  2. Even Radicals (Negative Radicands): If f(x)=g(x)nf(x) = \sqrt[n]{g(x)} where nn is an even integer (2,4,6,…2, 4, 6, \dots), set the radicand non-negative: g(x)≥0g(x) \ge 0. (Note: odd roots like x3\sqrt[3]{x} accept all real numbers).
  3. Logarithmic Arguments (Non-positive Inputs): If f(x)=log⁡b(g(x))f(x) = \log_b(g(x)), set the argument strictly positive: g(x)>0g(x) > 0.

Combining Multiple Restrictions

When a function contains combinations of fractions, roots, and logarithms, the domain is the intersection (overlap) of the intervals satisfying all individual constraints.

Worked Example 2.1A: Determining Domain of a Complex Function

Determine the domain of the function f(x)=3x+12x2−4x−5f(x) = \frac{\sqrt{3x + 12}}{x^2 - 4x - 5}.

Step 1: Set up the even root inequality. The radicand under the square root must be non-negative:

3x+12≥0  ⟹  3x≥−12  ⟹  x≥−43x + 12 \ge 0 \implies 3x \ge -12 \implies x \ge -4

In interval form, this is [−4,∞)[-4, \infty).

Step 2: Set up the rational denominator restriction. The denominator cannot equal zero:

x2−4x−5≠0  ⟹  (x−5)(x+1)≠0  ⟹  x≠5 and x≠−1x^2 - 4x - 5 \neq 0 \implies (x - 5)(x + 1) \neq 0 \implies x \neq 5 \text{ and } x \neq -1

Step 3: Intersect the restrictions. We begin with x≥−4x \ge -4 and remove the excluded points x=−1x = -1 and x=5x = 5.

Domain: [−4,−1)∪(−1,5)∪(5,∞)\text{Domain: } [-4, -1) \cup (-1, 5) \cup (5, \infty)

3. Determining the Range of a Function

The range of a function y=f(x)y = f(x) is the set of all real values yy produced as xx varies over the entire domain. Determining range algebraically requires analyzing output bounds or solving for xx in terms of yy.

Algebraic Range Techniques

  1. Solving for xx (Rational Functions): To find the range of a linear rational function y=ax+bcx+dy = \frac{ax+b}{cx+d}, solve the equation for xx and determine which yy-values make xx a real number.
  2. Analysis of Non-Negative Terms: Square terms (x2≥0x^2 \ge 0), absolute values (∣x∣≥0|x| \ge 0), and square roots (x≥0\sqrt{x} \ge 0) establish natural lower bounds on outputs.

Worked Example 2.1B: Range of a Rational Function

Find the range of f(x)=5x+2x−3f(x) = \frac{5x + 2}{x - 3}.

Step 1: Set y=f(x)y = f(x) and clear fractions.

y=5x+2x−3  ⟹  y(x−3)=5x+2  ⟹  yx−3y=5x+2y = \frac{5x + 2}{x - 3} \implies y(x - 3) = 5x + 2 \implies yx - 3y = 5x + 2

Step 2: Isolate xx terms on one side.

yx−5x=3y+2  ⟹  x(y−5)=3y+2  ⟹  x=3y+2y−5yx - 5x = 3y + 2 \implies x(y - 5) = 3y + 2 \implies x = \frac{3y + 2}{y - 5}

Step 3: Identify restrictions on yy. For xx to exist as a real number, the denominator y−5y - 5 cannot be zero. Thus, y≠5y \neq 5.

Range: (−∞,5)∪(5,∞)\text{Range: } (-\infty, 5) \cup (5, \infty)

4. Piecewise-Defined Functions

A piecewise-defined function is a function defined by different sub-formulas applied to distinct sub-domains (intervals) of input values:

f(x)={formula1if x∈interval1formula2if x∈interval2formula3if x∈interval3f(x) = \begin{cases} \text{formula}_1 & \text{if } x \in \text{interval}_1 \\ \text{formula}_2 & \text{if } x \in \text{interval}_2 \\ \text{formula}_3 & \text{if } x \in \text{interval}_3 \end{cases}

Evaluating Piecewise Functions

To evaluate f(c)f(c) for a constant cc:

  1. Locate which interval contains x=cx = c.
  2. Substitute x=cx = c only into the formula designated for that specific interval.

Worked Example 2.1C: Evaluating and Analyzing a Piecewise Function

Given g(x)={4−x2if x<12x+1if 1≤x≤418xif x>4g(x) = \begin{cases} 4 - x^2 & \text{if } x < 1 \\ 2x + 1 & \text{if } 1 \le x \le 4 \\ \frac{18}{x} & \text{if } x > 4 \end{cases}

Evaluate: (a) g(−3)g(-3), (b) g(1)g(1), (c) g(6)g(6).

  • For g(−3)g(-3): Since −3<1-3 < 1, use formula 1: g(−3)=4−(−3)2=4−9=−5g(-3) = 4 - (-3)^2 = 4 - 9 = -5.
  • For g(1)g(1): Since 11 satisfies 1≤x≤41 \le x \le 4, use formula 2: g(1)=2(1)+1=3g(1) = 2(1) + 1 = 3.
  • For g(6)g(6): Since 6>46 > 4, use formula 3: g(6)=186=3g(6) = \frac{18}{6} = 3.

5. CLEP Precalculus Exam Traps

Common TrapIncorrect AssumptionCorrect Mathematical Rule
Boundary Point MisinterpretationEvaluating a boundary point in the wrong inequalityCheck whether boundary signs are strict (<< or >>) or non-strict (≤\le or ≥\ge).
Even Root DenominatorsSetting g(x)≥0g(x) \ge 0 for f(x)=1g(x)f(x) = \frac{1}{\sqrt{g(x)}}If an even root is in the denominator, set g(x)>0g(x) > 0 strictly (excluding zero).
Canceling DiscontinuitiesClaiming f(x)=x2−9x−3f(x) = \frac{x^2-9}{x-3} has domain R\mathbb{R} because it simplifies to x+3x+3Domain must be determined before simplifying algebraic expressions (x≠3x \neq 3).
Test Your Knowledge

What is the domain of the function f(x)=2x+8/(x2−9)f(x) = \sqrt{2x + 8} / (x^2 - 9) in interval notation?

A

[−4,−3)∪(−3,3)∪(3,∞)[-4, -3) \cup (-3, 3) \cup (3, \infty)

B

(−∞,−3)∪(−3,3)∪(3,∞)(-\infty, -3) \cup (-3, 3) \cup (3, \infty)

C

[−4,∞)[-4, \infty)

D

(−4,3)∪(3,∞)(-4, 3) \cup (3, \infty)

Test Your Knowledge

Given the piecewise function g(x) = 3 - x^2 if x < 2; 2x - 5 if 2 <= x <= 6; |x - 8| if x > 6. What is the value of g(2) + g(7)?

A

-2

B

0

C

2

D

4

Test Your Knowledge

Which of the following sets of ordered pairs represents a function?

A

{(1, 2), (2, 5), (1, 7), (4, 9)}

B

{(3, -1), (5, 4), (3, 2), (8, 0)}

C

{(-2, 4), (0, 4), (2, 4), (5, 4)}

D

{(6, 1), (6, 2), (6, 3), (6, 4)}

Test Your Knowledge

What is the range of the rational function f(x) = (4x - 1) / (x + 2)?

A

(−∞,−2)∪(−2,∞)(-\infty, -2) \cup (-2, \infty)

B

(−∞,−1/4)∪(−1/4,∞)(-\infty, -1/4) \cup (-1/4, \infty)

C

(−∞,2)∪(2,∞)(-\infty, 2) \cup (2, \infty)

D

(−∞,4)∪(4,∞)(-\infty, 4) \cup (4, \infty)

Sections you finish are checked off in the contents.