2.2.4Functions

Vertical line test for functions

2,086 words9 min readdifficulty · medium1 backlinks

Definition

Mathematical restatement: For all adomaina \in \text{domain}, there exists at most one bb such that (a,b)R(a,b) \in R.


Why This Works: Derivation from the Function Definition

Start with the formal definition of a function: f:AB is a function     xA,!yB such that y=f(x)f: A \to B \text{ is a function } \iff \forall x \in A, \exists! \, y \in B \text{ such that } y=f(x)

The symbol !\exists! means "there exists exactly one."

Step 1: What does the graph of a relation look like?

  • The graph is the set of all points (x,y)(x,y) where the relation holds.
  • For a function ff, the graph is {(x,f(x)):xdomain}\{(x, f(x)) : x \in \text{domain}\}.

Step 2: What does a vertical line represent?

  • A vertical line at x=ax=a is the set {(a,y):yR}\{(a, y) : y \in \mathbb{R}\}.
  • It fixes the xx-coordinate and varies yy.

Step 3: What does intersection mean?

  • The vertical line x=ax=a intersects the graph at all points (a,y)(a, y) that lie on the graph.
  • If the graph represents a function, there can be at most one yy for each x=ax=a (by the definition of function).
  • One intersection → exactly one yy for that xx → function behavior✓
  • Zero intersectionsaa not in domain → still okay (function just undefined there)
  • Two or more intersections → multiple yy values for x=ax=a → violates function definition ✗

Conclusion: The vertical line test is a visual encoding of the uniqueness condition in the function definition.

Figure — Vertical line test for functions

Worked Examples

Graph: x2+y2=25x^2 + y^2 = 25 (circle centered at origin, radius 5)

Test: Draw vertical line at x=3x=3. x=3    9+y2=25    y2=16    y=±4x=3 \implies 9 + y^2 = 25 \implies y^2 = 16 \implies y = \pm 4

Result: The line crosses at (3,4)(3, 4) and (3,4)(3, -4)two points.

Why this step? We're checking if one xx gives multiple yy values. Herex=3givesbothgives bothy=4andandy=-4$, so it's not a function.

Conclusion: ✗ Not a function. The relation is multivalued at many xx coordinates.


Graph: y=x2y = x^2 (standard parabola opening upward)

Test: Draw vertical line at any x=ax=a. x=a    y=a2x=a \implies y = a^2

Result: For each x=ax=a, there is exactly one y=a2y = a^2. The vertical line crosses at only one point (a,a2)(a, a^2).

Why this step? We're verifying that every input xx produces exactly one output yy. No matter which aa we pick, y=a2y=a^2 is unique.

Conclusion: ✓ Passes the test → y=x2y=x^2 is a function.


Graph: y2=xy^2 = x (sideways parabola)

Test: Draw vertical line at x=4x=4. x=4    y2=4    y=±2x=4 \implies y^2 = 4 \implies y = \pm 2

Result: Two intersections at (4,2)(4, 2) and (4,2)(4, -2).

Why this step? We're looking for any xx that produces multiple yy values. For x=4x=4, we get y=2y=2 and y=2y=-2, breaking the function rule.

Conclusion: ✗ Not a function. (Though y=xy = \sqrt{x} and y=xy = -\sqrt{x} individually are functions.)


Graph: f(x)={x+1x<0x2x0f(x) = \begin{cases} x+1 & x < 0 \\ x^2 & x \geq 0 \end{cases}

Test:

  • For x=2x=-2: y=2+1=1y = -2+1 = -1 (one point)
  • For x=0x=0: y=02=0y = 0^2 = 0 (one point)
  • For x=2x=2: y=22=4y = 2^2 = 4 (one point)

Result: Every vertical line intersects at most once.

Why this step? Even though the rule changes at x=0x=0, eachxstillmapstoexactlyonestill maps to exactly oney$. The "jump" doesn't create multiple outputs for a single input.

Conclusion: ✓ Passes → It's a function.


Common Mistakes




Recall Explain to a 12-year-old

Imagine you have a vending machine. You press button A3, and a candy bar comes out. That's a function: one button → one item.

Now imagine a broken machine: you press A3 and two candy bars fall out. That's not a function anymore because one input (button A3) gave you two outputs (two candy bars).

The vertical line test is like checking the machine: if pressing one button (one xx value) ever gives you more than one snack (more than one yy value), the machine is broken—it's not a function.

A vertical line is like holding your finger at one spot on the button panel (fixing xx) and seeing how many items come out. If it's always0 or 1 item, you're good. If it's ever 2 or more, the machine fails the test!


Mnemonic


Connections 2.1.01-Definition-of-a-function — Formal definition that the vertical line test visualizes

  • 2.2.01-Graph-of-a-function — How functions appear graphically
  • 2.2.05-Horizontal-line-test-for-injective-functions — Complementary test for one-to-one functions
  • 2.3.02-Domain-and-rangefrom-graphs — Using graphs to determine where functions are defined
  • 3.1.01-Inverse-functions — Requires passing both vertical and horizontal line tests

#flashcards/maths

What is the vertical line test? :: A relation is a function if and only if every vertical line intersects its graph at at most one point.

Why does the vertical line test work?
A vertical line at x=ax=a represents all points with that xx-coordinate. If it crosses the graph multiple times, that xx has multiple yy values, violating the function definition (one output per input).
Does the graph of x2+y2=9x^2 + y^2 = 9 pass the vertical line test?
No. For example, at x=0x=0, we get y=±3y = \pm 3 (two intersections), so it's not a function.
Does a graph with a jump discontinuity fail the vertical line test?
No. A jump means the function is undefined or changes value suddenly, but as long as each xx maps to at most one yy, it still passes the test.
If a vertical line never intersects a graph at some x=ax=a, does that mean it fails the test?
No. Zero intersections just means aa is not in the domain. The test only fails if there are two or more intersections.
What's the difference between the vertical and horizontal line tests?
Vertical line test checks if a relation is a function (one output per input). Horizontal line test checks if a function is one-to-one/injective (one input per output).
True or false: y=sin(x)y = \sin(x) fails the vertical line test.
False. Every xx gives exactly one y=sin(x)y = \sin(x), so it passes. (It fails the horizontal line test because sine repeats values.)

Concept Map

requires

encoded as

uses

leads to

if one

if many

satisfies

violates

x=3 gives y=+-4

x=a gives y=a2

Function definition: one input one output

Uniqueness: exactly one y per x

Vertical line test

Vertical line x=a fixes input

Count intersections with graph

At most one point → Function

Two or more points → Not a function

Circle x2+y2=25

Parabola y=x2

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Vertical line testek bahut simple visual trick hai yeh check karne ke liye kioi graph function hai ya nahin. Socho agar tumhare pas ek graph hai aur tum ek vertical line (seedhi khari line, jaise x=3x=3) ko left se right move karte ho. Agar yeh line graph ko ek se zyada jagah pe cut karti hai kabhi bhi, toh woh graph function nahin hai. Kyun? Kyunki function ka matlab hai "ek input pe sirf ek output"—agar x=3x=3 pe tumhe do alag yy values mil rahe hain, toh rule toot gaya.

Yeh test isliye kaam karta hai kyunki vertical line ek particular xx ko "freeze" kar deti hai aur sari possible yy values check karti hai. Circle ka example lo: x2+y2=25x^2+y^2=25. Agar tum x=3x=3 pe vertical line draw karo, toh graph (3,4)(3,4) aur (3,4)(3,-4) dono pe cross hoga—matlab ek xx pe do yy, toh not a function. Lekin parabola y=x2y=x^2 mein har xx pe sirf ek hi yy milega, toh woh function hai.

Yeh test bahut practical hai graphing mein—tumhe equation solve karne ki zaroorat nahin, bas visual check karo. Agar koi bhi vertical line zyada se zyada ek baar graph ko touch kare (ya bilkul na kare,agar woh xx domain mein nahin hai), toh function hai. Common mistake: log sochte hain ki agar graph wavy hai ya broken hai toh function nahin hoga—galat! Wavy graphs (jaise sin(x)\sin(x)) bhi function ho sakte hain agar har xx pe sirf eky$ ho. Bas yeh dhyan rakho: vertical = function check, horizontal = one-to-one check.

Yeh test basically function ki definition ko geometric language mein translate karta hai. Jab tum calculus ya advanced maths padhoge, tab bhi yeh foundation kaam ayega—inverse functions, graphical analysis, sab mein. Toh isko ache se samajh lo: vertical line test =ek input, ek output ki guarantee check karna, visually!

Go deeper — visual, from zero

Test yourself — Functions

Connections