Functions of One Variable
Domain, range, and the handful of standard function shapes you must recognise on sight — the foundation the whole Calculus block stands on.
What you'll learn
- Domain (legal inputs) vs range (reachable outputs), and how to read them off a rule
- The shapes you must know on sight: polynomials, eˣ, ln x, sin/cos, and |x|
- Even vs odd functions, and what composition f(g(x)) does
- ln x is undefined for x ≤ 0; |x| is continuous everywhere but has a corner at 0
Before you start
You can sketch x² from memory. Probably sin x too. That instinct — I know what
this thing looks like — is the whole point of this lesson. A handful of curves
show up on every page of calculus, and once you can picture them, half the work of
limits, continuity, and derivatives is already done.
A function is just a rule that takes one number in and hands back one number out.
The job here is to make the five everyday rules feel as familiar as the alphabet.
These same shapes resurface the moment you do real ML — eˣ and ln x are the
guts of the sigmoid and log-loss, and |x|-style corners are exactly where ReLU
and L1 regularisation live — so the instinct pays off well past the exam.
Domain and range
Two questions pin down any function:
- Domain — which inputs are legal. A square root cannot take a negative, a logarithm cannot take zero or below, a fraction cannot divide by zero. Everything else is fair game.
- Range — which outputs are actually reached as the input sweeps over the domain.
For example f(x) = 1/x has domain “all real x except 0” and range “all real
values except 0”. Reading these off the rule is the first reflex GATE expects.
The standard shapes you must know on sight
You will not be asked to memorise exotic curves. You will be expected to know these five instantly:
- Polynomials (
x,x²,x³, …) — defined for every real number; smooth, no breaks or corners. Even powers make a U/bowl; odd powers run from bottom-left to top-right. - Exponential
eˣ— always positive (never touches zero), passes through(0, 1), and grows extremely fast to the right while flattening toward 0 on the left. - Natural log
ln x— the mirror ofeˣ. Defined only forx > 0, crosses zero atx = 1, and dives to−∞asxapproaches 0 from the right. sin xandcos x— wavy and periodic, forever bounded in[−1, 1]. They never escape that band no matter how largexgets.- Absolute value
|x|— a V-shape: it equalsxforx ≥ 0and−xforx < 0. Continuous everywhere, but it has a sharp corner atx = 0.
Even, odd, and composition
Two quick structural ideas GATE leans on:
- Even function:
f(−x) = f(x)— the graph is mirror-symmetric across the y-axis. Examples:x²,cos x,|x|. - Odd function:
f(−x) = −f(x)— the graph has rotational symmetry about the origin. Examples:x,x³,sin x. - Composition
f(g(x))means “dogfirst, then feed the result intof”. The inner function’s output must be a legal input for the outer one — that is exactly what constrains the domain (see the worked example).
How GATE asks this
Functions rarely get a question to themselves. Instead this knowledge is embedded
inside limit, continuity, and differentiability questions as a quiet first step: you
must know that ln x needs a positive argument, that sin x can never exceed 1, or
that |x| has a corner — before the real question even begins. GATE asks these as
MCQs about a function’s domain, boundedness, or behavior.
Worked example
For
f(x) = ln(x − 2), give the domain. Also state the range ofsin x, and say where|x|fails to be smooth.
Domain of ln(x − 2). A logarithm needs a strictly positive argument, so we
need x − 2 > 0, i.e. x > 2. The domain is all real numbers greater than 2 — the
point x = 2 itself is excluded (there ln 0 is undefined).
Range of sin x. As x sweeps over all reals, sin x oscillates and reaches
every value between −1 and 1 inclusive. The range is [−1, 1] — it is bounded.
Smoothness of |x|. The V-shape is continuous everywhere (you can draw it
without lifting the pen), but at x = 0 it has a corner: the slope jumps from
−1 to +1. That corner is why |x| is not differentiable at 0 — a fact the
differentiability lesson will lean on directly.
Quick check
Quick check
Practice this in an interview
All questionsFirst-class functions can be stored in variables, passed as arguments, returned from other functions, and placed in data structures — just like any other object. This is the foundation for higher-order functions, decorators, callbacks, and functional programming patterns in Python.
Without a non-linear activation, any stack of linear layers collapses to a single linear transformation, giving a model no more expressive than logistic regression. Activation functions break linearity so the network can approximate arbitrarily complex functions.