Identity Function — Definition, Graph, Properties, and Examples

#Algebra
TL;DR
An identity function returns whatever you put in, unchanged — its rule is f(x)=xf(x) = x. This article defines the identity function, draws its graph as the straight line y=xy = x through the origin, lists its key properties (it is its own inverse, bijective, slope 11), and works through six examples — including how it differs from a constant function.
MV
Madhukar VLast updated on June 29, 20268 min read

What Is an Identity Function?

An identity function is a function that always returns its input unchanged. For every element xx in its domain, the output equals the input:

f(x)=xf(x) = x

It is sometimes written I(x)I(x) or id(x)\text{id}(x). Whatever value enters, the same value leaves — there is no scaling, no shift, no transformation. Because the output mirrors the input exactly, the domain and range are identical.

Symbol

Meaning

f(x)f(x) or I(x)I(x)

the identity function

xx

the input value (and, here, the output too)

y=xy = x

the equation of its graph

What Does the Graph of an Identity Function Look Like?

The graph of f(x)=xf(x) = x is a straight line through the origin that makes a 45°45° angle with both axes. Its slope is always exactly 11, because output rises one unit for every one unit the input rises.

This line, y=xy = x, is also the mirror used when graphing any inverse relation — reflecting a graph across it produces the inverse. The identity function and that mirror line are the same object, which is no coincidence: the identity is its own inverse.

What Are the Properties of an Identity Function?

The identity function carries a tidy set of properties that make it the "neutral element" of function composition.

  • Domain equals range. Every output is its own input, so both sets are the same.

  • Slope is 11. The graph rises at a constant 45°45°.

  • It is bijective. It is both one-to-one (no two inputs share an output) and onto (every value in the range is hit).

  • It is its own inverse. Applying it, then applying it again, returns the start: f(f(x))=xf(f(x)) = x. So f−1=ff^{-1} = f.

  • It is the identity for composition. For any function gg, composing with the identity changes nothing: g∘I=gg \circ I = g and I∘g=gI \circ g = g, the same role 00 plays in addition and the identity matrix plays in matrix multiplication.

Examples of Identity Function

Six examples, from a single evaluation to composition and a domain over a finite set.

Example 1

Evaluate the identity function f(x)=xf(x) = x at x=9x = 9.

The identity function returns its input.

f(9)=9f(9) = 9

Final answer: 99.

Example 2

A student claims f(x)=1f(x) = 1 is the identity function "because it never changes anything." Is that right?

Wrong attempt. The student reasons that "identity" means "stays the same," and f(x)=1f(x) = 1 always gives 11, so it "stays the same."

Why it breaks. Test an input. f(2)f(2) should equal 22 for an identity function, but f(2)=1≠2f(2) = 1 \neq 2. The output did not match the input — so the value did change.

Correct. f(x)=1f(x) = 1 is a constant function, not an identity function. The identity returns the input unchanged (f(2)=2f(2) = 2); a constant returns the same output regardless of input.

Final answer: f(x)=1f(x) = 1 is constant; the identity function is f(x)=xf(x) = x.

Example 3

Show that the identity function is its own inverse.

Apply ff twice.

f(f(x))=f(x)=xf(f(x)) = f(x) = x

The composition returns the original input, so f−1(x)=x=f(x)f^{-1}(x) = x = f(x).

Final answer: f−1=ff^{-1} = f, so the identity function is self-inverse.

Example 4

Let g(x)=3x−4g(x) = 3x - 4. Compute g∘Ig \circ I and I∘gI \circ g, where I(x)=xI(x) = x.

I∘gI \circ g means apply gg, then II: I(g(x))=I(3x−4)=3x−4I(g(x)) = I(3x - 4) = 3x - 4.

g∘Ig \circ I means apply II, then gg: g(I(x))=g(x)=3x−4g(I(x)) = g(x) = 3x - 4.

Final answer: both equal 3x−43x - 4, so composing with the identity leaves gg unchanged.

Example 5

Find the range of the identity function on the domain −2,0,5,11{-2, 0, 5, 11}.

Each element maps to itself.

f(−2)=−2, f(0)=0, f(5)=5, f(11)=11f(-2) = -2,\ f(0) = 0,\ f(5) = 5,\ f(11) = 11

Final answer: range =−2,0,5,11= {-2, 0, 5, 11}, identical to the domain.

Example 6

A point sits at (6,6)(6, 6) on a graph. A second point sits at (6,2)(6, 2). Which lies on the identity function, and why?

On the identity function, output equals input, so a point (a,b)(a, b) lies on it only when a=ba = b.

(6,6)(6, 6): here a=ba = b, so it lies on y=xy = x.

(6,2)(6, 2): here 6≠26 \neq 2, so it does not.

Final answer: (6,6)(6, 6) lies on the identity function; (6,2)(6, 2) does not.

Why the Identity Function Matters

"Every operation needs an element that changes nothing."

The identity function exists for the same reason 00 and 11 do — every system of combination needs a neutral element, and composition is no exception.

  • The neutral element of composition. Just as a+0=aa + 0 = a and a×1=aa \times 1 = a, composing any function with the identity leaves it untouched. That is what lets us define inverses cleanly: f∘f−1=If \circ f^{-1} = I.

  • The baseline for transformations. In graphics and geometry, the identity transformation is the "no movement" starting point that every rotation, scaling, and translation is measured against.

  • A reference line. The line y=xy = x is the mirror for inverse functions and the diagonal against which symmetry is judged across the types of functions.

The destination is composition and inverses: once you see the identity as "the function that does nothing," f∘f−1=If \circ f^{-1} = I reads as plainly as a−a=0a - a = 0.

Tripping Points to Avoid

Mistake 1: Confusing the identity function with a constant function

Where it slips in: Reading the word "identity" as "unchanging output," as in Example 2.

Don't do this: Treat f(x)=cf(x) = c as an identity function because the output looks fixed.

The correct way: The identity returns the input (f(x)=xf(x) = x, a diagonal line); a constant returns a fixed output (f(x)=cf(x) = c, a horizontal line). Test one value — they disagree immediately.

The first instinct on the word "identity" is to picture something that stays constant, and that is exactly the slip — the identity keeps the input, not a single output value.

Mistake 2: Thinking the identity function has slope 00

Where it slips in: Sketching the graph from memory.

Don't do this: Draw a flat horizontal line.

The correct way: The identity function has slope 11, a 45°45° diagonal through the origin. Slope 00 belongs to a constant function. The second-guesser who draws it flat is mixing the two graphs.

Mistake 3: Forgetting the domain restricts the identity too

Where it slips in: Identity functions defined on a limited set, as in Example 5.

Don't do this: Assume an identity function always covers all real numbers.

The correct way: The identity returns inputs unchanged only on its stated domain. On 1,2,3{1, 2, 3} the range is 1,2,3{1, 2, 3}, not all reals.

Practice Questions

Try these, then check the answers below.

  1. Evaluate the identity function f(x)=xf(x) = x at x=−12x = -12.

  2. Do the points (7,7)(7, 7) and (7,3)(7, 3) lie on the identity function?

  3. Compute h∘Ih \circ I for h(x)=2x+1h(x) = 2x + 1, where I(x)=xI(x) = x.

  4. Find the range of the identity function on the domain −1,0,4{-1, 0, 4}.

  5. What is the inverse of the identity function, and what is its slope?

Answers

Answer to Question 1: f(−12)=−12f(-12) = -12, since the identity function returns its input unchanged.

Answer to Question 2: (7,7)(7, 7) lies on it (input equals output); (7,3)(7, 3) does not, since 7≠37 \neq 3.

Answer to Question 3: h∘Ih \circ I means apply II, then hh: h(I(x))=h(x)=2x+1h(I(x)) = h(x) = 2x + 1. Composing with the identity leaves hh unchanged.

Answer to Question 4: Range =−1,0,4= {-1, 0, 4}, identical to the domain.

Answer to Question 5: The identity function is its own inverse (f−1=ff^{-1} = f), and its slope is 11.

Conclusion

  • An identity function returns its input unchanged: f(x)=xf(x) = x.

  • Its graph is the straight line y=xy = x through the origin, with slope 11 and a 45°45° angle to both axes.

  • Its domain and range are identical, and it is bijective and its own inverse.

  • It is the neutral element of function composition — composing with it changes nothing.

  • The common trap is confusing it with a constant function f(x)=cf(x) = c, which keeps the output fixed rather than the input.

Practice These Before Moving On

Work through the practice questions above to solidify your understanding. If you get stuck telling identity from constant, return to Example 2 and test a single input on both. At Bhanzu, trainers introduce the identity function as the composition twin of 00 and 11, so its role clicks before the graph is even drawn. Want a live Bhanzu trainer to walk through more identity function problems? Book a free demo class.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

Is the identity function linear?
Yes. f(x)=xf(x) = x has the form f(x)=mx+bf(x) = mx + b with m=1m = 1 and b=0b = 0, so it is a linear function — the simplest non-trivial one.
What is the difference between an identity function and a constant function?
The identity function returns its input unchanged (f(x)=xf(x) = x, a diagonal). A constant function returns the same fixed output for every input (f(x)=cf(x) = c, a horizontal line). Test any single value and the two split apart.
Is the identity function one-to-one and onto?
Yes to both — it is bijective. No two inputs share an output, and every value in the range is reached, which is why it is invertible.
What is the inverse of the identity function?
Itself. Since f(f(x))=xf(f(x)) = x, the identity function is its own inverse: f−1=ff^{-1} = f.
Why is it called the "identity"?
Because it acts as the identity element for function composition — composing any function with it leaves that function unchanged, just as adding 00 or multiplying by 11 leaves a number unchanged.
✍️ Written By
Madhukar V
Madhukar V
Math Columnist & Analyst
I see mathematics as more than just numbers and formulas—it is a way of thinking, questioning, and understanding the world around us. I work at the intersection of mathematics, EdTech, technology, and AI-powered learning, I enjoy exploring how mathematical ideas can be made simple, meaningful, and relatable. Through my articles, I aim to present mathematics with curiosity and a practical perspective, helping readers see the beauty and relevance behind every concept in a Bhanzu way.
LinkedIn
Related Articles
Book a FREE Demo ClassBook Now →