What Makes a Relation a Function?

Among all relations, one type is so important that the rest of mathematics is essentially built on it.

Key Point (Definition): A relation f from a set A to a set B is a function if every element of A has one and only one image in B. We write f:ABf : A \to B, and if (a,b)f(a, b) \in f we write f(a)=bf(a) = b — b is the image of a, and a is a preimage of b.

Unpack the definition into the two conditions you actually test:

  1. Every element of A is used — the domain of f is all of A; no input may be left without an image.
  2. No input has two images — no two distinct ordered pairs share the same first element.

A function is also called a map or mapping — picture it as a machine: feed in any element of A, exactly one element of B comes out. Feed in the same input twice, get the same output twice.

The test in action

  • R = {(2,1), (3,1), (4,2)} from {2, 3, 4}: every input appears once — function. (Two inputs sharing an output is fine!)
  • R = {(2,2), (2,4), (3,3), (4,4)}: the input 2 has two images (2 and 4) — not a function.
  • R = {(1,2), (2,3), (3,4), (4,5), (5,6), (6,7)}: each input once — function.
  • R = {(x, y) : y = x + 1} on A = {1, …, 6} (Section 2's arrow diagram): the element 6 has NO image — not a function from A to A.

[Board Important] "Same output, different inputs" never disqualifies a function; "same input, different outputs" always does. On an arrow diagram: every domain point fires exactly one arrow. On a graph: every vertical line meets the curve at most once (the vertical line test).

Real Functions, and the First Four Standard Graphs

Key Point (Definition): A function whose range is R\mathbb{R} or a subset of R\mathbb{R} is a real valued function; if its domain is also R\mathbb{R} or a subset of R\mathbb{R}, it is a real function.

From here on, our functions are real functions given by formulas like f(x)=2x+1f(x) = 2x + 1, and each deserves a mental picture — its graph, the set of points (x,f(x))(x, f(x)).

(i) Identity function: f(x)=xf(x) = x

Every input maps to itself. Domain R\mathbb{R}, range R\mathbb{R}. The graph is the straight line through the origin at 45°.

(ii) Constant function: f(x)=cf(x) = c

Every input maps to the same value c. Domain R\mathbb{R}, range {c}. The graph is a horizontal line.

Graphs of the identity function and a constant function

(iii) Polynomial functions: f(x)=a0+a1x+a2x2++anxnf(x) = a_0 + a_1 x + a_2 x^2 + \ldots + a_n x^n

Here n is a non-negative integer and the coefficients are real. Examples: f(x)=x3x2+2f(x) = x^3 - x^2 + 2. Non-examples: h(x)=x2/3+2xh(x) = x^{2/3} + 2x — the exponent 23\frac{2}{3} is not a non-negative integer.

The two model graphs: y=x2y = x^2 (a parabola through the origin, range [0,)[0, \infty)) and y=x3y = x^3 (rising through the origin, range R\mathbb{R}).

(iv) Rational functions: f(x)=f1(x)g1(x)f(x) = \frac{f_1(x)}{g_1(x)}, quotients of polynomials, defined where g1(x)0g_1(x) \neq 0

The model: f(x)=1xf(x) = \frac{1}{x} with domain R{0}\mathbb{R} - \{0\} and range R{0}\mathbb{R} - \{0\} — the two-branch hyperbola.

Graphs of x squared x cubed and one over x

[JEE Tip] Memorise each standard function as a domain-range pair — half the MCQs on this section reduce to quoting one. x2x^2: (R\mathbb{R}, [0,)[0, \infty)); x3x^3: (R\mathbb{R}, R\mathbb{R}); 1x\frac{1}{x}: (R{0}\mathbb{R} - \{0\}, R{0}\mathbb{R} - \{0\}).

Modulus, Signum and Greatest Integer

(v) Modulus function: f(x)=xf(x) = |x|

f(x)={x,x0x,x<0f(x) = \begin{cases} x, & x \geq 0 \\ -x, & x < 0 \end{cases}

For negative x, the output is the negative of x — hence positive. Domain R\mathbb{R}, range [0,)[0, \infty). The graph is the V with its corner at the origin.

(vi) Signum function

f(x)={1,x>00,x=01,x<0f(x) = \begin{cases} 1, & x > 0 \\ 0, & x = 0 \\ -1, & x < 0 \end{cases}

It reports only the sign of the input. Domain R\mathbb{R}, range {1-1, 0, 1}. For x0x \neq 0 it equals xx\frac{|x|}{x} (or xx\frac{x}{|x|}).

Graphs of the modulus function and the signum function

(vii) Greatest integer function: f(x)=[x]f(x) = [x]

[x][x] is the greatest integer less than or equal to x:

  • [2.7]=2[2.7] = 2, [0.4]=0[0.4] = 0, [3]=3[3] = 3
  • [0.5]=1[-0.5] = -1 and [2.1]=3[-2.1] = -3 — for negatives, round DOWN, not toward zero!

On each interval [n,n+1)[n, n + 1) the value is the constant n, producing the staircase graph. Domain R\mathbb{R}, range Z\mathbb{Z}.

Staircase graph of the greatest integer function

Key Point: nx<n+1    [x]=nn \leq x < n + 1 \iff [x] = n. This equivalence is how every [x][x] equation and inequality is solved.

[JEE Tip] The single most-tested value type: [2.1]=3[-2.1] = -3 (not 2-2). If this feels wrong, recall the definition — the greatest integer NOT exceeding 2.1-2.1 sits below it on the number line.

Solved Examples

Example 1. Examine each relation and state whether it is a function: (i) R = {(2,1), (3,1), (4,2)} (ii) R = {(2,2), (2,4), (3,3), (4,4)} (iii) R = {(1,2), (2,3), (3,4), (4,5), (5,6), (6,7)}.

Solution.

Step 1 — recall the test. Scan the FIRST coordinates: a relation is a function exactly when no first coordinate repeats with different partners (and every domain element appears).

(i) Step 2. First coordinates 2, 3, 4 — each appears once. The fact that 2 and 3 SHARE the image 1 is irrelevant (same output is always allowed). Function.

(ii) Step 3. The first coordinate 2 appears twice, with images 2 and 4 — one input, two outputs. Not a function.

(iii) Step 4. First coordinates 1 through 6, each exactly once. Function.

Takeaway: \"same output, different inputs\" never disqualifies; \"same input, different outputs\" always does.


Example 2. R is defined on N\mathbb{N} by R = {(x, y) : y = 2x, x, y N\in \mathbb{N}}. What are its domain, codomain and range? Is it a function?

Solution.

Step 1 — check the domain. For every natural x, the image 2x2x is again a natural number — no input is ever dropped: domain = N\mathbb{N}.

Step 2 — codomain and range. Codomain = N\mathbb{N} (the announced target). The images are 2,4,6,2, 4, 6, \ldots — the even naturals: range = {2, 4, 6, …}.

Step 3 — function test. Each x determines the single value 2x — one image per input. Yes, a function.

Takeaway: range \neq codomain is perfectly fine for a function — the odd naturals are simply never hit. (Whether range = codomain is what \"onto\" measures in Class 12.)


Example 3. f:NNf : \mathbb{N} \to \mathbb{N} is defined by f(x)=2x+1f(x) = 2x + 1. Complete the table for x = 1 to 7.

Solution.

Step 1 — substitute each value. f(1)=2(1)+1=3f(1) = 2(1) + 1 = 3; f(2)=5f(2) = 5; f(3)=7f(3) = 7; f(4)=9f(4) = 9; f(5)=11f(5) = 11; f(6)=13f(6) = 13; f(7)=15f(7) = 15.

Step 2 — observe the pattern. The outputs are consecutive odd numbers from 3 — each step in x adds 2 to the output, as the coefficient of x dictates.

Takeaway: a formula-defined function is evaluated by pure substitution; the coefficient of x controls the stride of the output list.


Example 4. A function is defined by f(x)=2x5f(x) = 2x - 5. Find (i) f(0) (ii) f(7) (iii) f(3-3).

Solution.

(i) Step 1. f(0)=2(0)5=05=5f(0) = 2(0) - 5 = 0 - 5 = -5.

(ii) Step 2. f(7)=2(7)5=145=9f(7) = 2(7) - 5 = 14 - 5 = 9.

(iii) Step 3 — signs intact. f(3)=2(3)5=65=11f(-3) = 2(-3) - 5 = -6 - 5 = -11. (Not 6+5=1-6 + 5 = -1 — subtracting 5 pushes further negative.)

Takeaway: substitute with brackets around negative inputs; the double negative in (iii) is where marks are lost.

Example 5. The function t maps Celsius to Fahrenheit: t(C)=9C5+32t(C) = \frac{9C}{5} + 32. Find (i) t(0) (ii) t(28) (iii) t(10-10) (iv) the value of C when t(C) = 212.

Solution.

(i) Step 1. t(0)=05+32=32t(0) = \frac{0}{5} + 32 = 32 — freezing point: 0°C = 32°F.

(ii) Step 2. t(28)=9×285+32=2525+32=50.4+32=82.4t(28) = \frac{9 \times 28}{5} + 32 = \frac{252}{5} + 32 = 50.4 + 32 = 82.4.

(iii) Step 3. t(10)=9×(10)5+32=905+32=18+32=14t(-10) = \frac{9 \times (-10)}{5} + 32 = \frac{-90}{5} + 32 = -18 + 32 = 14.

(iv) Step 4 — reverse the function. Set the output: 9C5+32=212\frac{9C}{5} + 32 = 212. Subtract 32: 9C5=180\frac{9C}{5} = 180. Multiply by 59\frac{5}{9}: C=180×59=100C = \frac{180 \times 5}{9} = 100.

Step 5 — physical check. Water boils at 100°C = 212°F ✓ — the algebra matches the physics.

Takeaway: part (iv) runs the machine backwards: fix the output, solve for the input — the first taste of inverse functions.


Example 6. Evaluate: (i) 7|{-7}| (ii) 38|3 - 8| (iii) f(4)f(-4) for f(x)=x1f(x) = |x - 1|. Where is the corner of the graph of x1|x - 1|?

Solution.

(i) Step 1. 7=7|-7| = 7 — modulus strips the sign.

(ii) Step 2 — inside first. 38=53 - 8 = -5, then 5=5|-5| = 5.

(iii) Step 3. f(4)=41=5=5f(-4) = |-4 - 1| = |-5| = 5.

Step 4 — locate the corner. The V-corner sits where the inside vanishes: x1=0x - 1 = 0, i.e. x = 1. The graph of x1|x - 1| is the V of x|x| shifted RIGHT by 1.

Takeaway: always work inside-out — evaluate the inside, then strip the sign; corners of modulus graphs sit at the zeros of the inside.


Example 7. For the signum function, find f(7), f(4.2-4.2), f(0), and the range of f over the domain [3,1][-3, -1].

Solution.

Step 1 — apply the three-case definition. f(7)=1f(7) = 1 (input positive); f(4.2)=1f(-4.2) = -1 (negative); f(0)=0f(0) = 0 (the special middle case).

Step 2 — restrict to [3,1][-3, -1]. Every number in this interval is negative, so the signum is constantly 1-1 there.

Step 3 — range over the restriction. Only one value occurs: range = {1-1}.

Takeaway: signum ignores magnitude entirely — restricting the domain to one sign collapses the range to a single value.


Example 8. Evaluate: (i) 3.7 1.2-1.2 5 0.01-0.01 [1.99].

Solution.

Step 1 — recall the definition. [x] = the greatest integer LESS THAN OR EQUAL to x — on the number line, drop to the nearest integer at or below x.

(i) Step 2. [3.7]=3[3.7] = 3 (truncate the positive).

(ii) Step 3. [1.2][-1.2]: the integers at or below 1.2-1.2 are 2,3,-2, -3, \ldots; the greatest is 2-2. (NOT 1-1, which exceeds 1.2-1.2.)

(iii) Step 4. [5]=5[5] = 5 — integers are their own floor.

(iv) Step 5. [0.01]=1[-0.01] = -1 — even a hair below zero drops to 1-1.

(v) Step 6. [1.99]=1[1.99] = 1 — still short of 2, no matter how close.

Takeaway: positives truncate; negatives drop DOWN — the pair [1.2]=2[-1.2] = -2 and [1.99]=1[1.99] = 1 covers both classic traps.

Example 9. Find the domain and range of f(x)=9x2f(x) = \sqrt{9 - x^2}.

Solution.

Step 1 — domain: keep the radicand non-negative. 9x20    x29    3x39 - x^2 \geq 0 \iff x^2 \leq 9 \iff -3 \leq x \leq 3. Domain = [3,3][-3, 3] (endpoints allowed: 0=0\sqrt{0} = 0 is fine).

Step 2 — range: track the radicand. As x runs over [3,3][-3, 3], x2x^2 runs from 0 to 9, so 9x29 - x^2 runs from 9 (at x = 0) down to 0 (at x=±3x = \pm 3).

Step 3 — take the square root.  \sqrt{\ } maps [0,9][0, 9] onto [0,3][0, 3]: range = [0,3][0, 3]. Only the principal (non-negative) root counts.

Step 4 — geometric check. y=9x2y = \sqrt{9 - x^2} squares to x2+y2=9x^2 + y^2 = 9 with y0y \geq 0 — the UPPER half of a circle of radius 3, confirming both domain and range.

Takeaway: even-root domains come from radicand 0\geq 0; the range follows by tracking the radicand's own range through the root.


Example 10. Find the domain and range of f(x)=xf(x) = -|x|.

Solution.

Step 1 — domain. x|x| is defined for every real number, and negation changes nothing: domain = R\mathbb{R}.

Step 2 — range via the chain. x0|x| \geq 0 always, so x0-|x| \leq 0: outputs are confined to (,0](-\infty, 0].

Step 3 — every such value is attained. For any y0y \leq 0, take x=y0x = -y \geq 0: then x=(y)=y-|x| = -(-y) = y. So range = (,0](-\infty, 0].

Takeaway: the graph is the V of x|x| flipped upside down — an inverted V peaking at the origin; negating a function reflects its range about 0.


Example 11. Find the range of: (i) f(x)=23xf(x) = 2 - 3x, xRx \in \mathbb{R}, x>0x > 0 (ii) f(x)=x2+2f(x) = x^2 + 2 (iii) f(x)=xf(x) = x, x real.

Solution.

(i) Step 1 — chain the inequalities. x>03x>03x<023x<2x > 0 \Rightarrow 3x > 0 \Rightarrow -3x < 0 \Rightarrow 2 - 3x < 2. Every value below 2 is attained (solve 23x=y2 - 3x = y for any y<2y < 2: x=2y3>0x = \frac{2-y}{3} > 0 ✓). Range = (,2)(-\infty, 2) — OPEN at 2 because x = 0 is excluded.

(ii) Step 2. x20x^2 \geq 0 with equality AT x = 0, so x2+22x^2 + 2 \geq 2 with the minimum 2 attained. Range = [2,)[2, \infty) — CLOSED at 2.

(iii) Step 3. The identity function hits every real: range = R\mathbb{R}.

Takeaway: track a chain of inequalities from the core piece, then decide open vs closed by asking whether the extreme is actually attained — (i) open, (ii) closed.


Example 12. The function f is defined by f(x)={1x,x<01,x=0x+1,x>0f(x) = \begin{cases} 1 - x, & x < 0 \\ 1, & x = 0 \\ x + 1, & x > 0 \end{cases}. Describe its graph.

Solution.

Step 1 — plot the left piece. For x < 0, f(x)=1xf(x) = 1 - x: at x=1,2,3x = -1, -2, -3 the values are 2, 3, 4 — a line of slope 1-1 rising leftward from near (0, 1).

Step 2 — plot the right piece. For x > 0, f(x)=x+1f(x) = x + 1: values 2, 3, 4 at x = 1, 2, 3 — slope +1+1 rising rightward.

Step 3 — the joint. f(0)=1f(0) = 1 closes the gap: both pieces approach (0, 1), so the graph is one connected V with vertex (0, 1).

Step 4 — recognise the function. For x<0x < 0: 1x=1+x1 - x = 1 + |x|; for x0x \geq 0: x+1=x+1x + 1 = |x| + 1. The whole formula is f(x)=x+1f(x) = |x| + 1 — the modulus V lifted one unit.

Takeaway: recognising a piecewise formula as a shifted modulus turns a graphing chore into a single sentence.

Example 13. The relation f is defined by f(x)={x2,0x33x,3x10f(x) = \begin{cases} x^2, & 0 \leq x \leq 3 \\ 3x, & 3 \leq x \leq 10 \end{cases} and the relation g by g(x)={x2,0x23x,2x10g(x) = \begin{cases} x^2, & 0 \leq x \leq 2 \\ 3x, & 2 \leq x \leq 10 \end{cases}. Show that f is a function and g is not.

Solution.

Step 1 — locate the danger point. In a piecewise definition the only risk of \"two images for one input\" is where the pieces OVERLAP — here the shared boundary point.

Step 2 — test f at x = 3. First formula: 32=93^2 = 9. Second: 3×3=93 \times 3 = 9. The two claims AGREE, so x = 3 has the single image 9; every other x falls under exactly one formula. f is a function.

Step 3 — test g at x = 2. First formula: 22=42^2 = 4. Second: 3×2=63 \times 2 = 6. Two DIFFERENT images for the input 2. g is not a function.

Takeaway: for piecewise definitions, check agreement at every overlapping boundary — that single check decides the matter.


Example 14. Let f = {(1, 1), (2, 3), (0, 1-1), (1-1, 3-3)} be a function from Z\mathbb{Z} to Z\mathbb{Z} defined by f(x)=ax+bf(x) = ax + b. Determine a and b.

Solution.

Step 1 — pick the easiest data point. (0,1)(0, -1): f(0)=a(0)+b=b=1f(0) = a(0) + b = b = -1.

Step 2 — use a second point. (1,1)(1, 1): f(1)=a+b=1f(1) = a + b = 1, and with b=1b = -1: a=2a = 2.

Step 3 — verify with the remaining points. f(2)=2(2)1=3f(2) = 2(2) - 1 = 3 ✓ matches (2, 3); f(1)=21=3f(-1) = -2 - 1 = -3 ✓ matches (1-1, 3-3).

Step 4 — conclude. f(x)=2x1f(x) = 2x - 1, i.e. a = 2, b = 1-1.

Takeaway: two points determine a line — use x = 0 first if available (it isolates b instantly), and spend the leftover points on verification.


Example 15. Let f be the subset of Z×Z\mathbb{Z} \times \mathbb{Z} defined by f = {(ab, a + b) : a, b Z\in \mathbb{Z}}. Is f a function from Z\mathbb{Z} to Z\mathbb{Z}?

Solution.

Step 1 — understand the pairs. Each pair has first entry the PRODUCT ab and second entry the SUM a + b. A function would require: same product ⟹ same sum, always.

Step 2 — hunt among factorisations. The number 4 factors two ways: 4=1×44 = 1 \times 4 gives the pair (4, 5); 4=2×24 = 2 \times 2 gives the pair (4, 4).

Step 3 — verdict. The input 4 has two different images, 5 and 4. Not a function.

Takeaway: to disprove \"function\", exhibit ONE input with two images — numbers with multiple factorisations are the natural hunting ground.


Example 16. Let A = {9, 10, 11, 12, 13} and f:ANf : A \to \mathbb{N} be defined by f(n) = the highest prime factor of n. Find the range of f.

Solution.

Step 1 — factorise each element. 9=329 = 3^2 → highest prime 3. 10=2×510 = 2 \times 5 → 5. 1111 is prime → 11. 12=22×312 = 2^2 \times 3 → 3. 1313 is prime → 13.

Step 2 — collect the images. 3, 5, 11, 3, 13 — as a set (repeats once): range = {3, 5, 11, 13}.

Takeaway: a function needs no algebraic formula — any well-defined rule qualifies; note 2 divides 10 and 12 yet never appears, because it is never the HIGHEST prime factor.