1導入
写像で最初に固定すべき問いは、「各入力に対して、出力を一意に決めているか」である。写像は、関係の一種であるが、任意の関係よりも条件が強い。
この条件があるから、f(a) という記号が意味を持つ。1 つの a に複数の出力が対応すれば、f(a) は 1 つの値として定まらない。対応する出力が存在しなければ、f(a) は未定義になる。
写像で必須なのは、各入力に出力がちょうど 1 つ決まることである。異なる入力が同じ出力へ行くことは許される。「異なる入力を異なる出力へ送る」という追加条件を単射性といい、その条件を満たす写像を単射と呼ぶ。
1Introduction
The first question for a map is whether each input入力にゅうりょく determines a unique output出力しゅつりょく. A map is a special kind of relation関係かんけい, but it has stronger conditions than an arbitrary relation.
This condition is what makes the notation f(a) meaningful. If one a had several outputs, f(a) would not be a single value値あたい. If it had no output, f(a) would be undefined.
What a map requires is exactly one output for each input. Different inputs may have the same output. The additional condition that different inputs have different outputs will later be called injectivity単射たんしゃ.
2用語ようごと定義ていぎ
集合しゅうごうset A,B に対たいして、写像しゃぞうmap f:A\to B とは、各かく a\in A に対たいして、一意いちいの b\in B を対応たいおうさせる規則きそくである。
A を定義域ていぎいきdomain、B を終域しゅういきcodomainという。a に対応たいおうする値あたいvalueを f(a) と書かく。値域ちいきrangeまたは像ぞうimageは、実際じっさいに現あらわれる出力しゅつりょくoutputの集合しゅうごうであり、
f(A)=\{f(a)\mid a\in A\}
である。常つねに f(A)\subseteq B である。
2Terms and definition
For sets集合しゅうごう A,B, a map写像しゃぞう f:A\to B is a rule assigning to each a\in A a unique element b\in B.
The set A is the domain定義域ていぎいき, and B is the codomain終域しゅういき. The assigned value値あたい is written f(a). The range値域ちいき, or image像ぞう, is the set of outputs出力しゅつりょく that actually appear:
f(A)=\{f(a)\mid a\in A\}.
Always f(A)\subseteq B.
3像ぞうimageと逆像ぎゃくぞうpreimage
部分集合ぶぶんしゅうごうsubset S\subseteq A の像ぞうimageは
f(S)=\{f(a)\mid a\in S\}
である。部分集合ぶぶんしゅうごうsubset T\subseteq B の逆像ぎゃくぞうpreimageは
f^{-1}(T)=\{a\in A\mid f(a)\in T\}
である。ここで f^{-1}(T) は逆写像ぎゃくしゃぞうinverse mapを仮定かていしている記号きごうではない。逆像ぎゃくぞうpreimageは、任意にんいの写像しゃぞうmapで定義ていぎできる。
3Images像ぞう and preimages逆像ぎゃくぞう
For a subset部分集合ぶぶんしゅうごう S\subseteq A, the image像ぞう of S is
f(S)=\{f(a)\mid a\in S\}.
For a subset T\subseteq B, the preimage逆像ぎゃくぞう is
f^{-1}(T)=\{a\in A\mid f(a)\in T\}.
The notation f^{-1}(T) does not assume that an inverse map逆写像ぎゃくしゃぞう exists. A preimage is defined for every map写像しゃぞう.
4方針ほうしん
写像しゃぞうmapを確認かくにんするときは、次つぎの 2 点てんを分わける。
- 各かく a\in A に対たいして、少すくなくとも 1 つの出力しゅつりょくoutputが存在そんざいするか。
- 各かく a\in A に対たいして、出力しゅつりょくoutputが高々たかだか 1 つか。
両方りょうほうが成立せいりつするとき、出力しゅつりょくoutputは[ちょうど 1 つ]であり、写像しゃぞうmapである。関係かんけいrelationとして見みるなら、f は A\times B の部分集合ぶぶんしゅうごうsubsetであり、各かく a\in A に対たいして (a,b)\in f となる b が[ちょうど 1 つ]である。
data/lecture/math/discrete-math/relation-basics.lecture.n.md
4Strategy
To check whether a relation is a map写像しゃぞう, separate two requirements.
- For every a\in A, at least one output出力しゅつりょく exists.
- For every a\in A, at most one output exists.
If both hold, each input has exactly one output, and the relation is a map. From the relation関係かんけい viewpoint, f is a subset部分集合ぶぶんしゅうごう of A\times B such that for every a\in A there is exactly one b with (a,b)\in f.
data/lecture/math/discrete-math/relation-basics.lecture.n.md
5直感的ちょっかんてきな説明せつめい
写像しゃぞうmapは、入力側にゅうりょくがわの各かく元げんelementから出力側しゅつりょくがわへ 1 本ぽんずつ矢印やじるしを引ひく図ずとして考かんがえられる。各かく入力にゅうりょくinputから矢印やじるしが必かならず 1 本ぽんだけ出でることが写像しゃぞうmapの条件じょうけんである。
出力側しゅつりょくがわの元げんelementには、矢印やじるしが 0 本ほんしか入はいらないことも、複数ふくすう本ほん入はいることもある。これは写像しゃぞうmapであること自体じたいには問題もんだいない。これらをさらに制限せいげんすると、単射たんしゃinjectionや全射ぜんしゃsurjectionになる。
機械きかいmachineとして見みると、変かえているのは入力にゅうりょくから出力しゅつりょくへの対応たいおうである。一方いっぽう、定義域ていぎいきdomainの各かく元げんelementを必かならず処理しょりすることと、終域しゅういきcodomainの中なかへ出力しゅつりょくすることは保存ほぞんされる。
data/lecture/math/discrete-math/injections-surjections-and-bijections.lecture.n.md
5Intuitive explanation
A map写像しゃぞう can be pictured as drawing one arrow from each element元げん on the input side to the output side. The defining condition is that exactly one arrow leaves every input入力にゅうりょく.
An element on the output side may have no incoming arrows, or it may have several incoming arrows. That is not a problem for being a map. Additional restrictions on these incoming arrows lead to injections単射たんしゃ and surjections全射ぜんしゃ.
In the machine picture, the assignment from inputs to outputs may vary. What remains fixed is that every element of the domain定義域ていぎいき is processed exactly once and that every resulting output lies in the codomain終域しゅういき.
data/lecture/math/discrete-math/injections-surjections-and-bijections.lecture.n.md
6厳密げんみつな説明せつめい
写像しゃぞうmap f:A\to B の像ぞうimageと逆像ぎゃくぞうpreimageは、向むきが違ちがう。像ぞうimageは A 側がわの部分集合ぶぶんしゅうごうsubsetを B 側がわへ送おくる。
S\subseteq A
\quad\Longrightarrow\quad
f(S)\subseteq B
逆像ぎゃくぞうpreimageは B 側がわの部分集合ぶぶんしゅうごうsubsetを A 側がわへ戻もどす。
T\subseteq B
\quad\Longrightarrow\quad
f^{-1}(T)\subseteq A
逆像ぎゃくぞうpreimageは、写像しゃぞうmapが単射たんしゃinjectionでも全射ぜんしゃsurjectionでもない場合ばあいにも定義ていぎできる。
6Precise explanation
For a map写像しゃぞう f:A\to B, images像ぞう and preimages逆像ぎゃくぞう go in opposite directions. An image sends a subset部分集合ぶぶんしゅうごう of the A side to the B side:
S\subseteq A
\quad\Longrightarrow\quad
f(S)\subseteq B.
A preimage sends a subset of the B side back to the A side:
T\subseteq B
\quad\Longrightarrow\quad
f^{-1}(T)\subseteq A.
A preimage is defined even when the map is neither an injection単射たんしゃ nor a surjection全射ぜんしゃ.
7例題れいだい:終域しゅういきcodomainと値域ちいきrangeを区別くべつする
7.1問題もんだい
f:\{1,2,3\}\to\{a,b,c,d\} を f(1)=a、f(2)=b、f(3)=b で定義ていぎする。終域しゅういきcodomainと値域ちいきrangeを求もとめよ。
7Worked example: distinguish codomain終域しゅういき and range値域ちいき
7.1Problem
Define f:\{1,2,3\}\to\{a,b,c,d\} by f(1)=a, f(2)=b, and f(3)=b. Find the codomain終域しゅういき and the range値域ちいき.
7.2解説かいせつ
終域しゅういきcodomainは、写像しゃぞうmapの型かたとして先さきに指定していされた集合しゅうごうsetである。したがって終域しゅういきcodomainは \{a,b,c,d\} である。
値域ちいきrangeは、実際じっさいに値あたいとして現あらわれる出力しゅつりょくoutputの集合しゅうごうである。この例れいでは a と b だけが現あらわれるので、
f(\{1,2,3\})=\{a,b\}
である。c,d は終域しゅういきcodomainには含ふくまれるが、値域ちいきrangeには含ふくまれない。
解答かいとうでは、表ひょうや矢印図やじるしずだけでなく、定義域ていぎいきdomain・終域しゅういきcodomain・対応規則たいおうきそくを言葉ことばでも確認かくにんする。未定義みていぎの入力にゅうりょくや 2 つの出力しゅつりょくを持もつ入力にゅうりょくがあれば、写像しゃぞうmapではない。
7.2Explanation
The codomain終域しゅういき is the set集合しゅうごう specified in advance as part of the type of the map写像しゃぞう. Therefore the codomain is \{a,b,c,d\}.
The range値域ちいき is the set of outputs出力しゅつりょく that actually occur as values. In this example only a and b occur, so
f(\{1,2,3\})=\{a,b\}.
The elements c,d are in the codomain, but not in the range.
When checking a proposed map, do not rely only on a table or arrow diagram: identify the domain定義域ていぎいき, codomain, and assignment rule explicitly. If some input has no value or has two values, the proposed relation is not a map.
8変かわるものと保存ほぞんされるもの
単射性たんしゃせいinjectivityとは、異ことなる入力にゅうりょくinputが異ことなる出力しゅつりょくoutputへ送おくられることである。全射性ぜんしゃせいsurjectivityとは、終域しゅういきcodomainの各かく元げんelementが少すくなくとも 1 つの入力にゅうりょくinputの値あたいvalueになることであり、f(A)=B と同値どうちである。次つぎの表ひょうでは、定義域ていぎいきdomainや終域しゅういきcodomainの変更へんこうがこれらの性質せいしつへどう影響えいきょうするかを比くらべる。
| 変更へんこう | 変かわるもの | 保存ほぞんされるもの |
| 終域しゅういきcodomainを広ひろげる | 全射性ぜんしゃせいsurjectivityの判定はんてい | 各かく入力にゅうりょくinputの値あたいvalue |
| 定義域ていぎいきdomainを制限せいげんする | 値域ちいきrange。単射たんしゃinjectionでなかった写像しゃぞうmapが単射たんしゃinjectionになることもある | 残のこった入力にゅうりょくinputの値あたいvalue。もともと単射たんしゃinjectionなら単射性たんしゃせいinjectivityも保たもたれる |
終域しゅういきcodomainを広ひろげたり狭せばめたりすると、同おなじ対応規則たいおうきそくでも全射性ぜんしゃせいsurjectivityが変かわることがある。一方いっぽう、像ぞうimageは定義域ていぎいきdomainと対応規則たいおうきそくから決きまる。
ただし、終域しゅういきcodomainを狭せばめて同おなじ写像しゃぞうmapの対応規則たいおうきそくを保たもつには、新あたらしい終域しゅういきcodomainが値域ちいきrange f(A) を含ふくまなければならない。f(A) の元げんelementを除のぞけば、ある入力にゅうりょくinputの値あたいvalueが終域しゅういきcodomainの外そとに出でるため、その型かたの写像しゃぞうmapではなくなる。
8What changes and what is preserved
Injectivity単射性たんしゃせい means that different inputs入力にゅうりょく are sent to different outputs出力しゅつりょく. Surjectivity全射性ぜんしゃせい means that every element of the codomain終域しゅういき is the value値あたい of at least one input, equivalently f(A)=B. The following table compares how changing the domain定義域ていぎいき or codomain affects these properties.
| Change | What changes | What is preserved |
| Enlarging the codomain終域しゅういき | whether surjectivity全射性ぜんしゃせい holds | the value値あたい of each input入力にゅうりょく |
| Restricting the domain定義域ていぎいき | the range値域ちいき; a non-injective map may become an injection単射たんしゃ | the values of the remaining inputs; an injection remains injective |
Enlarging or narrowing the codomain終域しゅういき can change whether the same assignment rule is surjective全射ぜんしゃ. The image像ぞう, by contrast, is determined by the domain and the assignment rule.
There is one necessary qualification when narrowing the codomain: the new codomain must still contain the range値域ちいき f(A). If an element of f(A) is removed, some input value lies outside the declared codomain, so the rule no longer defines a map of that type.