Try this
- Give every element of exactly one arrow and “A mapping?” turns to ✓. What happens if some element has no arrow, or (switch on “Allow several arrows”) has two?
- If some element of receives no arrow at all, is it still a mapping? What if two 's hit the same ?
- Set to and to and try to draw an injection. Can you? Now swap the sizes and try to draw a surjection.
- Look at the counting panel: when , how are the numbers of injections, surjections and bijections related?
Let and be two sets. If, under some rule of correspondence , every element of corresponds to a unique element of , we say is a mapping from to , and write . Then is called the image of , and a preimage of . In an arrow diagram this is a single sentence:
Now look at where the arrows land. If every element of is hit at most once, the mapping is an injection; if every element of is hit at least once, it is a surjection; if both, it is a bijection (a one-to-one correspondence).
Predict first
has elements and has . How many different mappings are there from to ?
The arrow from can go to any of the elements, and so can the arrow from , independently. So there are .
Change and below and watch the first entry of the counting panel: it is always .
Why: counting mappings means counting choices
Example: A = {a₁, a₂, a₃}, B = {b₁, b₂}
Step 1 / 5- a₁ chooses first
A mapping just picks one image for each element of . can pick or : choices.
The same reasoning gives two facts you will use again and again: if there is an injection from to , then ; if there is a surjection from to , then . So to prove that two finite sets have the same number of elements, it is enough to build a bijection between them. This is where “correspondence and pairing” starts.
For example, every subset of corresponds to a mapping : if , and otherwise. This is a one-to-one correspondence between subsets and mappings, so has subsets.
Remove one condition
Break it
Counterexample lab: remove one condition
Conclusion: if is an injection, it is also a surjection ← still true?
. Draw an injection: three arrows land on three different elements, and has only three elements, so every one of them is hit. It is automatically a surjection.
First give one more element: , . Injections still exist, but one is always left unhit.
Dropping “finite” is even more interesting: , . Different have different images, so it is an injection; but no odd number is ever hit, so it is not a surjection. An infinite set can be in one-to-one correspondence with a part of itself ( is a bijection from onto the even numbers). “An injection is a surjection” only holds for finite sets of the same size.
Practice
and . How many mappings are there from to ?
and . How many injections are there from to ?
and . How many surjections are there from to ?
Let . How many mappings satisfy for every ?