ELI5: Explain Like I'm 5

Bijection, injection and surjection

Imagine you have a basket of apples and a basket of oranges. You want to put each apple and each orange into separate boxes. You can do this in different ways:

- Bijection: You have exactly the same number of boxes as fruits, and each fruit goes into one specific box. This means that none of the boxes are empty and none of the fruits are left out. Every fruit has a corresponding box and every box has a corresponding fruit. For example, if you have 5 apples and 5 boxes, you can put each apple in one (and only one) of the boxes.
- Injection: You have more boxes than fruits, but each fruit still goes into one specific box. This means that some of the boxes may be empty, but no fruit is left out. Every fruit has a corresponding box, but some boxes may not have a fruit in them. For example, if you have 5 apples and 7 boxes, you can put each apple in one (and only one) of the boxes, but two of the boxes will be empty.
- Surjection: You have fewer boxes than fruits, but each box can hold more than one fruit. This means that some of the fruits may have to share a box, but no box is left empty. Every box has at least one fruit in it, but some fruits may be in the same box as others. For example, if you have 7 apples and 5 boxes, you can put some of the apples in the same box as others, but every box will have at least one apple in it.

So, bijection means that everything can be matched up perfectly, injection means that some things will be unmatched, and surjection means that some things will have to be matched up with others. These concepts are used in mathematics to describe relationships between sets, but they can also be applied to everyday situations.
Related topics others have asked about: