文章源自https://www.mathsisfun.com/sets/injective-surjective-bijective.html
1 函數的定義
A function is a way of matching the members of a set "A" to a set "B":
A集合中的元素,匹配B集合中元素的方法叫函數
2 幾種匹配方法
我們仔細看看這幾種模式
2.1 General Function 普通函數
A General Function points from each member of "A" to a member of "B".
It never has one "A" pointing to more than one "B", so one-to-many is not OK in a function (so something like "f(x) = 7 or 9" is not allowed)
But more than one "A" can point to the same "B" (many-to-one is OK)
每個自變量都有值與之對應,多個自變量可以對應一個值,即多對一
2.2 Injective 單射
A function f is injective if and only if whenever f(x) = f(y), x = y.
Injective means we won't have two or more "A"s pointing to the same "B".
So many-to-one is NOT OK (which is OK for a general function).
As it is also a function one-to-many is not OK
But we can have a "B" without a matching "A"
Injective is also called "One-to-One"
是單射,就是說不能出現多對一的情況,必須一對一,允許有值沒有自變量對應。
2.3 Surjective 滿射
A function f (from set A to B) is surjective if and only if for every y in B, there is at least one x in A such that f(x) = y, in other words f is surjective if and only if f(A) = B.
Surjective means that every "B" has at least one matching "A" (maybe more than one).
There won't be a "B" left out.
是滿射,允許多對一,B中必須每一個值都有自變量
2.4 Bijective 雙射
A function f (from set A to B) is bijective if, for every y in B, there is exactly one x in A such that f(x) = y
Bijective means both Injective and Surjective together.
Think of it as a "perfect pairing" between the sets: every one has a partner and no one is left out.
So there is a perfect "one-to-one correspondence" between the members of the sets.
(But don't get that confused with the term "One-to-One" used to mean injective).
是一一對應,有逆的存在