markdown
単射・全射・全単射md dda9e08
lecture/math/discrete-math/injections-surjections-and-bijections.lecture.n.md
Download PDF

単射たんしゃinjection・全射ぜんしゃsurjection・全単射ぜんたんしゃbijection

date2026-07-14document_iddoc_f8506560b6813ebb967039a1a322c93bdescription単射・全射・全単射を、入力の区別を保つか、終域を覆うか、可逆な対応になるかという観点から整理する講義である。prerequisites写像の基本 / 集合の基本 / 集合の濃度と可算性type講義content_typelecturestatusactiverelateddata/lecture/math/discrete-math/discrete-mathematics-portal.lecture.n.md / data/lecture/math/discrete-math/cardinality-and-countability.lecture.n.md / data/lecture/math/discrete-math/map-basics.lecture.n.md / data/lecture/math/discrete-math/images-and-preimages-of-maps.lecture.n.md / data/lecture/math/discrete-math/composition-and-inverse-maps.lecture.n.md / data/exercise/math/discrete-math/maps-injections-and-surjections.exercise.n.md
mathdiscrete-mathinjectionsurjectionbijectionlecture

Injections単射たんしゃ, surjections全射ぜんしゃ, and bijections全単射ぜんたんしゃ

1導入どうにゅう

写像しゃぞうmap f:A→B を理解りかいするとき、次つぎに問とうべきことは「この写像しゃぞうmapは情報じょうほうinformationを潰つぶしているか」「終域しゅういきcodomainの全体ぜんたいに届とどいているか」である。

単射たんしゃinjectionは異ことなる入力にゅうりょくinputを異ことなる出力しゅつりょくoutputへ送おくる性質せいしつpropertyである。全射ぜんしゃsurjectionは終域しゅういきcodomainの全すべての元げんelementへ到達とうたつする性質せいしつpropertyである。全単射ぜんたんしゃbijectionはその両方りょうほうであり、一対一対応いちたいいちたいおうとして逆写像ぎゃくしゃぞうinverse mapを持もつ。

単射たんしゃinjectionは情報じょうほうを潰つぶさないこと、全射ぜんしゃsurjectionは終域しゅういきcodomainを余あまらせないことを表あらわす。全単射ぜんたんしゃbijectionはその両方りょうほうを満みたすため、矢印やじるしを逆向ぎゃくむきに読よめる。

1Introduction

For a map写像しゃぞう f:A→B, the next questions are whether the map collapses information情報じょうほう and whether it reaches the whole codomain終域しゅういき.

An injection単射たんしゃ sends distinct inputs入力にゅうりょく to distinct outputs出力しゅつりょく. A surjection全射ぜんしゃ reaches every element元げん of the codomain. A bijection全単射ぜんたんしゃ has both properties and has an inverse map逆写像ぎゃくしゃぞう as a one-to-one correspondence.

An injection does not collapse information, while a surjection leaves no element of the codomain unused. A bijection has both properties, so its arrows can be read backward.

2用語ようごと定義ていぎ

写像しゃぞうmap f:A→B が単射たんしゃinjectionであるとは、任意にんいの a1,a2∈A について

f(a1)=f(a2)⟹a1=a2

が成立せいりつすることである。同値どうちに、a1≠a2 なら f(a1)≠f(a2) である。

写像しゃぞうmap f:A→B が全射ぜんしゃsurjectionであるとは、任意にんいの b∈B に対たいして、ある a∈A が存在そんざいし f(a)=b を満みたすことである。これは f(A)=B と同値どうちである。

写像しゃぞうmap f:A→B が全単射ぜんたんしゃbijectionであるとは、f が単射たんしゃinjectionかつ全射ぜんしゃsurjectionであることである。

2Terms and definitions

A map写像しゃぞう f:A→B is an injection単射たんしゃ if for all a1,a2∈A,

f(a1)=f(a2)⟹a1=a2.

Equivalently, a1≠a2 implies f(a1)≠f(a2).

A map f:A→B is a surjection全射ぜんしゃ if for every b∈B there exists a∈A such that f(a)=b. This is equivalent to f(A)=B.

A map f:A→B is a bijection全単射ぜんたんしゃ if it is both an injection and a surjection.

3方針ほうしん

単射たんしゃinjectionを示しめすときは、f(a1)=f(a2) と仮定かていして a1=a2 を導みちびく。これは「出力しゅつりょくが同おなじなら、入力にゅうりょくも同おなじ」という方向ほうこうの証明しょうめいである。

全射ぜんしゃsurjectionを示しめすときは、任意にんいの b∈B を取とり、f(a)=b を満みたす a∈A を構成こうせいする。ここでは終域しゅういきcodomain B の任意にんいの元げんelementから始はじめることが重要じゅうようである。

全単射ぜんたんしゃbijectionを示しめすには、単射たんしゃinjectionと全射ぜんしゃsurjectionを別々べつべつに確認かくにんするか、明示的めいじてきな逆写像ぎゃくしゃぞうinverse mapを構成こうせいする。

data/lecture/math/discrete-math/map-basics.lecture.n.md data/lecture/math/discrete-math/images-and-preimages-of-maps.lecture.n.md

3Strategy

To prove injectivity単射性たんしゃせい, assume f(a1)=f(a2) and derive a1=a2. This proves the direction “same output implies same input.”

To prove surjectivity全射性ぜんしゃせい, take arbitrary b∈B and construct a∈A satisfying f(a)=b. The important point is to start with an arbitrary element元げん of the codomain終域しゅういき B.

To prove bijectivity全単射性ぜんたんしゃせい, either check injection and surjection separately, or construct an explicit inverse map逆写像ぎゃくしゃぞう.

data/lecture/math/discrete-math/map-basics.lecture.n.md data/lecture/math/discrete-math/images-and-preimages-of-maps.lecture.n.md

4直感的ちょっかんてきな説明せつめい

単射たんしゃinjectionは、入力側にゅうりょくがわの区別くべつを保存ほぞんする。異ことなる入力にゅうりょくinputが同おなじ出力しゅつりょくoutputへ潰つぶれないため、出力しゅつりょくoutputを見みれば入力にゅうりょくを区別くべつできる。

全射ぜんしゃsurjectionは、終域しゅういきcodomainを覆おおう。終域しゅういきcodomainに指定していした元げんelementが、実際じっさいに何なにかの入力にゅうりょくinputから到達とうたつされることを要求ようきゅうする。

全単射ぜんたんしゃbijectionは、潰つぶれも余あまりもない対応たいおうcorrespondenceである。有限集合ゆうげんしゅうごうでは、全単射ぜんたんしゃbijectionが存在そんざいすることは両集合りょうしゅうごうの元げんelementの個数こすうが等ひとしいことと対応たいおうする。

矢印図やじるしずでは、単射たんしゃinjectionは 2 つの入力にゅうりょくが同おなじ出力しゅつりょくへ合流ごうりゅうしないこと、全射ぜんしゃsurjectionは終域しゅういきの点てんに矢印やじるしが少すくなくとも 1 本ぽんは入はいることとして見みえる。

4Intuitive explanation

An injection単射たんしゃ preserves distinctions on the input side. Different inputs入力にゅうりょく do not collapse to the same output出力しゅつりょく, so the output can distinguish the input.

A surjection全射ぜんしゃ covers the codomain終域しゅういき. Every element元げん declared in the codomain must actually be reached from some input.

A bijection全単射ぜんたんしゃ is a correspondence対応たいおう with no collisions and no unused codomain elements. For finite sets, the existence of a bijection corresponds to the two sets having the same number of elements.

In an arrow diagram, injectivity means that two input arrows never merge at one output, while surjectivity means that every codomain point has at least one incoming arrow.

5有限集合ゆうげんしゅうごうでの個数こすうの見方みかた

A,B を有限集合ゆうげんしゅうごうとする。有限集合ゆうげんしゅうごうの個数こすうについて、部分集合ぶぶんしゅうごう C⊆B なら |C|[PARSE ERROR: Undefined("Command(\"le\")")]|B| であり、|C|=|B| なら C=B である。これは B の元げんを一列いちれつに並ならべたとき、C がそのうちの一部いちぶだけを選えらぶこと、同おなじ個数こすうを選えらぶには全部ぜんぶを選えらぶ必要ひつようがあることによる。

data/lecture/math/discrete-math/cardinality-and-countability.lecture.n.md

また、|A|=|B| であることは、A と B の元げんをそれぞれ同おなじ長ながさの列れつに並ならべ、同おなじ位置いちどうしを対応たいおうさせる全単射ぜんたんしゃbijectionが存在そんざいすることと同値どうちである。逆ぎゃくに、全単射ぜんたんしゃbijectionは重複ちょうふくも余あまりもなく元げんを対応たいおうさせるので、両集合りょうしゅうごうの個数こすうは等ひとしい。

単射たんしゃinjection f:A→B が存在そんざいするなら、f は A と像ぞうimage f(A) の間あいだの全単射ぜんたんしゃbijectionである。したがって

|A|=|f(A)|[PARSE ERROR: Undefined("Command(\"le\")")]|B|

である。

全射ぜんしゃsurjection f:A→B が存在そんざいするなら、各かく b∈B の逆像ぎゃくぞうpreimage

f-1({b})={a∈A∣f(a)=b}

は空からでない。これらの逆像ぎゃくぞうpreimageは互たがいに交まじわらず、その和集合わしゅうごうunionは A である。B=[PARSE ERROR: Undefined("Command(\"varnothing\")")] のときは写像しゃぞうmap A→B が存在そんざいすることから A=[PARSE ERROR: Undefined("Command(\"varnothing\")")] であり、結論けつろんは直ただちに従したがう。B≠[PARSE ERROR: Undefined("Command(\"varnothing\")")] のとき、A は |B| 個この空からでない部分ぶぶんに分わかれ、|A|[PARSE ERROR: Undefined("Command(\"ge\")")]|B| となる。

特とくに |A|=|B| なら、単射たんしゃinjection f:A→B について |f(A)|=|B| であり、f(A)⊆B だから f(A)=B、すなわち f は全射ぜんしゃsurjectionである。逆ぎゃくに f が全射ぜんしゃsurjectionなら、A を |B| 個この空からでない逆像ぎゃくぞうpreimageに分わけ、その個数こすうの合計ごうけいが |A|=|B| になる。したがって各かく逆像ぎゃくぞうpreimageの元げんはちょうど 1 個こであり、f は単射たんしゃinjectionである。

よって、同おなじ個数こすうの有限集合ゆうげんしゅうごうの間あいだでは、単射性たんしゃせいinjectivityと全射性ぜんしゃせいsurjectivityは同値どうちである。この結論けつろんでは「有限ゆうげん」と「|A|=|B|」の両方りょうほうを使つかっている。

5Counting viewpoint for finite sets

Let A,B be finite sets有限集合ゆうげんしゅうごう. For finite sets, if C⊆B, then |C|[PARSE ERROR: Undefined("Command(\"le\")")]|B|, and equality implies C=B. Indeed, after listing the elements of B, the subset C selects some of them; selecting the same number requires selecting all of them.

data/lecture/math/discrete-math/cardinality-and-countability.lecture.n.md

Also, |A|=|B| is equivalent to the existence of a bijection全単射ぜんたんしゃ between A and B: list both sets in sequences of the same length and match equal positions. Conversely, a bijection matches elements without duplication or leftovers, so the two finite sets have the same number of elements.

If an injection単射たんしゃ f:A→B exists, then f is a bijection全単射ぜんたんしゃ between A and its image像ぞう f(A). Hence

|A|=|f(A)|[PARSE ERROR: Undefined("Command(\"le\")")]|B|.

If a surjection全射ぜんしゃ f:A→B exists, every preimage逆像ぎゃくぞう

f-1({b})={a∈A∣f(a)=b}

is nonempty. These preimages are pairwise disjoint and their union和集合わしゅうごう is A. If B=[PARSE ERROR: Undefined("Command(\"varnothing\")")], the existence of a map A→B forces A=[PARSE ERROR: Undefined("Command(\"varnothing\")")], and the conclusion is immediate. If B≠[PARSE ERROR: Undefined("Command(\"varnothing\")")], then A is partitioned into |B| nonempty parts, so |A|[PARSE ERROR: Undefined("Command(\"ge\")")]|B|.

In particular, suppose |A|=|B|. If f:A→B is injective, then |f(A)|=|B| and f(A)⊆B, so f(A)=B and f is surjective. Conversely, if f is surjective, it partitions A into |B| nonempty preimages whose sizes sum to |A|=|B|. Every preimage must therefore contain exactly one element, so f is injective.

Hence injectivity and surjectivity are equivalent for finite sets of the same size. This conclusion uses both finiteness and the hypothesis |A|=|B|.

6無限集合むげんしゅうごうでの注意ちゅうい

無限集合むげんしゅうごうでは、定義域ていぎいきと終域しゅういきが同おなじ濃度のうどcardinalityでも、単射性たんしゃせいinjectivityと全射性ぜんしゃせいsurjectivityは同値どうちにならない。ここでは N={1,2,3,[PARSE ERROR: Undefined("Command(\"dots\")")]} とする。s(n)=n+1 は N→N の単射たんしゃinjectionだが、1 に到達とうたつしないため全射ぜんしゃsurjectionではない。

逆ぎゃくに、q(n)=⌈n/2⌉ は N→N の全射ぜんしゃsurjectionである。任意にんいの m∈N に対たいして q(2m)=m だからである。しかし q(1)=q(2)=1 なので単射たんしゃinjectionではない。この 2 例れいは、有限性ゆうげんせいの仮定かていを外はずすと両方向りょうほうこうの含意がんいがともに壊こわれることを示しめす。

6Warning for infinite sets

For infinite sets無限集合むげんしゅうごう, injectivity and surjectivity need not be equivalent even when the domain and codomain have the same cardinality濃度のうど. Here let N={1,2,3,[PARSE ERROR: Undefined("Command(\"dots\")")]}. The map s(n)=n+1 is an injection単射たんしゃ N→N, but it is not a surjection全射ぜんしゃ because 1 is not reached.

Conversely, q(n)=⌈n/2⌉ is a surjection N→N because q(2m)=m for every m∈N. It is not injective because q(1)=q(2)=1. These examples show that both implications fail when the finiteness hypothesis is removed.

7例題れいだい:単射たんしゃinjectionと全射ぜんしゃsurjectionを判定はんていする

7.1問題もんだい

f:{1,2,3}→{a,b,c} を f(1)=a、f(2)=b、f(3)=b で定義ていぎする。f は単射たんしゃinjectionか、全射ぜんしゃsurjectionか、全単射ぜんたんしゃbijectionかを判定はんていせよ。

7Worked example: decide injection単射たんしゃ and surjection全射ぜんしゃ

7.1Problem

Let f:{1,2,3}→{a,b,c} be defined by f(1)=a, f(2)=b, and f(3)=b. Decide whether f is an injection単射たんしゃ, a surjection全射ぜんしゃ, or a bijection全単射ぜんたんしゃ.

7.2解説かいせつ

f(2)=b かつ f(3)=b であり、2≠3 である。異ことなる入力にゅうりょくinputが同おなじ出力しゅつりょくoutputへ送おくられているので、f は単射たんしゃinjectionではない。

また、終域しゅういきcodomainの元げんelement c に対たいして、f(x)=c を満みたす x∈{1,2,3} は存在そんざいしない。したがって f は全射ぜんしゃsurjectionでもない。

全単射ぜんたんしゃbijectionは単射たんしゃinjectionかつ全射ぜんしゃsurjectionでなければならないので、f は全単射ぜんたんしゃbijectionでもない。

7.2Explanation

We have f(2)=b and f(3)=b with 2≠3. Different inputs入力にゅうりょく are sent to the same output出力しゅつりょく, so f is not an injection単射たんしゃ.

Also, for the codomain終域しゅういき element c, there is no x∈{1,2,3} such that f(x)=c. Therefore f is not a surjection全射ぜんしゃ.

Since a bijection全単射ぜんたんしゃ must be both injective and surjective, f is not a bijection.

8見分みわけ方かたと関連かんれんリンク

  • 単射たんしゃinjectionは「出力しゅつりょくの衝突しょうとつがないか」を確認かくにんする。
  • 全射ぜんしゃsurjectionは「終域しゅういきcodomainに届とどかない元げんelementがないか」を確認かくにんする。
  • 全単射ぜんたんしゃbijectionは「衝突しょうとつも未到達みとうたつもないか」を確認かくにんする。
  • 終域しゅういきcodomainを変かえると、全射性ぜんしゃせいsurjectivityの判定はんていは変かわりうる。
data/lecture/math/discrete-math/map-basics.lecture.n.md data/lecture/math/discrete-math/composition-and-inverse-maps.lecture.n.md

8How to identify them and related links

  • For an injection単射たんしゃ, check whether any output collision occurs.
  • For a surjection全射ぜんしゃ, check whether any codomain終域しゅういき element is missed.
  • For a bijection全単射ぜんたんしゃ, check for both no collisions and no missed codomain elements.
  • Changing the codomain can change whether surjectivity全射性ぜんしゃせい holds.
data/lecture/math/discrete-math/map-basics.lecture.n.md data/lecture/math/discrete-math/composition-and-inverse-maps.lecture.n.md
raw .n.md をコピー
loc をコピー (filepath:line ~ line)
copy share link
copy encoded share link
path をコピー
copy share link
copy encoded share link
copy share link
copy encoded share link
タブを全て閉じる