Interactive · 1 question
Let's say that there are four children in a group: Arya, Bran, Rob, and Jon. They are standing in front of four very large piles of swords. Each child can take as many swords as he or she wants from a SINGLE* pile; this includes taking the whole pile for themselves!
*If they take swords from more than one pile, then the relationship between the children and the swords cannot be a function! Why? Check out the Horizontal Line Test!
Now, a few scenarios will be presented. See if you can determine what an injection is using the clues from the scenarios!
Scenario 1: Arya takes the second pile. Bran takes the first pile. Rob takes the fourth pile. Jon takes the third pile. This is an injection.
Scenario: 2: Arya and Bran share the first pile. Rob takes the second pile. Jon does not take any swords. This not an injection.
Scenario 3: Arya does not take any swords. Bran takes the second pile. Rob takes the first pile. Jon takes the third pile. This is an injection.
Scenario 4: Arya and Jon share the second pile. Rob takes the third pile. Bran takes the first pile. This is not an injection.
What properties does an injection seem to have?
If you got the correct answers, you're ready to learn the mathematical definition of an injection!
Let's call the children the domain and the swords the co-domain. Let's also call the domain and co-domain A and B respectively. The definition of an injection is a bit easier to understand than that of a surjection. Basically, an injection is a one-to-one function, which means that any value in the co-domain, B, cannot map to more than one element in the domain. In other words, the children must either take a pile of swords all to themselves or not take a pile at all; if they share, an injection cannot occur. Mathematically, that is represented as: . In English, that says that for all a and b, if two values of the function equal the same number, then they must be the same for an injection to occur.
Here's what an injection looks like:

This type of diagram is known as an 'onto function'. The values from the left map onto the values from the right.