How to find a surjective but not injective function from a set $M$ to itself

790 Views Asked by At

When $M := \{1,2,3\}$ and $f: M \to M$ I have to find $f(1), f(2), f(3)$ such that $f$ is surjective but not bijective.

I don't get it how this is possible as every element the domain $(M)$ should point to at least one of the codomain.

$f(1,2,3) = (3,2,1)$ would be surjective but injective right?

$f(1,2,3) = (1,1,2)$ is not injective but then not surjective. What am I missing to solve this right?

Just to get this right: When I have $f(1,2,3) = (3,1,2)$ is it right to assume that the inverse of f would be $f(1,2,3) = (2,3,1)$?

1

There are 1 best solutions below

0
On BEST ANSWER

For finite sets $M$ there holds that a function $f:M\to M$ is injective if and only if it is surjective. Hence you cannot find such a function you are looking for.