markdown
写像と単射・全射 - 基本演習md 7725bc9
exercise/math/discrete-math/maps-injections-and-surjections.exercise.n.md

写像しゃぞうmapと単射たんしゃinjection・全射ぜんしゃsurjection - 基本演習きほんえんしゅう

date2026-07-14document_iddoc_9ab94748967ab5ded274a39abffabffbdescription写像、単射、全射、全単射、合成写像、逆写像を定義から判定する基本演習である。prerequisites写像の基本 / 単射・全射・全単射 / 合成写像と逆写像type問題演習content_typeexercisestatusactiverelateddata/lecture/math/discrete-math/map-basics.lecture.n.md / data/lecture/math/discrete-math/injections-surjections-and-bijections.lecture.n.md / data/lecture/math/discrete-math/composition-and-inverse-maps.lecture.n.md / data/lecture/math/discrete-math/discrete-mathematics-portal.lecture.n.md
mathdiscrete-mathexercisemapbijection

Maps写像しゃぞう, injections単射たんしゃ, and surjections全射ぜんしゃ: basic exercises

2順序上じゅんじょじょうの注意ちゅうい

この演習えんしゅうでは、写像しゃぞうmap、単射たんしゃinjection、全射ぜんしゃsurjectionに加くわえて、逆写像ぎゃくしゃぞうinverse mapと合成写像ごうせいしゃぞうcomposite mapも短みじかく扱あつかう。逆写像ぎゃくしゃぞうinverse mapは全単射ぜんたんしゃbijectionの矢印やじるしを逆向ぎゃくむきに読よむ写像しゃぞうであり、合成写像ごうせいしゃぞうcomposite map g∘f は先さきに f、次つぎに g を適用てきようする写像しゃぞうである。

2Order note

This exercise mainly treats maps写像しゃぞう, injections単射たんしゃ, and surjections全射ぜんしゃ, but it also briefly uses inverse maps逆写像ぎゃくしゃぞう and composite maps合成写像ごうせいしゃぞう. An inverse map is obtained by reading the arrows of a bijection全単射ぜんたんしゃ backward, and a composite map g∘f applies f first and then g.

3演習えんしゅう方針ほうしん

写像しゃぞうmapでは、各かく入力にゅうりょくinputに[ちょうど 1 つ]の出力しゅつりょくoutputがあるかを確認かくにんする。単射たんしゃinjectionは衝突しょうとつの有無うむ、全射ぜんしゃsurjectionは終域しゅういきcodomainへの到達とうたつで判定はんていする。

3Exercise strategy

For a map写像しゃぞう, check whether each input入力にゅうりょく has exactly one output出力しゅつりょく. For an injection単射たんしゃ, look for collisions. For a surjection全射ぜんしゃ, check whether every element of the codomain終域しゅういき is reached.

4問題もんだい 1

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

4.1解答かいとう

f(2)=f(3)=b で 2≠3 なので、f は単射たんしゃinjectionではない。また c に到達とうたつする入力にゅうりょくinputが存在そんざいしないので、f は全射ぜんしゃsurjectionでもない。

4.2解説かいせつ

単射たんしゃinjectionは入力にゅうりょくの区別くべつを保存ほぞんする性質せいしつであり、全射ぜんしゃsurjectionは終域しゅういきcodomainを覆おおう性質せいしつである。

4.3よくある誤あやまり

値域ちいきrange {a,b} と終域しゅういきcodomain {a,b,c} を混同こんどうする誤あやまりである。

4Problem 1

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

4.1Answer

Because f(2)=f(3)=b with 2≠3, the map is not an injection単射たんしゃ. Also, no input入力にゅうりょく reaches c, so the map is not a surjection全射ぜんしゃ.

4.2Explanation

An injection単射たんしゃ preserves distinctions between inputs, while a surjection全射ぜんしゃ covers the codomain終域しゅういき.

4.3Common mistake

Do not confuse the range値域ちいき {a,b} with the codomain終域しゅういき {a,b,c}.

5問題もんだい 2

g:{1,2,3}→{a,b,c} を g(1)=b、g(2)=c、g(3)=a で定義ていぎする。g の逆写像ぎゃくしゃぞうinverse mapを求もとめよ。

5.1解答かいとう

g は各かく入力にゅうりょくinputを異ことなる出力しゅつりょくoutputへ送おくり、終域しゅういきcodomainの全すべてに到達とうたつしている。したがって全単射ぜんたんしゃbijectionである。逆写像ぎゃくしゃぞうinverse mapは g-1(a)=3、g-1(b)=1、g-1(c)=2 である。

5.2解説かいせつ

逆写像ぎゃくしゃぞうinverse mapは全単射ぜんたんしゃbijectionのときにだけ存在そんざいする。まず全単射ぜんたんしゃbijectionを確認かくにんしてから矢印やじるしを逆向ぎゃくむきに読よむ。

5.3よくある誤あやまり

単射たんしゃinjectionだけを確認かくにんして逆写像ぎゃくしゃぞうinverse mapを作つくる誤あやまりである。

逆写像ぎゃくしゃぞうinverse mapを作つくるには、出力しゅつりょくから入力にゅうりょくへ一意いちいに戻もどれることに加くわえて、終域しゅういきcodomainのすべての元げんelementが使つかわれていることも必要ひつようである。したがって単射性たんしゃせいinjectivityだけでなく全射性ぜんしゃせいsurjectivityも確認かくにんする。

5Problem 2

Let g:{1,2,3}→{a,b,c} be defined by g(1)=b, g(2)=c, and g(3)=a. Find the inverse map逆写像ぎゃくしゃぞう of g.

5.1Answer

The map sends distinct inputs入力にゅうりょく to distinct outputs出力しゅつりょく and reaches every element of the codomain終域しゅういき. Hence g is a bijection全単射ぜんたんしゃ. Its inverse map逆写像ぎゃくしゃぞう is

g-1(a)=3,g-1(b)=1,g-1(c)=2.

5.2Explanation

An inverse map逆写像ぎゃくしゃぞう exists only for a bijection全単射ぜんたんしゃ. First verify bijectivity, then read each arrow backward.

5.3Common mistake

Checking only injectivity単射性たんしゃせい is not enough to construct an inverse map; surjectivity全射性ぜんしゃせい is also required.

To construct an inverse map, every output must determine a unique input, and every element of the codomain終域しゅういき must actually be used. Thus both injectivity and surjectivity must be checked.

6問題もんだい 3

f:Z→Z を f(n)=n+1 とする。f は単射たんしゃinjectionか、全射ぜんしゃsurjectionか。

6.1解答かいとう

f(n1)=f(n2) とすると n1+1=n2+1 なので n1=n2 である。したがって単射たんしゃinjectionである。

任意にんいの m∈Z に対たいして n=m-1∈Z と置おくと f(n)=m である。したがって全射ぜんしゃsurjectionである。よって全単射ぜんたんしゃbijectionである。

6.2解説かいせつ

全射ぜんしゃsurjectionでは、任意にんいの終域しゅういきcodomainの元げんelementから始はじめ、対応たいおうする入力にゅうりょくinputを構成こうせいする。

6.3よくある誤あやまり

n+1 の形かたちだけを見みて、0 に到達とうたつしないと判断はんだんする誤あやまりである。定義域ていぎいきが Z なので -1 が使つかえる。

6Problem 3

Let f:Z→Z be defined by f(n)=n+1. Is f an injection単射たんしゃ or a surjection全射ぜんしゃ?

6.1Answer

If f(n1)=f(n2), then n1+1=n2+1, so n1=n2. Thus f is an injection単射たんしゃ.

For arbitrary m∈Z, put n=m-1∈Z. Then f(n)=m. Thus f is a surjection全射ぜんしゃ, and therefore a bijection全単射ぜんたんしゃ.

6.2Explanation

To prove surjectivity全射性ぜんしゃせい, start with an arbitrary element元げん of the codomain終域しゅういき and construct a corresponding input入力にゅうりょく.

6.3Common mistake

Do not decide from the expression n+1 alone that 0 is not reached. The domain定義域ていぎいき is Z, so -1 is available.

7問題もんだい 4

f:N→N を f(n)=n+1 とする。ここで N={0,1,2,[PARSE ERROR: Undefined("Command(\"dots\")")]} とする。f は単射たんしゃinjectionか、全射ぜんしゃsurjectionか。

7.1解答かいとう

f(n1)=f(n2) なら n1+1=n2+1 なので n1=n2 である。したがって単射たんしゃinjectionである。

しかし 0∈N に対たいして f(n)=0 を満みたす n∈N は存在そんざいしない。したがって全射ぜんしゃsurjectionではない。

7.2解説かいせつ

同おなじ式しきでも定義域ていぎいきdomainと終域しゅういきcodomainが変かわると、全射性ぜんしゃせいsurjectivityの判定はんていが変かわる。

7.3よくある誤あやまり

問題もんだい 3 と同おなじ式しきだから同おなじ判定はんていになると考かんがえる誤あやまりである。

7Problem 4

Let f:N→N be defined by f(n)=n+1, where N={0,1,2,[PARSE ERROR: Undefined("Command(\"dots\")")]}. Is f an injection単射たんしゃ or a surjection全射ぜんしゃ?

7.1Answer

If f(n1)=f(n2), then n1+1=n2+1, so n1=n2. Thus f is an injection単射たんしゃ.

However, there is no n∈N satisfying f(n)=0. Therefore f is not a surjection全射ぜんしゃ.

7.2Explanation

The same formula can have different properties when the domain定義域ていぎいき and codomain終域しゅういき change.

7.3Common mistake

Do not assume the answer is the same as in Problem 3 just because the formula is the same.

8問題もんだい 5

f:{1,2}→{a,b} を f(1)=a、f(2)=b で定さだめ、g:{a,b}→{0,1} を g(a)=1、g(b)=0 で定さだめる。(g∘f)(1) と (g∘f)(2) を求もとめ、合成ごうせいcompositionの適用順てきようじゅんを説明せつめいせよ。

8.1解答かいとう

(g∘f)(1)=g(f(1))=g(a)=1,
(g∘f)(2)=g(f(2))=g(b)=0

である。つまり、先さきに f を適用てきようし、その出力しゅつりょくoutputに g を適用てきようする。

8.2解説かいせつ

合成写像ごうせいしゃぞうcomposite mapでは、記号きごうの左ひだりからではなく入力にゅうりょくに近ちかい右側みぎがわの写像しゃぞうmapから適用てきようする。

8.3よくある誤あやまり

g∘f を先さきに g、後あとに f と読よむ誤あやまりである。

8Problem 5

Define f:{1,2}→{a,b} by f(1)=a and f(2)=b, and define g:{a,b}→{0,1} by g(a)=1 and g(b)=0. Compute (g∘f)(1) and (g∘f)(2), and explain the order of application in the composition合成ごうせい.

8.1Answer

(g∘f)(1)=g(f(1))=g(a)=1,

and

(g∘f)(2)=g(f(2))=g(b)=0.

Thus f is applied first, and then g is applied to its output出力しゅつりょく.

8.2Explanation

For a composite map合成写像ごうせいしゃぞう, the map closest to the input入力にゅうりょく on the right is applied first, not the symbol on the left.

8.3Common mistake

Do not read g∘f as “apply g first and then f.”

9証明しょうめい演習えんしゅう:合成写像ごうせいしゃぞうcomposite mapから各写像かくしゃぞうへ戻もどれる性質せいしつ

9.1問題もんだい

f:X→Y、g:Y→Z とする。次つぎを証明しょうめいせよ。

  1. g∘f が単射たんしゃinjectionなら、f は単射たんしゃinjectionである。
  2. g∘f が全射ぜんしゃsurjectionなら、g は全射ぜんしゃsurjectionである。

さらに、「g∘f が単射たんしゃinjectionなら g も単射たんしゃinjection」「g∘f が全射ぜんしゃsurjectionなら f も全射ぜんしゃsurjection」は一般いっぱんには成立せいりつしないことを、有限集合ゆうげんしゅうごうの反例はんれいで示しめせ。

9Proof exercise: properties that pass from a composite map合成写像ごうせいしゃぞう to its component maps

9.1Problem

Let f:X→Y and g:Y→Z. Prove the following statements.

  1. If g∘f is an injection単射たんしゃ, then f is an injection.
  2. If g∘f is a surjection全射ぜんしゃ, then g is a surjection.

Then give finite-set counterexamples showing that the statements “if g∘f is injective, then g is injective” and “if g∘f is surjective, then f is surjective” are false in general.

9.2解答かいとう

  1. f(x1)=f(x2) とする。すると
(g∘f)(x1)=g(f(x1))=g(f(x2))=(g∘f)(x2)

である。g∘f の単射性たんしゃせいinjectivityより x1=x2 だから、f は単射たんしゃinjectionである。

  1. z∈Z を任意にんいに取とる。g∘f が全射ぜんしゃsurjectionなので、ある x∈X が存在そんざいして g(f(x))=z である。y=f(x)∈Y と置おけば g(y)=z だから、g は全射ぜんしゃsurjectionである。

残のこる 2 つの推論すいろんには、1 つの反例はんれいを共通きょうつうに使つかえる。X={1}、Y={a,b}、Z={0} とし、

f(1)=a,g(a)=g(b)=0

とする。g∘f:X→Z は 1 元集合げんしゅうごうどうしの全単射ぜんたんしゃbijectionなので、単射たんしゃinjectionかつ全射ぜんしゃsurjectionである。しかし g は g(a)=g(b) なので単射たんしゃinjectionでなく、f は b∈Y に到達とうたつしないので全射ぜんしゃsurjectionでない。

9.3解説かいせつ

合成写像ごうせいしゃぞうcomposite mapが観測かんそくするのは、g を f(X) に制限せいげんした振ふる舞まいだけである。そのため、少すくなくとも一方いっぽうが f(X) の外そとにある 2 元げんを g が衝突しょうとつさせても、g∘f の単射性たんしゃせいinjectivityには現あらわれない。また、f が Y 全体ぜんたいへ到達とうたつしなくても、その像ぞう f(X) だけで g を通とおじて Z を覆おおえば、g∘f は全射ぜんしゃsurjectionになりうる。

9.2Answer

  1. Suppose f(x1)=f(x2). Then
(g∘f)(x1)=g(f(x1))=g(f(x2))=(g∘f)(x2).

The injectivity単射性たんしゃせい of g∘f gives x1=x2, so f is injective.

  1. Take arbitrary z∈Z. Since g∘f is surjective, there exists x∈X such that g(f(x))=z. Put y=f(x)∈Y. Then g(y)=z, so g is surjective.

The two remaining claims fail in the same example. Let X={1}, Y={a,b}, and Z={0}, and define

f(1)=a,g(a)=g(b)=0.

The composite g∘f:X→Z is a bijection全単射ぜんたんしゃ between singleton sets, so it is both injective and surjective. However, g is not injective because g(a)=g(b), and f is not surjective because it does not reach b∈Y.

9.3Explanation

A composite map合成写像ごうせいしゃぞう observes only the restriction of g to f(X). Thus a collision under g involving at least one point outside f(X) does not affect the injectivity of g∘f. Likewise, f need not reach all of Y if its image f(X) still reaches all of Z through g.

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
タブを全て閉じる