Injective and / or surjective: factorial

90 Views Asked by At

I would like to know if my reasonment are correct, so thank you in adavance for every critic or missing detail you will point out.

The question is: consider $f: \mathbb{N}\to \mathbb{N}$ definied by $f(n) = n!$, hence the factorial. I was thinking about this in some terms: function, injection, surjection.

So first of all, I would indeed say $f(n) = n!$ is a function.

Due to lack of self confidence, I searched over here for the correct definition and I found this one in an answer: "The definition of a function is: $f: A\to B$ is a function if every $x\in A$ is in relationship with at least one $y \in B$"

I didn't really get why "at least one", since for a function I would say just exacly one...

Anyway: due to this, I hence conclude $f(n) = n!$ is indeed a function.

Now, about the injectivity I say: no.

Indeed it's not true that $\forall n_1, n_2 \in\mathbb{N}$ we have $n_1! = n_2! \iff n_1 = n_2$: just take $n_1 = 0$ and $n_2 = 1$.

About the surjectivity: no again.

Indeed the codomain of $f$ is $\mathbb{N}$ which is ways larger than its image (or range).

But I thought: can I say it becomes surjective if the codomain becomes its range like?

$$C = \{ 1; 2; 6; 24; 120; \ldots \}$$

Also I was thinking: If we cut off $\{ 0 \}$ from the domain, then $f(n) = n!$ becomes injective too. But this means it's bijective, hence invertible.

So then what is the inverse of $f(n) = n! \qquad $??

1

There are 1 best solutions below

0
On

First, let's define $\mathbb{N}=\{0, 1, 2, ...\}$ to be unambiguous. Then we will denote $\mathbb{N}^+$ to be $\mathbb{N}\setminus\{0\}$.

You have a correct argument for the non-injectivity of $f$ with domain $\mathbb{N}$. $f$ is injective on $\mathbb{N}^+$, since for all $j>k\geq 1$, $j!>k!$ (why?). $f$ is not surjective on $\mathbb{N}$ or $\mathbb{N}^+$ (for example, there does not exist $n\in\mathbb{N}$ or $n\in\mathbb{N}^+$ such that $n!=3$). If you restrict the codomain to the image, then it is trivially surjective, and its inverse is directly related to its preimage. That is, define $f:\mathbb{N}^+\to C$ by $f(n)=n!$. Then $g:C\to\mathbb{N}^+$ is the two-sided inverse of $f$, with $g(m) = n$ where $n$ is the only element in $f^{-1}(m)$ (the preimage of $m$).