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:AB理解りかいするとき、つぎうべきことは「この写像しゃぞうmap情報じょうほうinformationつぶしているか」「終域しゅういきcodomain全体ぜんたいとどいているか」である。

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

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

1Introduction

For a map写像しゃぞう f:AB, 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:AB単射たんしゃinjectionであるとは、任意にんいa1,a2A について

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

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

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

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

2Terms and definitions

A map写像しゃぞう f:AB is an injection単射たんしゃ if for all a1,a2A,

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

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

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

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

3方針ほうしん

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

全射ぜんしゃsurjectionしめすときは、任意にんいbBり、f(a)=bたす aA構成こうせいする。ここでは終域しゅういき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 bB and construct aA 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有限集合ゆうげんしゅうごうとする。有限集合ゆうげんしゅうごう個数こすうについて、部分集合ぶぶんしゅうごう CB なら |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| であることは、ABげんをそれぞれおなながさのれつならべ、おな位置いちどうしを対応たいおうさせる全単射ぜんたんしゃbijection存在そんざいすることと同値どうちである。ぎゃくに、全単射ぜんたんしゃbijection重複ちょうふくあまりもなくげん対応たいおうさせるので、両集合りょうしゅうごう個数こすうひとしい。

単射たんしゃinjection f:AB存在そんざいするなら、fAぞうimage f(A)あいだ全単射ぜんたんしゃbijectionである。したがって

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

である。

全射ぜんしゃsurjection f:AB存在そんざいするなら、かく bB逆像ぎゃくぞうpreimage

f-1({b})={aAf(a)=b}

からでない。これらの逆像ぎゃくぞうpreimageたがいにまじわらず、その和集合わしゅうごうunionA である。B=[PARSE ERROR: Undefined("Command(\"varnothing\")")] のときは写像しゃぞうmap AB存在そんざいすることから 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:AB について |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 CB, 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:AB 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:AB exists, every preimage逆像ぎゃくぞう

f-1({b})={aAf(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 AB 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:AB 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+1NN単射たんしゃinjectionだが、1到達とうたつしないため全射ぜんしゃsurjectionではない。

ぎゃくに、q(n)=n/2NN全射ぜんしゃsurjectionである。任意にんいmNたいして 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単射たんしゃ NN, but it is not a surjection全射ぜんしゃ because 1 is not reached.

Conversely, q(n)=n/2 is a surjection NN because q(2m)=m for every mN. 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)=af(2)=bf(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 であり、23 である。ことなる入力にゅうりょく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 23. 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
タブを全て閉じる