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 gfさき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 gf 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)=af(2)=bf(3)=b定義ていぎする。f単射たんしゃinjectionか、全射ぜんしゃsurjectionか。

4.1解答かいとう

f(2)=f(3)=b23 なので、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 23, 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)=bg(2)=cg(3)=a定義ていぎする。g逆写像ぎゃくしゃぞうinverse mapもとめよ。

5.1解答かいとう

gかく入力にゅうりょくinputことなる出力しゅつりょくoutputおくり、終域しゅういきcodomainすべてに到達とうたつしている。したがって全単射ぜんたんしゃbijectionである。逆写像ぎゃくしゃぞうinverse mapg-1(a)=3g-1(b)=1g-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:ZZf(n)=n+1 とする。f単射たんしゃinjectionか、全射ぜんしゃsurjectionか。

6.1解答かいとう

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

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

6.2解説かいせつ

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

6.3よくあるあやま

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

6Problem 3

Let f:ZZ 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 mZ, put n=m-1Z. 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:NNf(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である。

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

7.2解説かいせつ

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

7.3よくあるあやま

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

7Problem 4

Let f:NN 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 nN 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)=af(2)=bさだめ、g:{a,b}{0,1}g(a)=1g(b)=0さだめる。(gf)(1)(gf)(2)もとめ、合成ごうせいcomposition適用順てきようじゅん説明せつめいせよ。

8.1解答かいとう

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

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

8.2解説かいせつ

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

8.3よくあるあやま

gfさき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 (gf)(1) and (gf)(2), and explain the order of application in the composition合成ごうせい.

8.1Answer

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

and

(gf)(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 gf as “apply g first and then f.”

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

9.1問題もんだい

f:XYg:YZ とする。つぎ証明しょうめいせよ。

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

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

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

9.1Problem

Let f:XY and g:YZ. Prove the following statements.

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

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

9.2解答かいとう

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

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

  1. zZ任意にんいる。gf全射ぜんしゃsurjectionなので、ある xX存在そんざいして 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

とする。gf:XZ は 1 元集合げんしゅうごうどうしの全単射ぜんたんしゃbijectionなので、単射たんしゃinjectionかつ全射ぜんしゃsurjectionである。しかし gg(a)=g(b) なので単射たんしゃinjectionでなく、fbY到達とうたつしないので全射ぜんしゃsurjectionでない。

9.3解説かいせつ

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

9.2Answer

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

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

  1. Take arbitrary zZ. Since gf is surjective, there exists xX 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 gf:XZ 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 bY.

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