A function is a rule that assigns each input exactly one output. Here we see a domain on the left mapping to a codomain on the right, each arrow showing the unique association.
A one to one function or injective function ensures no two different inputs share the same output. The top figure shows a one-to-one mapping while the bottom shows a non-injective example.
Using the horizontal line test, we can check graphically if a function is injective. For example y equals x passes the test, but y equals x squared fails as the horizontal line crosses twice.
We can verify one-to-one functions algebraically. For f of x equals two x plus three: f a equals f b leads to a equals b. Similarly for x cubed minus one and two to the x, the assumption f a equals f b also gives a equals b.
Linear functions are always injective, quadratics never over the whole domain, cubics can be, exponentials are injective, and sines are not unless domain restricted.
The square function fails to be injective on all reals but restricting to non-negative x values yields a one-to-one function, enabling an inverse.
Injective functions have inverses over their ranges, are vital in cryptography for decoding, ensure uniqueness in databases, and define precise coordinate transformations.