TITLE: Bijective functions
QUESTION [7 upvotes]: If $A$ has $n$ elements, how many functions are there from $A$ to $A$? How
  many bijective functions are there from $A$ to $A$.

So for the first part of the question since A isn't bijective, doesn't that mean there are $n^n$ possibilities? So for the second part of the question, since it is bijective means for injectivity it must be one-to-one. therefore wouldn't there be $n!$ functions.
Can anyone confirm?

REPLY [5 votes]: Well, for the first part, you do not known "$A$ is not bijective" (what you meant to say was that the function from $A$ to $A$ was not bijective, but this is still not right)--that is simply one of the function possibilities. You computed $n^n$ because there are $n$ choices for the first element to map to, $n$ choices for the second element to map to, etc., leaving you with $n^n$ choices in all. 
For the other part, bijectivity, you have $n$ choices for the first element to map to, $n-1$ choices for the second element to map to, etc., leaving you with $n!$ choices in all.
I believe that is what your reasoning was, except for the first part (which only needed a very modest amount of tweaking).