Periodic Functions, the Horizontal Line Test, and Inverse Functions

Why Some Functions Cannot Be Directly Inverted — and How We Fix That

Target Audience: Pre-calculus / Calculus I students

Prerequisites: Basic understanding of functions, domain/range, and trigonometry fundamentals

SECTION 1

What It Means for a Function to Be Periodic

A function \(f\) is called periodic if there exists a positive real number \(T\) such that

\[ f(\theta + T) = f(\theta) \quad \text{for all } \theta \in \mathbb{R}. \]

The smallest such \(T \gt 0\) is called the fundamental period of \(f\).

Sine as the Primary Example

The sine function \(f(\theta) = \sin\theta\) has fundamental period \(T = 2\pi\):

\[ \sin(\theta + 2\pi) = \sin\theta \quad \text{for all } \theta \in \mathbb{R}. \]

This is not a curiosity — it is the defining structural fact about sine. The function traces the same output values over and over as \(\theta\) increases without bound. Every output value in \([-1, 1]\) is achieved infinitely many times.

Intuition: Think of wrapping the real number line around a unit circle of circumference \(2\pi\). Every time you complete one full revolution, you are back at the same point — and \(\sin\theta\) measures the same \(y\)-coordinate again.

Key Properties of \(\sin\theta\)

Property Value
Domain \(\mathbb{R}\) — all real numbers
Codomain / Range \([-1,\, 1]\)
Period \(2\pi\)
Zeros \(\theta = n\pi,\quad n \in \mathbb{Z}\)
Maximum value 1 Achieved at \(\theta = \dfrac{\pi}{2} + 2n\pi\)
Minimum value \(-1\) Achieved at \(\theta = -\dfrac{\pi}{2} + 2n\pi\)
SECTION 2

Two Fundamental Tests: Vertical and Horizontal Line Tests

These two tests answer entirely different questions about a graph.

The Vertical Line Test (VLT)

Question it answers: Is this graph the graph of a function?

A graph represents a function if and only if every vertical line \(x = c\) intersects the graph at most once. If any vertical line hits the graph twice, the relation assigns two outputs to a single input — violating the definition of a function.

The Horizontal Line Test (HLT)

Question it answers: Is this function one-to-one (injective)?

A function \(f\) is one-to-one if and only if every horizontal line \(y = k\) intersects the graph at most once. Failing this test means at least two distinct inputs produce the same output.

Decision Logic

SECTION 3

The Critical Distinction: "Is a Function" vs. "Is One-to-One"

This is one of the most important conceptual separations in introductory analysis.

Property Test Formal Statement Failure Means
Is a function Vertical Line Test \(\forall x,\; f(x)\) is unique One input → multiple outputs
Is one-to-one Horizontal Line Test \(f(a) = f(b) \Rightarrow a = b\) Two inputs → same output

These are independent properties. A relation can:

Important: "One-to-one" does not mean "each output comes from exactly one input" in some vague sense — it is the precise logical statement

\[ f(a) = f(b) \;\Rightarrow\; a = b, \]

or equivalently, \(a \neq b \Rightarrow f(a) \neq f(b)\).

SECTION 4

Why Sine Fails the Horizontal Line Test

The Subtle Point About Inputs

Here is the subtlety that trips up many students:

When \(\sin\theta\) is evaluated at \(\theta = \frac{\pi}{6}\) and at \(\theta = \frac{5\pi}{6}\), these are two genuinely distinct real numbers — there is no ambiguity, no repetition, no confusion in the inputs themselves. Yet:

\[ \sin\!\left(\frac{\pi}{6}\right) = \frac{1}{2} = \sin\!\left(\frac{5\pi}{6}\right). \]

The inputs \(\frac{\pi}{6} \approx 0.524\) and \(\frac{5\pi}{6} \approx 2.618\) are distinct elements of \(\mathbb{R}\). The sine function maps both of them to the same real number \(\frac{1}{2}\). This is not a failure of sine to be a function — it is a failure of sine to be injective.

Infinitely Many Witnesses

For any value \(y_0 \in (-1, 1)\), the equation \(\sin\theta = y_0\) has infinitely many solutions:

\[ \theta = \arcsin(y_0) + 2n\pi \quad \text{or} \quad \theta = \pi - \arcsin(y_0) + 2n\pi, \quad n \in \mathbb{Z}. \]

Every horizontal line \(y = y_0\) (for \(y_0 \in (-1,1)\)) intersects the sine curve infinitely many times — a spectacular failure of the HLT.

What This Looks Like

The horizontal line \(y = \frac{1}{2}\) cuts through \(\sin\theta\) at:

\[ \theta \in \left\{\ldots,\; -\frac{11\pi}{6},\; \frac{\pi}{6},\; \frac{5\pi}{6},\; \frac{13\pi}{6},\; \ldots\right\} \]

Every one of those \(\theta\) values is a distinct real number. Sine is a perfectly well-defined function — it just isn't injective.

SECTION 5

A Parallel Example — The Parabola

The parabola \(f(x) = x^2\) provides an excellent finite analogy.

HLT Failure for \(f(x) = x^2\)

For any \(k \gt 0\), the horizontal line \(y = k\) intersects \(y = x^2\) at exactly two points:

\[ x = \sqrt{k} \quad \text{and} \quad x = -\sqrt{k}. \]

For example, \(f(3) = 9 = f(-3)\). The inputs \(3\) and \(-3\) are distinct, but they share the output \(9\).

Sine vs. Parabola: HLT Failure Comparison

Feature \(\sin\theta\) \(f(x) = x^2\)
Type of failure Periodic (infinitely many-to-one) Symmetric (two-to-one for \(k \gt 0\))
Number of inputs per output Countably infinite 2 (for \(k \gt 0\)), 1 (for \(k = 0\))
Cause Periodicity: \(2\pi\) symmetry Even function: \(f(-x) = f(x)\)
Domain restriction fix Restrict to \([-\pi/2,\, \pi/2]\) Restrict to \([0, \infty)\)
Resulting inverse \(\arcsin x\) \(\sqrt{x}\)
SECTION 6

Common Functions That Fail the HLT

The following well-known functions all pass the VLT (they are genuine functions) but fail the HLT (they are not injective on their natural domains):

Function Natural Domain Why It Fails HLT Standard Restriction for Inverse
\(\sin\theta\) \(\mathbb{R}\) Periodic, period \(2\pi\) \([-\pi/2,\, \pi/2]\)
\(\cos\theta\) \(\mathbb{R}\) Periodic, period \(2\pi\) \([0,\, \pi]\)
\(\tan\theta\) \(\mathbb{R} \setminus \{(2n+1)\pi/2\}\) Periodic, period \(\pi\) \((-\pi/2,\, \pi/2)\)
\(x^2\) \(\mathbb{R}\) Even: \(f(-x) = f(x)\) \([0,\,\infty)\)
\(|x|\) \(\mathbb{R}\) Symmetric about \(y\)-axis \([0,\,\infty)\)
\(x^4\) \(\mathbb{R}\) Even function \([0,\,\infty)\)
\(\sin^2\theta\) \(\mathbb{R}\) Even and periodic \([0,\, \pi/2]\)
SECTION 7

Why the HLT Only Matters for Inverse Functions

A non-injective function is not broken — it is a perfectly valid function for most purposes: computing values, graphing, integrating, differentiating. The HLT becomes critical only when you ask:

Can we define an inverse?

What an Inverse Function Requires

The inverse function \(f^{-1}\) is defined by:

\[ f^{-1}(y) = x \quad \Longleftrightarrow \quad f(x) = y. \]

For this to define a function (not merely a relation), the right-hand side must determine \(x\) uniquely given \(y\). If \(f\) fails the HLT, then for some \(y\) there are multiple candidates for \(x\), and \(f^{-1}(y)\) would be multivalued — not a function.

Theorem.

A function \(f : A \to B\) has an inverse function \(f^{-1} : B \to A\) if and only if \(f\) is bijective — both injective (one-to-one) and surjective (onto).

For our purposes (defining inverses on restricted domains), surjectivity is handled by adjusting the codomain to equal the range. The hard constraint is injectivity, which is exactly what the HLT tests.

SECTION 8

Domain Restriction: The Fix

The Strategy

Rather than abandoning the inverse, we restrict the domain of the original function to a region where it is injective. On that restricted domain, the HLT is satisfied, and the inverse function is well-defined.

The restriction must be chosen carefully:

  1. The function must be injective on the chosen interval.
  2. The function should still achieve its full range on that interval (so the inverse has the most useful domain).
  3. By convention, the restriction is chosen to be the "most natural" or "principal" interval.

Case Study 1: \(\arcsin\) — Inverse of Sine

Problem: \(\sin\theta\) is not injective on \(\mathbb{R}\).

Fix: Restrict the domain of sine to \(\left[-\dfrac{\pi}{2},\, \dfrac{\pi}{2}\right]\).

On this interval:

Definition of \(\arcsin\):

\[ \arcsin : [-1,\, 1] \to \left[-\frac{\pi}{2},\, \frac{\pi}{2}\right] \]
\[ \arcsin(y) = \theta \quad \Longleftrightarrow \quad \sin\theta = y \;\text{ and }\; \theta \in \left[-\frac{\pi}{2},\, \frac{\pi}{2}\right]. \]

Worked Example

Question: Why is \(\arcsin\!\left(\dfrac{1}{2}\right) = \dfrac{\pi}{6}\) and not \(\dfrac{5\pi}{6}\)?

Answer: Both \(\dfrac{\pi}{6}\) and \(\dfrac{5\pi}{6}\) satisfy \(\sin\theta = \dfrac{1}{2}\). However:

  • ✅ \(\dfrac{\pi}{6} \approx 0.524 \in \left[-\dfrac{\pi}{2}, \dfrac{\pi}{2}\right]\) — this value is inside the principal range.
  • ❌ \(\dfrac{5\pi}{6} \approx 2.618 \notin \left[-\dfrac{\pi}{2}, \dfrac{\pi}{2}\right]\) — this value is outside the principal range.

By the definition of \(\arcsin\), we select only the value in the principal range, so \(\arcsin\!\left(\dfrac{1}{2}\right) = \dfrac{\pi}{6}\).

Case Study 2: \(\sqrt{x}\) — Inverse of \(x^2\)

The same logic applies to the parabola.

Problem: \(f(x) = x^2\) is not injective on \(\mathbb{R}\) because \(f(-3) = f(3) = 9\).

Fix: Restrict the domain to \([0, \infty)\), where \(f(x) = x^2\) is strictly increasing.

Definition of \(\sqrt{x}\):

\[ \sqrt{\,\cdot\,} : [0,\infty) \to [0,\infty), \quad \sqrt{x} = y \;\Longleftrightarrow\; y^2 = x \;\text{ and }\; y \geq 0. \]

This is why \(\sqrt{9} = 3\), not \(\pm 3\). The positive square root is a convention enforced by domain restriction, not an arbitrary choice — it is the canonical inverse of \(x^2\) on \([0,\infty)\).

SECTION 9

Key Takeaways

  1. Periodicity and injectivity are incompatible on the full real line. Any non-constant periodic function (like \(\sin\theta\)) must map multiple distinct inputs to the same output.
  2. The VLT and HLT answer different questions. VLT asks "is this a function?" HLT asks "is this function one-to-one?" A function can pass VLT and fail HLT — this is the normal situation for periodic and even functions.
  3. The inputs to \(\sin\theta\) are always distinct real numbers. The failure of HLT is not confusion among inputs — it is the fact that structurally different inputs can yield identical outputs.
  4. The HLT is a prerequisite for defining an inverse. An inverse function requires each output to come from exactly one input. If HLT fails, "the inverse" is multivalued and not a function.
  5. Domain restriction resolves the problem by surgically enforcing injectivity. We choose an interval on which the function is one-to-one and covers the full range. For \(\sin\theta\), this interval is \(\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]\), giving us \(\arcsin\). For \(x^2\), this is \([0,\infty)\), giving us \(\sqrt{x}\).
  6. The "principal value" of an inverse trig function is not arbitrary — it is the output dictated by the chosen domain restriction.

This tutorial is part of a series on real analysis and function theory. Next: continuity, limits, and the formal ε-δ definition.

Review Material for This Page