# Bijection and it's inverse

Given $f: X \to Y$ such that $f$ is a bijection prove the existence of a $g:Y\to X$ such that:

$f \circ g = 1_Y$

and

$g \circ f = 1_X$

Now since $f$ is bijective $\forall y \in Y: \exists!x \in X$ s.t $f(x)= y$

If I define $g(f(x)) = x = 1_X(x) \ \forall f(x) \in Y$

Then for $x \in X$ I notice that:

$g \circ f (x) = g(f(x)) = 1_X(x)$

I am have some trouble proving the remaining part. How would I continue from here?

-

To define $g : Y \rightarrow X$: For each $y \in Y$, since $f$ is surjective and injective, there exists a unique $x_y$ such that $f(x_y) = y$. Let $g(y) = x_y$.

Observe that $x_{f(x)} = x$.

For all $x \in X$, $g(f(x)) = x_{f(x)} = x$. Hence $g \circ f = \text{id}_X$

For all $y \in Y$, $f(g(y)) = f(x_y) = y$. Hence $f \circ g = \text{id}_Y$

-
I thought as much. –  Mathman May 6 at 9:33

notice that $g(y)$ is exactly defined as the value (unique, by injectivity of $f$) such that $f(g(y))=y$.

-
I get g(y) has a unique value, but how exactly is one able to say $f(g(y))=y$ –  Mathman May 6 at 9:29
fix $y$. Then you get $x$ such that $y=f(x)$. Then $y=f(x)=f(g(f(x)))=fg(y)$. –  Franco May 6 at 10:38