Introduction to Functions

Learn the definition, domain, range, and graphical representation of functions for JEE Mathematics.

Introduction

A function is a special type of relation where every input has exactly one output. Functions are one of the most important concepts in mathematics, appearing in calculus, algebra, and beyond.

Interactive: Explore Function Graphs

Click different function types to see their graphs:


Google Maps = A Function!
Think of Google Maps like a function: you input a destination, it outputs ONE route. You can’t input “Pizza Hut” and get two different locations from the same address — that would break the function! Just like in 12th Fail (2023), where one student (input) gets one result (output) — every input maps to exactly one output.

Definition of a Function

Formal Definition

A function $f$ from set $A$ to set $B$, written $f: A \to B$, is a relation such that:

$$\boxed{\text{Every element of } A \text{ is related to exactly one element of } B}$$

Two Key Requirements

  1. Every element in $A$ must have an image in $B$
  2. Each element in $A$ can have only one image

Examples

Valid Functions:

$f: \{1, 2, 3\} \to \{a, b, c\}$

$f = \{(1, a), (2, b), (3, c)\}$ (valid)

$g = \{(1, a), (2, a), (3, a)\}$ (valid - same output is OK)

Not Functions:

$R = \{(1, a), (2, b)\}$ ✗ (3 has no image)

$R = \{(1, a), (1, b), (2, c), (3, d)\}$ ✗ (1 has two images)

Vertical Line Test
For functions $f: \mathbb{R} \to \mathbb{R}$, a graph represents a function if and only if every vertical line intersects the graph at most once.

Terminology

TermDefinitionNotation
DomainSet of all inputs (set $A$)$\text{Dom}(f)$
Co-domainSet of possible outputs (set $B$)-
RangeSet of actual outputs$\text{Range}(f)$
ImageOutput for a specific input$f(x)$
Pre-imageInput(s) that give a specific output$f^{-1}(\{y\})$

Important Relationship

$$\text{Range}(f) \subseteq \text{Co-domain}$$

The range is always a subset of the co-domain!

Example

$f: \mathbb{R} \to \mathbb{R}$ defined by $f(x) = x^2$

  • Domain: $\mathbb{R}$ (all real numbers)
  • Co-domain: $\mathbb{R}$ (all real numbers)
  • Range: $[0, \infty)$ (only non-negative reals are outputs)
  • Image of 3: $f(3) = 9$
  • Pre-image of 4: $\{-2, 2\}$ (since $f(-2) = f(2) = 4$)

Finding Domain and Range

Finding Domain

The domain is the set of all $x$ for which $f(x)$ is defined.

Common Restrictions:

ExpressionRestriction
$\frac{1}{g(x)}$$g(x) \neq 0$
$\sqrt{g(x)}$$g(x) \geq 0$
$\log(g(x))$$g(x) > 0$
$\tan(x)$$x \neq \frac{\pi}{2} + n\pi$

Examples

Example 1: $f(x) = \frac{1}{x - 2}$

Domain: $x \neq 2$, so $\text{Dom}(f) = \mathbb{R} - \{2\}$ or $(-\infty, 2) \cup (2, \infty)$

Example 2: $f(x) = \sqrt{4 - x^2}$

Need: $4 - x^2 \geq 0 \Rightarrow x^2 \leq 4 \Rightarrow -2 \leq x \leq 2$

Domain: $[-2, 2]$

Example 3: $f(x) = \log(x - 1) + \sqrt{5 - x}$

Need: $x - 1 > 0$ AND $5 - x \geq 0$

So: $x > 1$ AND $x \leq 5$

Domain: $(1, 5]$

Finding Range

Method 1: Find all possible output values

Method 2: Set $y = f(x)$ and solve for $x$. The values of $y$ for which $x$ is valid form the range.

Example: $f(x) = \frac{x}{x + 1}$, Domain: $\mathbb{R} - \{-1\}$

Let $y = \frac{x}{x + 1}$

$y(x + 1) = x$

$yx + y = x$

$y = x - yx = x(1 - y)$

$x = \frac{y}{1 - y}$

This is defined for all $y \neq 1$.

Range: $\mathbb{R} - \{1\}$


Ways to Define Functions

1. Explicit Formula

$f(x) = x^2 + 2x + 1$

2. Piecewise Definition

$$f(x) = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$$

This is the absolute value function $|x|$.

3. Implicit Definition

$x^2 + y^2 = 1$ defines $y$ as a function of $x$ only if we restrict to upper or lower semicircle.

4. Parametric Definition

$x = \cos(t)$, $y = \sin(t)$ for $t \in [0, 2\pi)$


Special Functions

Identity Function

$$I(x) = x$$
  • Domain: $A$
  • Range: $A$
  • Graph: Line through origin with slope 1

Constant Function

$$f(x) = c$$

(where $c$ is a constant)

  • Domain: $A$
  • Range: $\{c\}$
  • Graph: Horizontal line

Modulus (Absolute Value) Function

$$f(x) = |x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$$
  • Domain: $\mathbb{R}$
  • Range: $[0, \infty)$

Greatest Integer Function (Floor)

$$f(x) = \lfloor x \rfloor = \text{greatest integer} \leq x$$

Examples: $\lfloor 2.7 \rfloor = 2$, $\lfloor -1.3 \rfloor = -2$

Age Calculations in Movies!
The greatest integer function is how we calculate age! If you’re 17 years and 11 months old (17.917 years), your age is $\lfloor 17.917 \rfloor = 17$ — the greatest integer less than or equal to your exact age. That’s why in 12th Fail, Manoj is “just 17” even if he’s almost 18!

Fractional Part Function

$$\{x\} = x - \lfloor x \rfloor$$

Always in the range $[0, 1)$.

Signum Function

$$\text{sgn}(x) = \begin{cases} 1 & \text{if } x > 0 \\ 0 & \text{if } x = 0 \\ -1 & \text{if } x < 0 \end{cases}$$

Algebra of Functions

For functions $f, g: A \to \mathbb{R}$:

OperationDefinitionDomain
$(f + g)(x)$$f(x) + g(x)$$\text{Dom}(f) \cap \text{Dom}(g)$
$(f - g)(x)$$f(x) - g(x)$$\text{Dom}(f) \cap \text{Dom}(g)$
$(fg)(x)$$f(x) \cdot g(x)$$\text{Dom}(f) \cap \text{Dom}(g)$
$(f/g)(x)$$\frac{f(x)}{g(x)}$$\text{Dom}(f) \cap \text{Dom}(g) \cap \{x : g(x) \neq 0\}$

Even and Odd Functions

Even Function

$f(-x) = f(x)$ for all $x$ in domain

  • Graph is symmetric about y-axis
  • Examples: $x^2$, $\cos(x)$, $|x|$

Odd Function

$f(-x) = -f(x)$ for all $x$ in domain

  • Graph is symmetric about origin
  • Examples: $x^3$, $\sin(x)$, $x$
JEE Tip

Any function can be written as sum of even and odd parts:

$$f(x) = \underbrace{\frac{f(x) + f(-x)}{2}}_{\text{even}} + \underbrace{\frac{f(x) - f(-x)}{2}}_{\text{odd}}$$

Practice Problems

  1. Find the domain of $f(x) = \frac{\sqrt{x + 3}}{\log(2 - x)}$

  2. Is $f(x) = x^3 + x$ even, odd, or neither?

  3. Find the range of $f(x) = \frac{x^2}{x^2 + 1}$

Quick Check
If $f(x) = \sqrt{x}$ with domain $[0, \infty)$ and co-domain $\mathbb{R}$, what is its range?


Within Sets, Relations & Functions

Math Connections

Physics Applications

  • Kinematics — Position, velocity as functions of time
  • SHM — Sinusoidal functions describe oscillations
  • Wave Motion — Wave functions

Chemistry Applications