markdown
Maps, injections, and surjections: basic exercisesmd 7725bc9
exercise/math/discrete-math/maps-injections-and-surjections.exercise.n.md

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

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

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.

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.

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}.

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.

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.

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.

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.”

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