Weeks
Mathematics 1Week 5 · Functions: Line Tests, Exponential, Composite and Inverse Functions
Week 5 Notes

Mathematics for
Data Science 1

Functions from the ground up: domain and range, the vertical and horizontal line tests, one-one and onto functions, exponential functions, composite functions and inverse functions.

6 chapters~22 min read
FunctionsLine testsExponentialCompositeInverse

Chapters

  1. 01Functions and the Vertical Line TestWhat is a function?
  2. 02One-one, Onto, Bounded, MonotonicProperties of functions
  3. 03Exponential FunctionsExponential functions
  4. 04Composite FunctionsComposition
  5. 05Inverse FunctionsInverse functions
  6. 06Week 5 Summary SheetAll topics
01
What is a function?

Functions and the Vertical Line Test

Relation and function, domain and range, graphs, the vertical line test and some common functions.

1.1Relation and function

In simple words

A function is a machine: you put in an input and it gives exactly one output. The same input can never give two different outputs.

Definition

A relation from a set A to a set B is a subset of A×BA \times B. A relation f from A to B is a function, written f:A→Bf : A \to B, if every a∈Aa \in A has exactly one b∈Bb \in B with (a,b)∈f(a, b) \in f. We write f(a)=bf(a) = b and call b the image of a.

AB123aba function (two inputs may share an output)AB123abnot a function: 1 has two images
Figure 1. A function and a relation that is not a function

Every element of A must have exactly one arrow leaving it. Two inputs may share an output (left: 1 and 3 both go to a), but one input may not have two outputs (right: the orange arrows from 1).

Example 1: is it a function?

Is R={(1,a),(2,b),(3,a),(1,b)}R = \{(1, a), (2, b), (3, a), (1, b)\} from A={1,2,3}A = \{1, 2, 3\} to B={a,b}B = \{a, b\} a function?

  • The element 1 has two images, a and b.
  • This breaks the "one input, one output" rule.
  • Answer: not a function.
Remember. All functions are relations, but not all relations are functions.

1.2Domain, codomain and range

TermMeaning
Domainthe set A of allowed inputs
Codomainthe set B where outputs are allowed to lie
Range (image)the outputs actually produced: {f(a)∣a∈A}⊂B\{f(a) \mid a \in A\} \subset B
Range vs codomain. The range is inside the codomain but need not fill it. For f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2, the codomain is R\mathbb{R} but the range is only [0,∞)[0, \infty).

Example 2: range of two functions

(a) f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2. (b) h:R→Rh : \mathbb{R} \to \mathbb{R}, h(x)=x3+5h(x) = x^3 + 5. Find the range of each.

  • (a) x2≥0x^2 \ge 0 for every real x, and every y≥0y \ge 0 equals (y)2(\sqrt{y})^2. Range =[0,∞)= [0, \infty).
  • (b) x3x^3 takes every real value, so x3+5x^3 + 5 does too. Range =R= \mathbb{R} (by the intermediate value theorem).
  • Answer: (a) [0, ∞) (b) ℝ.

1.3Finding the domain (NCERT)

In simple words

If no domain is given, take the largest set of real x where the formula makes sense. Three things break a formula:

ProblemRuleExample → domain
Division by zerodenominator ≠ 01x−2\frac{1}{x-2} → R∖{2}\mathbb{R} \setminus \{2\}
Even root of a negativeexpression under √ must be ≥ 0x−3\sqrt{x-3} → [3,∞)[3, \infty)
Log of a non-positiveexpression inside log must be > 0log⁡(5−x)\log(5 - x) → (−∞,5)(-\infty, 5)

1.4Graph of a function

Definition

The graph of f:X→Yf : X \to Y is the set Γ(f)={(x,f(x))∣x∈X}⊂X×Y\Gamma(f) = \{(x, f(x)) \mid x \in X\} \subset X \times Y. Example: f(x)=7x+2f(x) = 7x + 2 has graph {(x,7x+2)∣x∈R}\{(x, 7x + 2) \mid x \in \mathbb{R}\}. To draw it, collect inputs and outputs, plot the points (x,f(x))(x, f(x)) and join them.

1.5Vertical line test (NCERT)

In simple words

A graph is the picture of a function only if no input has two outputs. Two outputs for one x would be two points directly above each other, on the same vertical line.

Vertical line test

A curve in the plane is the graph of a function of x if and only if every vertical line cuts it at most once.

-2-1121234-11-11(0.6, 0.8)(0.6, −0.8)y = x²: every vertical line meets it oncex² + y² = 1: x = 0.6 meets it twice
Figure 2. Vertical line test: the parabola passes, the circle fails

Left: the line x=1x = 1 meets the parabola once, and so does every vertical line, so it is a function. Right: x=0.6x = 0.6 meets the circle at (0.6,0.8)(0.6, 0.8) and (0.6,−0.8)(0.6, -0.8) (since 0.36+0.64=10.36 + 0.64 = 1), so the circle is not a function graph.

1.6Common types of functions

TypeFormNotes
Linearf(x)=ax+bf(x) = ax + ba≠0a \ne 0; graph is a straight line
Quadraticf(x)=ax2+bx+cf(x) = ax^2 + bx + ca≠0a \ne 0; graph is a parabola
Polynomial of degree nanxn+⋯+a1x+a0a_n x^n + \cdots + a_1 x + a_0an≠0a_n \ne 0
Exponentialf(x)=axf(x) = a^xa>0a > 0 (a≠1a \ne 1 to be useful); Chapter 3
Logarithmicf(x)=log⁡axf(x) = \log_a xa>0,a≠1a > 0, a \ne 1; domain x>0x > 0
Trigonometricsin⁡x,cos⁡x,tan⁡x,…\sin x, \cos x, \tan x, \ldotsperiodic

1.7Step and modulus functions

FunctionMeaningValues
Floor ⌊x⌋\lfloor x \rfloorgreatest integer ≤ x⌊2.7⌋=2\lfloor 2.7 \rfloor = 2, ⌊−1.3⌋=−2\lfloor -1.3 \rfloor = -2
Ceiling ⌈x⌉\lceil x \rceilsmallest integer ≥ x⌈2.1⌉=3\lceil 2.1 \rceil = 3, ⌈−1.3⌉=−1\lceil -1.3 \rceil = -1
Modulus ∣x∣|x|x if x≥0x \ge 0; −x if x<0x < 0∣−5∣=5|-5| = 5, ∣3∣=3|3| = 3

Floor on [−1,2)[-1, 2): ⌊x⌋=−1\lfloor x \rfloor = -1 for −1≤x<0-1 \le x < 0, 0 for 0≤x<10 \le x < 1, 1 for 1≤x<21 \le x < 2. Ceiling on (−1,2)(-1, 2): ⌈x⌉=0\lceil x \rceil = 0 for −1<x≤0-1 < x \le 0, 1 for 0<x≤10 < x \le 1, 2 for 1<x<21 < x < 2.

-2-1123-2-1123floor ⌊x⌋: rounds down-2-1123-2-1123ceiling ⌈x⌉: rounds upfilled dot = included, hollow = left out
Figure 3. Floor and ceiling are step functions
Watch the negatives. Floor always rounds down (towards −∞-\infty), so ⌊−1.3⌋=−2\lfloor -1.3 \rfloor = -2, not −1. Ceiling rounds up.

1.8Going deeper

  1. Domain rules combine (extra remark). For x−1x−4\frac{\sqrt{x-1}}{x-4} apply both: x≥1x \ge 1 from the root and x≠4x \ne 4 from the denominator, so the domain is [1,∞)[1, \infty) without 4.
  2. Floor and ceiling differ only off the integers (extra remark). For an integer n, ⌊n⌋=⌈n⌉=n\lfloor n \rfloor = \lceil n \rceil = n; otherwise ⌈x⌉=⌊x⌋+1\lceil x \rceil = \lfloor x \rfloor + 1. In Figure 3 that is why the dots sit at opposite ends of the steps.
  3. Both tests use lines. The vertical line test asks "is it a function?"; the horizontal line test of Chapter 2 asks "is it one-one?".
Exam tips
  • For "is it a function?", look for one input with two outputs.
  • For the domain, list every root, denominator and log, and intersect the conditions.
Common mistakes
  • Calling the codomain the range.
  • Writing ⌊−1.3⌋=−1\lfloor -1.3 \rfloor = -1.
Next · Properties of functionsOne-one, Onto, Bounded, Monotonic
02
Properties of functions

One-one, Onto, Bounded, Monotonic

One-one and onto with the horizontal line test, bounded and monotonic functions, and arithmetic of functions.

2.1One-one and onto (NCERT)

In simple words

One-one: different inputs always give different outputs. Onto: every element of the codomain is actually hit by some input.

NameDefinitionSay it as
One-one (injective)f(x1)=f(x2)⇒x1=x2f(x_1) = f(x_2) \Rightarrow x_1 = x_2no two inputs share an output
Onto (surjective)for every y in the codomain there is x with f(x)=yf(x) = yrange = codomain
Bijectiveone-one and ontoperfect pairing of A with B
Proving one-one. Assume f(x1)=f(x2)f(x_1) = f(x_2) and show x1=x2x_1 = x_2. To disprove it, give one pair of different inputs with the same output: (−2)2=22(-2)^2 = 2^2, so x2x^2 on R\mathbb{R} is not one-one.

2.2Horizontal line test (NCERT)

Horizontal line test

f is one-one if every horizontal line meets the graph at most once. f is onto its codomain if every horizontal line at a height in the codomain meets the graph at least once. So f is bijective if every such line meets it exactly once.

-2-1121234-2-112-4-224y = x²: y = 4 is hit twice, not one-oney = x³/3: every level hit once, one-one and onto
Figure 4. Horizontal line test: x² fails, the cubic passes

The line y=4y = 4 meets y=x2y = x^2 at x=−2x = -2 and x=2x = 2, so x2x^2 on R\mathbb{R} is not one-one. Every horizontal line meets y=x3/3y = x^3/3 exactly once, so this cubic is one-one and onto R\mathbb{R}.

FunctionOne-one?Onto?Verdict
2x+32x + 3, R→R\mathbb{R} \to \mathbb{R}yesyesbijective
x2x^2, R→R\mathbb{R} \to \mathbb{R}no: f(2) = f(−2)no: −1 is never hitneither
x2x^2, [0,∞)→[0,∞)[0, \infty) \to [0, \infty)yesyesbijective
∣x∣|x|, R→R\mathbb{R} \to \mathbb{R}no: |−3| = |3|no: range is [0, ∞)neither
Changing the domain or codomain changes the answer

The same formula x2x^2 is neither one-one nor onto on R→R\mathbb{R} \to \mathbb{R}, but bijective on [0,∞)→[0,∞)[0, \infty) \to [0, \infty). This is exactly how x2x^2 gets an inverse in Chapter 5.

2.3Bounded functions

Definition

f:D→Rf : D \to \mathbb{R} is bounded if there are numbers m and M with m≤f(x)≤Mm \le f(x) \le M for all x∈Dx \in D. Otherwise f is unbounded.

Example 3: a bounded function

Is f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=1x2+1f(x) = \frac{1}{x^2 + 1} bounded?

  • x2+1≥1x^2 + 1 \ge 1 for every x, so 1x2+1≤1\frac{1}{x^2+1} \le 1.
  • It is also positive, so 0≤f(x)≤10 \le f(x) \le 1 for all x.
  • Answer: bounded, with m = 0 and M = 1.

Example 4: an unbounded function

Is f:(0,∞)→Rf : (0, \infty) \to \mathbb{R}, f(x)=1xf(x) = \frac{1}{x} bounded?

  • Suppose f(x)≤Mf(x) \le M for all x>0x > 0.
  • Take x=1M+1x = \frac{1}{M+1}, which lies in (0,∞)(0, \infty). Then f(x)=M+1>Mf(x) = M + 1 > M, a contradiction.
  • Answer: unbounded.
-4-2241M = 1m = 0123424681/(x² + 1): trapped between 0 and 11/x on (0, ∞): no ceiling near 0
Figure 5. A bounded function and an unbounded one
A small gap (extra remark). x=1M+1x = \frac{1}{M+1} is positive only if M>−1M > -1. If someone proposes M≤−1M \le -1, even easier: f(1)=1>Mf(1) = 1 > M. Either way no upper bound works.

2.4Monotonic functions

Definition

Increasing: x≤y⇒f(x)≤f(y)x \le y \Rightarrow f(x) \le f(y) for all x, y in the domain. Decreasing: x≤y⇒f(x)≥f(y)x \le y \Rightarrow f(x) \ge f(y).

In simple words

Increasing: the graph never goes down as you move right. Decreasing: it never goes up.

Example 5: increasing or decreasing?

(a) f(x)=x2f(x) = x^2 on [0,∞)[0, \infty). (b) f(x)=7−4xf(x) = 7 - 4x on R\mathbb{R}. (c) f(x)=∣x∣f(x) = |x| on R\mathbb{R}.

  • (a) 0≤x≤y⇒x2≤y20 \le x \le y \Rightarrow x^2 \le y^2: increasing.
  • (b) x≤y⇒−4y≤−4x⇒7−4y≤7−4xx \le y \Rightarrow -4y \le -4x \Rightarrow 7 - 4y \le 7 - 4x, that is f(y)≤f(x)f(y) \le f(x): decreasing.
  • (c) −3≤−2-3 \le -2 but f(−3)=3≥2=f(−2)f(-3) = 3 \ge 2 = f(-2), so not increasing; 2≤32 \le 3 and f(2)=2≤3=f(3)f(2) = 2 \le 3 = f(3), so not decreasing: neither.
  • Answer: (a) increasing (b) decreasing (c) neither.
Note on the source. The lecture notes remark that monotonicity is hard to check without differentiability (a later topic). NCERT calls the strict versions (< instead of ≤) "strictly increasing / decreasing"; a strictly monotonic function is always one-one.

2.5Arithmetic of functions

In simple words

Functions can be added, subtracted, multiplied and divided pointwise: do it to the outputs at the same x.

OperationDefinition (f, g : A → ℝ)
Sum(f+g)(x)=f(x)+g(x)(f + g)(x) = f(x) + g(x)
Difference(f−g)(x)=f(x)−g(x)(f - g)(x) = f(x) - g(x)
Product(fg)(x)=f(x) g(x)(fg)(x) = f(x)\,g(x)
Quotient(fg)(x)=f(x)g(x)\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}, only where g(x)≠0g(x) \ne 0

Example 6: difference of two functions

f(x)=x3+5x+1f(x) = x^3 + 5x + 1 and g(x)=3x2+2x+5g(x) = 3x^2 + 2x + 5. Find (f−g)(x)(f - g)(x).

  • (f−g)(x)=(x3+5x+1)−(3x2+2x+5)(f - g)(x) = (x^3 + 5x + 1) - (3x^2 + 2x + 5).
  • Subtract term by term: x3−3x2+3x−4x^3 - 3x^2 + 3x - 4.
  • Answer: x³ − 3x² + 3x − 4.

2.6Going deeper

  1. Strictly monotonic ⇒ one-one. If x<yx < y forces f(x)<f(y)f(x) < f(y), two different inputs can never share an output. That is why axa^x (Chapter 3) passes the horizontal line test.
  2. Onto depends on the codomain you announce. ∣x∣|x| is onto if you write it as R→[0,∞)\mathbb{R} \to [0, \infty), but not as R→R\mathbb{R} \to \mathbb{R}.
  3. Quotients shrink the domain (extra remark). For f(x)=x+1f(x) = x + 1, g(x)=x−1g(x) = x - 1: fg=x2−1fg = x^2 - 1 on all of R\mathbb{R}, but fg=x+1x−1\frac{f}{g} = \frac{x+1}{x-1} needs x≠1x \ne 1.
Exam tips
  • One-one: give a counterexample pair to say "no"; use the algebra test to say "yes".
  • Onto: compare the range with the stated codomain.
Common mistakes
  • Saying x2x^2 is one-one without checking the domain.
  • Forgetting to remove the zeros of g from the domain of f/g.
Next · Exponential functionsExponential Functions
03
Exponential functions

Exponential Functions

Laws of exponents, graphs of aˣ, growth and decay, and the number e.

3.1What is an exponential function?

In simple words

In x2x^2 the base moves and the power is fixed. In 2x2^x the base is fixed and the power (exponent) is the variable. Each step of 1 in x multiplies the value by the same factor.

Definition

An exponential function is f(x)=axf(x) = a^x with base a>0a > 0. (If a=1a = 1 it is just the constant 1, so we normally take a≠1a \ne 1.) Domain =R= \mathbb{R}.

3.2Laws of exponents (NCERT)

LawExample
ax⋅ay=ax+ya^x \cdot a^y = a^{x+y}23⋅22=25=322^3 \cdot 2^2 = 2^5 = 32
axay=ax−y\frac{a^x}{a^y} = a^{x-y}2522=23=8\frac{2^5}{2^2} = 2^3 = 8
(ax)y=axy(a^x)^y = a^{xy}(23)2=26=64(2^3)^2 = 2^6 = 64
(ab)x=axbx(ab)^x = a^x b^x(2⋅3)2=4⋅9=36(2 \cdot 3)^2 = 4 \cdot 9 = 36
a0=1a^0 = 150=15^0 = 1
a−x=1axa^{-x} = \frac{1}{a^x}2−3=182^{-3} = \frac{1}{8}
a1/n=ana^{1/n} = \sqrt[n]{a}41/2=24^{1/2} = 2, 82/3=48^{2/3} = 4
Exponential is not power. x2x^2 (variable base, fixed power) and 2x2^x (fixed base, variable power) are different kinds of function. For large x, 2x2^x eventually beats any xnx^n.

3.3Table of values and graph

x−2−10123
2x2^x1/41/21248
(1/2)x(1/2)^x4211/21/41/8
-2-11224682ˣ3ˣ-2-1122468(1/2)ˣ(1/3)ˣa > 1: growth0 < a < 1: decayevery curve passes through (0, 1)
Figure 6. Exponential growth (a > 1) and decay (0 < a < 1)

Every curve passes through (0, 1), stays above the x-axis and gets very close to it on one side: the x-axis is an asymptote. Left: bases 2 and 3 climb steeply. Right: bases 1/2 and 1/3 fall towards 0 as x grows. Note that (1/2)x=2−x(1/2)^x = 2^{-x}: the decay curve is the growth curve flipped left to right.

3.4Properties of f(x) = aˣ

Propertya > 10 < a < 1
DomainR\mathbb{R}R\mathbb{R}
Range(0,∞)(0, \infty), always positive(0,∞)(0, \infty), always positive
Passes through(0, 1) and (1, a)(0, 1) and (1, a)
Behaviourincreasing: growthdecreasing: decay
As x→∞x \to \inftyax→∞a^x \to \inftyax→0a^x \to 0
As x→−∞x \to -\inftyax→0a^x \to 0ax→∞a^x \to \infty
One-one?yesyes
Onto R\mathbb{R}?no, range is only (0,∞)(0, \infty)no, range is only (0,∞)(0, \infty)
The number e

The most important base is the irrational number e≈2.71828e \approx 2.71828. The function exe^x is called the exponential function; it is the one whose slope at each point equals its own value (see the derivative topics). Since e>1e > 1, it is increasing.

3.5Going deeper

  1. One-one solves equations (extra remark). Because axa^x is one-one, au=av⇒u=va^u = a^v \Rightarrow u = v. So 2x+1=32=252^{x+1} = 32 = 2^5 gives x+1=5x + 1 = 5, x=4x = 4.
  2. Growth by a percentage is exponential (extra remark). 10% growth a year multiplies by 1.1 each year, so after t years the amount is P×1.1tP \times 1.1^t; halving each hour gives P×(1/2)tP \times (1/2)^t.
  3. Comparing values. Same exponent, bigger base wins when the exponent is positive: 23=8<33=272^3 = 8 < 3^3 = 27. With a base below 1, a larger exponent gives a smaller value: (1/2)3<(1/2)2(1/2)^3 < (1/2)^2.
Exam tips
  • Write both sides with the same base before comparing exponents.
  • Remember the range (0,∞)(0, \infty): axa^x is never 0 or negative.
Common mistakes
  • Treating 2x2^x like x2x^2.
  • Writing axay=axya^x a^y = a^{xy}.
  • Forgetting that a0=1a^0 = 1, so every graph passes through (0, 1).
Next · CompositionComposite Functions
04
Composition

Composite Functions

g ∘ f, why the order matters, the domain of a composite, and breaking a function into parts.

4.1Chaining two functions

In simple words

Feed the output of one machine into another: first f, then g. It is written g∘fg \circ f and read "g of f": the function on the right is applied first.

xff(x)gg(f(x))firstthen(g ∘ f)(x) = g(f(x))
Figure 7. A composite as two machines in a row
Definition

Let f:D1→Rf : D_1 \to \mathbb{R} and g:D2→Rg : D_2 \to \mathbb{R} with range(f) ⊂ D2D_2. The composition is

g∘f:D1→R,(g∘f)(x)=g(f(x))g \circ f : D_1 \to \mathbb{R}, \qquad (g \circ f)(x) = g(f(x))

The condition range(f) ⊂ D2D_2 says every output of f is an allowed input of g.

Example 7: compose x² and 3x³ + 2x

f(x)=x2f(x) = x^2 and g(x)=3x3+2xg(x) = 3x^3 + 2x. Find (g∘f)(x)(g \circ f)(x).

  • (g∘f)(x)=g(f(x))=g(x2)(g \circ f)(x) = g(f(x)) = g(x^2): replace every x in g by x2x^2.
  • =3(x2)3+2x2=3x6+2x2= 3(x^2)^3 + 2x^2 = 3x^6 + 2x^2.
  • Answer: 3x⁶ + 2x².

Example 8: find a from f(f(x))

f(x)=xx+af(x) = \frac{x}{x + a} for x>0x > 0, a>0a > 0. If f(f(x))=x3x+4f(f(x)) = \frac{x}{3x + 4}, find a.

  • f(f(x))=f(x)f(x)+a=xx+axx+a+af(f(x)) = \dfrac{f(x)}{f(x) + a} = \dfrac{\frac{x}{x+a}}{\frac{x}{x+a} + a}
  • Multiply top and bottom by x+ax + a: xx+a(x+a)=x(1+a)x+a2\dfrac{x}{x + a(x + a)} = \dfrac{x}{(1 + a)x + a^2}
  • Compare with x3x+4\frac{x}{3x + 4}: 1+a=31 + a = 3 and a2=4a^2 = 4, so a=2a = 2 (both hold; a=−2a = -2 is ruled out by a>0a > 0).
  • Answer: a = 2.
Check (extra remark). With a=2a = 2 and x=1x = 1: f(1)=1/3f(1) = 1/3, then f(1/3)=1/31/3+2=17f(1/3) = \frac{1/3}{1/3 + 2} = \frac{1}{7}, and 13+4=17\frac{1}{3 + 4} = \frac{1}{7}. ✓

4.2Order matters

g ∘ f is usually not f ∘ g

Changing the order changes the function: composition is not commutative. With f(x)=x+1f(x) = x + 1 and g(x)=x2g(x) = x^2: (g∘f)(x)=(x+1)2(g \circ f)(x) = (x + 1)^2 but (f∘g)(x)=x2+1(f \circ g)(x) = x^2 + 1. At x=3x = 3 these are 16 and 10.

4.3Domain of a composite (NCERT)

In simple words

For g∘fg \circ f, x must be allowed in f and f(x) must be allowed in g.

Example: f(x)=xf(x) = \sqrt{x}, g(x)=x−4g(x) = x - 4. Then g∘f=x−4g \circ f = \sqrt{x} - 4 needs only x≥0x \ge 0, so its domain is [0,∞)[0, \infty); but f∘g=x−4f \circ g = \sqrt{x - 4} needs x≥4x \ge 4, domain [4,∞)[4, \infty).

4.4Breaking a function into pieces (NCERT)

In simple words

Most formulas are compositions. Look for an "inside" (done first) and an "outside" (done last).

h(x)Inside fOutside g
(3x+1)5(3x + 1)^53x+13x + 1u5u^5
ex2e^{x^2}x2x^2eue^u
x2+1\sqrt{x^2 + 1}x2+1x^2 + 1u\sqrt{u}
Three functions. Composition is associative: h∘(g∘f)=(h∘g)∘fh \circ (g \circ f) = (h \circ g) \circ f, so h(g(f(x)))h(g(f(x))) is unambiguous: apply f, then g, then h. The identity I(x)=xI(x) = x satisfies f∘I=I∘f=ff \circ I = I \circ f = f.
Note on the source. The lecture notes give the definition, Example 7 and the f(f(x)) question (answer 2). The domain rule, decomposition, associativity and identity are NCERT additions.

4.5Going deeper

  1. Read from the inside out. To evaluate (g∘f)(2)(g \circ f)(2), compute f(2)f(2) first, then apply g to that number.
  2. Why the range condition matters (extra remark). With f(x)=x−4f(x) = x - 4 and g(x)=xg(x) = \sqrt{x}, the output f(1)=−3f(1) = -3 is not a valid input of g; that is why g∘f=x−4g \circ f = \sqrt{x - 4} loses all x<4x < 4.
  3. Decomposing helps later. The chain rule for derivatives works on exactly this inside/outside split.
Exam tips
  • Substitute the whole inner expression, in brackets, for every x in the outer function.
  • State the domain: inner allowed, and inner output allowed in the outer.
Common mistakes
  • Applying the left function first.
  • Assuming g∘f=f∘gg \circ f = f \circ g.
Next · Inverse functionsInverse Functions
05
Inverse functions

Inverse Functions

When an inverse exists, how to find it, its graph, and the inverse of a composite.

Note on the source. Inverse functions are not in the supplied lecture notes; this chapter follows the standard NCERT treatment of invertible functions, and links back to Chapters 2 to 4.

5.1The idea

In simple words

The inverse of a function undoes it. If f turns x into y, then f−1f^{-1} turns y back into x. f(x)=2x+3f(x) = 2x + 3 doubles then adds 3; its inverse subtracts 3 then halves.

Definition

If f:A→Bf : A \to B is bijective, its inverse is the function f−1:B→Af^{-1} : B \to A with

f−1(f(x))=x  (x∈A),f(f−1(y))=y  (y∈B)f^{-1}(f(x)) = x \ \ (x \in A), \qquad f(f^{-1}(y)) = y \ \ (y \in B)

Equivalently f(x)=y  ⟺  x=f−1(y)f(x) = y \iff x = f^{-1}(y). Domain and range swap: domain(f−1f^{-1}) = range(f), range(f−1f^{-1}) = domain(f).

Not the reciprocal! f−1(x)f^{-1}(x) means the inverse function, not 1f(x)\frac{1}{f(x)}. For f(x)=2x+3f(x) = 2x + 3, f−1(x)=x−32f^{-1}(x) = \frac{x - 3}{2}, but 1f(x)=12x+3\frac{1}{f(x)} = \frac{1}{2x + 3}.

5.2When does an inverse exist?

In simple words

To undo f, each output must come from one input only (one-one), and every element of the codomain must be used (onto). So: inverse exists ⇔ f is bijective. Use the horizontal line test of Chapter 2.

5.3How to find the inverse

  1. Write y=f(x)y = f(x).
  2. Solve this equation for x in terms of y.
  3. Swap the letters: replace y by x. The result is f−1(x)f^{-1}(x).
  4. State the domain and range (they swap).

Worked through for f(x)=2x+3f(x) = 2x + 3: y=2x+3⇒x=y−32y = 2x + 3 \Rightarrow x = \frac{y - 3}{2}, so f−1(x)=x−32f^{-1}(x) = \frac{x - 3}{2}. Check: f−1(f(x))=(2x+3)−32=xf^{-1}(f(x)) = \frac{(2x + 3) - 3}{2} = x. For h(x)=x3+5h(x) = x^3 + 5 (range R\mathbb{R}, Example 2): x3=y−5x^3 = y - 5, so h−1(x)=x−53h^{-1}(x) = \sqrt[3]{x - 5}; indeed h(2)=13h(2) = 13 and 13−53=2\sqrt[3]{13 - 5} = 2.

5.4Graph of the inverse

In simple words

If (a,b)(a, b) is on the graph of f, then (b,a)(b, a) is on the graph of f−1f^{-1}. Swapping coordinates reflects the graph in the line y=xy = x.

-11234-11234(2, 4)(4, 2)2ˣlog₂ xmirror line y = x2² = 4 ⇔ log₂ 4 = 2
Figure 8. A function and its inverse are mirror images in y = x

f(x)=2xf(x) = 2^x and f−1(x)=log⁡2xf^{-1}(x) = \log_2 x: the point (2, 4) on 2x2^x becomes (4, 2) on log⁡2x\log_2 x, since 22=4  ⟺  log⁡24=22^2 = 4 \iff \log_2 4 = 2.

5.5Important inverse pairs

FunctionInverseCondition
axa^x, R→(0,∞)\mathbb{R} \to (0, \infty)log⁡ax\log_a xa>0,a≠1a > 0, a \ne 1; ex↔ln⁡xe^x \leftrightarrow \ln x
x3x^3x3\sqrt[3]{x}all of R\mathbb{R}
x2x^2 on [0,∞)[0, \infty)x\sqrt{x}domain must be restricted
ax+bax + b (a≠0a \ne 0)x−ba\frac{x - b}{a}always
-2-112123412341234x²√xx² on R: fails, so no inversex² on [0, ∞) and its inverse √x
Figure 9. Restricting x² to [0, ∞) makes it invertible
Restricting the domain

x2x^2 on R\mathbb{R} fails the horizontal line test. Restrict it to [0,∞)[0, \infty), where it is bijective onto [0,∞)[0, \infty), and the inverse x\sqrt{x} exists. The same trick works for ∣x∣|x| or any function that is not one-one.

5.6Inverse of a composite

Rule: reverse the order

If f and g are bijective, then

(g∘f)−1=f−1∘g−1(g \circ f)^{-1} = f^{-1} \circ g^{-1}

Like shoes and socks: you put on socks (f) then shoes (g), so you take off shoes (g−1g^{-1}) first, then socks (f−1f^{-1}). Check with f(x)=2xf(x) = 2x, g(x)=x+3g(x) = x + 3: g∘f=2x+3g \circ f = 2x + 3, whose inverse is x−32\frac{x - 3}{2}; and f−1(g−1(x))=x−32f^{-1}(g^{-1}(x)) = \frac{x - 3}{2}. ✓

5.7Going deeper

  1. Fractions work the same way (extra remark). f(x)=2x+1x−3f(x) = \frac{2x + 1}{x - 3}: y(x−3)=2x+1⇒x(y−2)=3y+1y(x - 3) = 2x + 1 \Rightarrow x(y - 2) = 3y + 1, so f−1(x)=3x+1x−2f^{-1}(x) = \frac{3x + 1}{x - 2}, x≠2x \ne 2. Check: f(4)=9f(4) = 9 and f−1(9)=28/7=4f^{-1}(9) = 28/7 = 4.
  2. The excluded values swap too. f above needs x≠3x \ne 3 and never outputs 2; its inverse needs x≠2x \ne 2 and never outputs 3.
  3. exe^x has an inverse only onto (0,∞)(0, \infty). As a map R→R\mathbb{R} \to \mathbb{R} it is not onto, so ln⁡x\ln x is defined only for x>0x > 0.
Exam tips
  • Check one-one and onto (or the horizontal line test) before finding an inverse.
  • Verify with one number: f(a) = b, then f−1(b)f^{-1}(b) should give a.
Common mistakes
  • Writing f−1(x)=1/f(x)f^{-1}(x) = 1/f(x).
  • Giving x\sqrt{x} as the inverse of x2x^2 on all of R\mathbb{R}.
  • Reversing a composite without reversing the order.
Next · All topicsWeek 5 Summary Sheet
06
All topics

Week 5 Summary Sheet

Everything in Week 5 on one sheet.

Everything in Week 5 on one sheet, for a last-minute revision.

Formula sheet at a glance

Functions
GraphΓ(f)={(x,f(x))∣x∈X}\Gamma(f) = \{(x, f(x)) \mid x \in X\}
One-onef(x1)=f(x2)⇒x1=x2f(x_1) = f(x_2) \Rightarrow x_1 = x_2
Bounded and monotonic
Boundedm≤f(x)≤Mm \le f(x) \le M
Increasingx≤y⇒f(x)≤f(y)x \le y \Rightarrow f(x) \le f(y)
Exponents
Productaxay=ax+ya^x a^y = a^{x+y}
Power(ax)y=axy(a^x)^y = a^{xy}
Negativea−x=1axa^{-x} = \frac{1}{a^x}
Composite
Definition(g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x))
Inverse
Undof−1(f(x))=xf^{-1}(f(x)) = x
Composite(g∘f)−1=f−1∘g−1(g \circ f)^{-1} = f^{-1} \circ g^{-1}

Key definitions

Domain of a formula
Allowed inputsdenominator≠0,  ≥0, log⁡>0\text{denominator} \ne 0,\ \sqrt{\ } \ge 0,\ \log > 0

Use whenNo domain is given and you must find the largest one.

  1. List every denominator, even root and log.
  2. Write the condition for each.
  3. Intersect the conditions.
Examplex−3\sqrt{x - 3}
x−3≥0⇒[3,∞)x - 3 \ge 0 \Rightarrow [3, \infty)
One-one and onto
One-onef(x1)=f(x2)⇒x1=x2f(x_1) = f(x_2) \Rightarrow x_1 = x_2
Ontorange=codomain\text{range} = \text{codomain}

Use whenYou must decide if f is injective, surjective or bijective.

  1. Horizontal line test, or the algebra test.
  2. For "no", give one counterexample.
  3. Compare the range with the codomain.
Examplex2x^2 on R\mathbb{R}.
(−2)2=22⇒not one-one(-2)^2 = 2^2 \Rightarrow \text{not one-one}
Exponential function
Formf(x)=ax, a>0, a≠1f(x) = a^x,\ a > 0,\ a \ne 1
Range(0,∞)(0, \infty)

Use whenThe variable is in the exponent: growth, decay, compound interest.

  1. a > 1: increasing; 0 < a < 1: decreasing.
  2. Every graph passes through (0, 1).
  3. Same base on both sides ⇒ equal exponents.
ExampleSolve 32x=813^{2x} = 81.
32x=34⇒x=23^{2x} = 3^4 \Rightarrow x = 2
Composite
g of f(g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x))

Use whenOne function is applied to the output of another.

  1. Apply the right-hand function first.
  2. Substitute it, in brackets, into the outer one.
  3. Check range(f) ⊂ domain(g).
Examplef = x², g = 3x³ + 2x.
g(x2)=3x6+2x2g(x^2) = 3x^6 + 2x^2
Inverse
Undo fy=f(x)⇒x=f−1(y)y = f(x) \Rightarrow x = f^{-1}(y)

Use whenYou must undo a bijective function.

  1. Write y = f(x) and solve for x.
  2. Swap x and y.
  3. Swap domain and range; check with a number.
Examplef(x)=2x+3f(x) = 2x + 3.
f−1(x)=x−32f^{-1}(x) = \frac{x - 3}{2}

Tests and rules

IdeaRule
Functioneach input has exactly one output; f:A→Bf : A \to B
Vertical line testevery vertical line meets the graph at most once
Horizontal line testat most once ⇒ one-one; at least once ⇒ onto
Boundedm≤f(x)≤Mm \le f(x) \le M for all x
Increasing / decreasingx≤y⇒f(x)≤f(y)x \le y \Rightarrow f(x) \le f(y) / f(x)≥f(y)f(x) \ge f(y)
Exponentialaxa^x: domain R\mathbb{R}, range (0,∞)(0, \infty), through (0, 1); a > 1 growth, 0 < a < 1 decay
Compositeneeds range(f) ⊂ domain(g); not commutative; associative
Inverseexists iff bijective; graph mirrored in y=xy = x

Values worked in the lectures

QuestionAnswer
Is {(1, a), (2, b), (3, a), (1, b)} a function?no
Range of x2x^2; of x3+5x^3 + 5[0,∞)[0, \infty); R\mathbb{R}
1/(x2+1)1/(x^2 + 1); 1/x1/x on (0,∞)(0, \infty)bounded (0 to 1); unbounded
x2x^2 on [0,∞)[0, \infty), 7−4x7 - 4x, ∣x∣|x|increasing, decreasing, neither
(f−g)(x)(f - g)(x) for x3+5x+1x^3 + 5x + 1 and 3x2+2x+53x^2 + 2x + 5x3−3x2+3x−4x^3 - 3x^2 + 3x - 4
g∘fg \circ f for f=x2f = x^2, g=3x3+2xg = 3x^3 + 2x3x6+2x23x^6 + 2x^2
f(f(x))=x3x+4f(f(x)) = \frac{x}{3x+4} for f=xx+af = \frac{x}{x+a}a = 2

Which tool when?

  1. "Is this a function?" → vertical line test.
  2. "Is it one-one? Does it have an inverse?" → horizontal line test.
  3. "Apply one, then the other" → composition, right-hand function first.
  4. "Undo it" → inverse: solve for x, swap.
Source notes
  • The lecture notes (Calculus of one variable) cover function, domain, range, graph, types, floor/ceiling/modulus, bounded, monotonic, arithmetic of functions and composition.
  • The line tests, the details of exponential functions and inverse functions are not in the lecture notes; they follow the standard NCERT Class 11 and 12 treatment, and those sections are marked (NCERT).
  • The lecture notes allow any a>0a > 0 for axa^x; for a=1a = 1 it is constant, so these notes say a≠1a \ne 1 where it matters.
  • Increasing and decreasing are defined with ≤ and ≥ (non-strict); NCERT's strict versions are mentioned in Chapter 2.
  • The source's extra practice questions are not reproduced; a few of their ideas appear as short worked illustrations and extra remarks, each checked by computation.
Revision overview
Functionsone input → one output
range ⊂ codomain
vertical line test
Propertiesone-one, onto, bijective
horizontal line test
bounded, monotonic
Exponentialaˣ, a > 0, a ≠ 1
range (0, ∞), through (0, 1)
growth or decay
FunctionsMathematics for Data Science 1
Composite(g ∘ f)(x) = g(f(x))
right-hand first
g ∘ f ≠ f ∘ g
Inverseexists iff bijective
solve for x, swap
mirror in y = x
Pairsaˣ ↔ logₐ x
x² on [0, ∞) ↔ √x
(g ∘ f)⁻¹ = f⁻¹ ∘ g⁻¹
Revision: the whole of Week 5 on one map
Back to top