Identity function

2.1k Views Asked by At

I was told that identity functions have the definition when followed.

If f ∘ e = f, e = idx. If e ∘ f = f, e = idy.

The textbook had a question below the definition asking, for any functions f and g, does either of g ∘ f = idx, f ∘ g = idy implies the other.

My answer was,

f ∘ g = idy

f ∘ g ∘ f = idy ∘ f = f

f ∘ (g ∘ f) = f

(g ∘ f) = idx (from the definition of f ∘ e = f, e = idx)

and similarly

g ∘ f = idx

f ∘ g ∘ f = f ∘ idx = f

(f ∘ g) ∘ f = f

(f ∘ g) = idy (from the definition of e ∘ f = f, e = idy)

But the answer was, no they do not imply the other and it didn't give me the proof, but showed a counter example.

counter example

Okay, I understand the counter example, but where in my proof has gone wrong? I didn't assume anything, just followed definition in the proof.

Edit: The text book says, (translated)

Let's figure out whether identity and inverse elements exist for composites. The identity element is a function e that satisfies, f ∘ e = e ∘ f = f for all f: X->Y. However, the function that satisfies f ∘ e = f is e: X->X, and the function that satisfies e ∘ f = f is e: Y->Y and hence they are different. Therefore, identity element of composites does not exist nor the inverse element. Despite this, we define the function e that satisfies f ∘ e = f as the identity function of X and write as id_X, and the function e that satisfies e ∘ f = f as the identity function of Y and write as id_Y. For each set, there exists one identity function.

Edit2: updated some lines for readability

2

There are 2 best solutions below

7
On

The problem is that you have no justification for jumping from$$f\circ(g\circ f)=f\implies g\circ f=\operatorname{id}_X,\tag1$$to $g\circ f=\operatorname{id}_X$. In fact, if $f$ was injective then, yes, you could deduce that $(1)$ hods, but all that you can deduce from $f\circ g=\operatorname{id}_Y$ is that $f$ is surjective, not that it is injective.

2
On

Okay.

You have two sets, $X$ and $Y$ and a class of functions that map $X \to Y$. They want to know if there is a function $id$ so that $id\circ f = f\circ id = f$ for any $f: X\to Y$.

I'm actually not sure why they even bothered to ask as the $id\circ f = f$ would require that $id: Y\to Y$ and $f\circ id = f$ would require $id:X\to X$ which is impossible as $X$ and $Y$ are different sets.

However then it asks if there are $id_X: X\to X$ that can act as a right identity with $f\circ id_X = f$ for all $f:X\to Y$. The answer is, yes, the identity element $i:X\to X$ where $i(x) = x$ for all $x \in X$ is such an element and with a little bit of playing it's clear that that is the is the only such function from $X \to X$.

(If $h(x) = w \ne x$ then there is some function $f$ where $f(w) \ne f(x)$ and so $f(h(x)) = f(w) \ne f(x) $. So the only function that works is $i(x) = x$.)

Likewise $i:Y\to Y$ $i(y) = y$ can act as $id_Y: Y\to Y$ that can act as a left identity with $id_Y\circ f = f$ for all $f: X\to Y$.

So they are asking if you have a $g:Y\to X$ so that $g\circ f: X\to X = id_X$ or $f\circ g: Y\to Y= id_Y$ does one imply the other.

And the answer is no.

The thing is if $|X| > |Y|$ then $f: X \to Y$ can not be injective so there must be $w\in X,x \in X$ and $w\ne x$ so that $f(x)=f(w)$. $g\circ f:X\to X$ can't be $id_x$. $id_X(w) = w$ and $id_X(x) = x$ but $g\circ f(w) = g(f(w)) = g(f(x)) = g\circ f(x)$.