Placement Prep

Functions and Graphs: Aptitude Guide for Placement Tests

Function types, domain, range, graph transformations, and worked examples for TCS NQT, AMCAT, and SHL placement aptitude tests. India-focused, concept-first.

By FACE Prep Team 7 min read
functions-and-graphs aptitude placement-prep quantitative-aptitude tcs-nqt domain-and-range graph-transformations

Functions describe how one quantity depends on another, and in placement aptitude tests, domain-range and graph-shift questions appear across TCS NQT, AMCAT, and SHL assessments.

What is a Function?

A function f is a rule that maps each element in a set (the domain) to exactly one element in another set (the range). The notation is y = f(x), where x is the input and y is the output. One input produces exactly one output; that is the defining property.

Three terms that appear in every functions question:

  • Domain: the set of all valid input values for which f(x) is defined.
  • Range: the set of all output values that f(x) actually produces.
  • Rule: the formula or mapping that connects each input x to a specific output y.

Quick domain checks for aptitude questions:

  • If f(x) = 1/(x - a): exclude x = a from the domain (division by zero is undefined).
  • If f(x) = sqrt(x - a): require x >= a (the square root of a negative number is not real).
  • If f(x) is a polynomial like x^2 + 3x + 2: domain is all real numbers.
  • If f(x) = a^x (exponential): domain is all real numbers.

Example: Domain of f(x) = 1/(x + 3)

  • The denominator x + 3 equals zero when x = -3.
  • At x = -3, dividing by zero is undefined.
  • Domain: all real numbers except x = -3.

Functions questions sit alongside time and work problems in the quantitative aptitude section of most placement tests. Systematic setup matters more than guessing from the answer choices.

Types of Functions in Placement Tests

Six function types appear regularly in placement numerical reasoning sections. Know the shape, domain, and range of each one.

Linear: f(x) = mx + c

A straight line. Slope m controls steepness; constant c shifts the line up or down on the y-axis.

  • If m > 0: the line rises from left to right.
  • If m < 0: the line falls from left to right.
  • Domain: all real numbers.
  • Range: all real numbers.
  • Graph: a straight line with slope m and y-intercept c.

Quadratic: f(x) = ax^2 + bx + c

A parabola. Opens upward if a > 0, downward if a < 0. The vertex is the turning point.

  • Axis of symmetry: x = -b/(2a).
  • Domain: all real numbers.
  • Range (when a > 0): all real values at or above the vertex y-value.
  • Range (when a < 0): all real values at or below the vertex y-value.

Exponential: f(x) = a^x

Grows rapidly when a > 1, decays toward zero when 0 < a < 1. Always positive.

  • Domain: all real numbers.
  • Range: all positive real numbers (the output is never zero or negative).
  • Key property: a^0 = 1, so the graph always passes through (0, 1).

Logarithmic: f(x) = log_a(x)

The inverse of the exponential. Defined only when x > 0.

  • Domain: all positive real numbers.
  • Range: all real numbers.
  • Key property: log_a(1) = 0, so the graph always passes through (1, 0).

Modulus: f(x) = |x|

Returns the non-negative value of x. So f(-4) = 4 and f(4) = 4.

  • Domain: all real numbers.
  • Range: all non-negative real numbers.
  • Graph: V-shaped, with the vertex at the origin.
  • Generalised form: f(x) = |x - a| has its vertex at x = a.

Step Function (Greatest Integer): f(x) = [x]

Returns the greatest integer less than or equal to x. So [3.7] = 3, [4] = 4, and [-1.2] = -2.

  • Domain: all real numbers.
  • Range: all integers.
  • Graph: a staircase pattern, flat within each unit interval, with a jump at every integer.

Even and Odd Functions

This classification shows up in multiple-choice options and in “which statement is true” style questions.

An even function satisfies f(-x) = f(x) for all x in the domain. Its graph is symmetric about the y-axis. Common examples: f(x) = x^2, f(x) = |x|, f(x) = cos(x).

An odd function satisfies f(-x) = -f(x) for all x in the domain. Its graph is symmetric about the origin. Common examples: f(x) = x, f(x) = x^3, f(x) = sin(x).

Two product rules worth memorising for MCQs:

  • The product of two odd functions is even.
  • The product of an even function and an odd function is odd.

Not every function fits either category. f(x) = x^2 + x is neither even nor odd: f(-x) = (-x)^2 + (-x) = x^2 - x, which equals neither f(x) nor -f(x).

A useful shortcut: if f(x) contains only even powers (x^2, x^4) or absolute values, check for even first. If it contains only odd powers (x, x^3), check for odd first. Mixed powers usually mean neither.

Graph Transformations

Graph transformation questions give you a base graph and ask what a modified function looks like. Four rules cover most placement test variations.

Vertical Shift

y = f(x) + c shifts the graph c units upward when c > 0, and c units downward when c < 0. Every point moves straight up or down. The shape stays the same.

Horizontal Shift

y = f(x - c) shifts the graph c units to the right when c > 0, and c units to the left when c < 0. The counterintuitive part: subtracting c inside the argument moves the graph right.

  • y = f(x - 2): two units right.
  • y = f(x + 3): three units left.

Reflection

  • y = -f(x): reflects across the x-axis (flips the graph vertically).
  • y = f(-x): reflects across the y-axis (flips the graph horizontally).

Vertical Scaling

y = k * f(x) stretches the graph vertically when k > 1, and compresses it when 0 < k < 1. The x-intercepts stay fixed; every y-value scales by factor k.

Functions in TCS NQT, AMCAT, and SHL

Understanding which question style each test uses lets you practise the right skill.

TCS NQT

The TCS NQT Numerical Ability section tests functions in two main ways. Direct evaluation: given f(x) = 2x + 3, find f(5) or f(-2). Composite functions: given f(x) = x^2 and g(x) = 2x, find f(g(3)). For composites, solve inside-out: g(3) = 6, then f(6) = 36.

Common TCS NQT function patterns:

  • Evaluate f(a) + f(-a) for even or odd functions (tests the symmetry property).
  • Find domain or range from a given formula.
  • Read a graph and identify which transformation was applied (vertical shift vs. horizontal shift vs. reflection).

AMCAT

AMCAT Quantitative Ability covers functions in its algebraic reasoning subsection. Typical question types:

  • Given a graph, identify the function family (linear, quadratic, exponential).
  • Calculate the range for a given domain interval.
  • Determine whether a given function is even, odd, or neither.

AMCAT questions tend to be abstract: the graph is described numerically or schematically, and you pick the function type or property from four options.

SHL Numerical Reasoning

SHL tests focus on graph reading rather than formula manipulation. Questions display a graph and ask you to read off values, identify trends, or compare two function outputs at a given x. The arithmetic is simple; the skill tested is accurate graph interpretation under time pressure.

For a broader view of how these assessments fit into the overall campus hiring sequence, the campus placement evaluation test guide explains the full structure across test types.

Worked Examples

Work through each example before checking the answer. All calculations below are derived from first principles.

Example 1: Domain of f(x) = sqrt(x - 5)

  • Step 1: For a square root to produce a real number, the expression inside must be >= 0.
  • Step 2: x - 5 >= 0 means x >= 5.
  • Answer: Domain is all x >= 5, or the interval [5, infinity).

Example 2: Composite f(g(2)) where f(x) = x^2 + 1 and g(x) = 3x

  • Step 1: Compute g(2) = 3 * 2 = 6.
  • Step 2: Compute f(6) = 6^2 + 1 = 36 + 1 = 37.
  • Answer: f(g(2)) = 37.

Example 3: Classify f(x) = x^3 + x as Even, Odd, or Neither

  • Step 1: Compute f(-x) = (-x)^3 + (-x) = -x^3 - x.
  • Step 2: Compare with f(x) = x^3 + x. Is f(-x) = f(x)? No, since -x^3 - x is not equal to x^3 + x.
  • Step 3: Compute -f(x) = -(x^3 + x) = -x^3 - x. Is f(-x) = -f(x)? Yes.
  • Answer: f(x) = x^3 + x is an odd function.

Example 4: Vertical Shift of y = x^2 to y = x^2 + 4

  • Step 1: Identify c = +4 (a constant added outside the function).
  • Step 2: Every point on the parabola moves 4 units upward.
  • Answer: The vertex shifts from (0, 0) to (0, 4). The shape and width of the parabola are unchanged.

Example 5: Range of f(x) = |x - 3|

  • Step 1: Absolute value is always >= 0 for any real input.
  • Step 2: The minimum value 0 is achieved when x = 3 (since |3 - 3| = 0).
  • Answer: Range is all y >= 0.

Example 6: Step Function Value for x = -2.5

  • The step function [x] returns the greatest integer <= x.
  • For x = -2.5: check -3 <= -2.5 (true) and -2 <= -2.5 (false, since -2 is greater than -2.5).
  • The greatest integer satisfying the condition is -3.
  • Answer: [-2.5] = -3.

Functions and graphs appear in every major placement aptitude section, and getting them right depends on knowing a handful of rules rather than memorising answers. If you want to build the same input-to-output analytical reflex at a different scale, TinkerLLM lets you run real LLM API calls for ₹299. You send prompts, observe outputs, and test edge cases exactly as you did with the domain-range examples above, except the function is a language model rather than a polynomial.

For a structured reading list that covers all quantitative aptitude topics including this one, see our guide to the best books for placement preparation.

Primary sources

Frequently asked questions

Which function types appear most often in placement aptitude tests?

Modulus, quadratic, and step functions appear most often. Modulus questions ask you to evaluate |f(x)| for given x values. Quadratic questions test domain, range, and symmetry. Step functions test which output band a given input falls into.

How do I find the domain of a function quickly?

Check for two restrictions: division by zero and square roots of negatives. If the function has 1/(x-a), exclude x = a from the domain. If it has sqrt(x-a), require x >= a. For polynomials and exponentials with no denominator or root, the domain is all real numbers.

What is the difference between even and odd functions?

An even function satisfies f(-x) = f(x) for all x, meaning its graph is symmetric about the y-axis. An odd function satisfies f(-x) = -f(x), meaning its graph is symmetric about the origin. Many functions are neither even nor odd.

How are graph transformation questions asked in TCS NQT?

TCS NQT typically gives you a graph of f(x) and asks what f(x) + 2 or f(x - 3) looks like. Apply the shift rule: adding a constant outside shifts up, subtracting inside the argument shifts right, negating x reflects across the y-axis.

What is the range of f(x) = x^2?

The range of f(x) = x^2 is all non-negative real numbers, because squaring any real number yields a result greater than or equal to zero. Range: all y >= 0.

Build AI projects

A self-paced playground for building with LLMs.

TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.

Try TinkerLLM (₹299 launch)
Free AI Roadmap PDF