When Is a Function Injective?

A function f is injective if and only if whenever f(x) = f(y), x = y.

How do you know if a function is Injective or surjective?

If f:X→Y is a function then for every y∈Y we have the set f−1({y}):={x∈X∣f(x)=y}. f is injective iff f−1({y}) has at most one element for every y∈Y. f is surjective iff f−1({y}) has at least one element for every y∈Y.

What functions are injective?

In mathematics, an injective function (also known as injection, or one-to-one function) is a function f that maps distinct elements to distinct elements; that is, f(x1) = f(x2) implies x1 = x2. In other words, every element of the function's codomain is the image of at most one element of its domain.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.