Trying to understand a proof about onto/1-1 mappings (from Herstein's Topics in Algebra) I am working on some problems in a book I have and I want to make sure that I have an accurate possible proof. That is, I want to make sure I actually understand/ can justify the reasoning. (some of it were from hints so that is what I want to be sure I can justify,  even if the problem may be very elementary).
The question is, 


*

*If the set $S$ has a finite number of elements then prove that if $\sigma$ maps from $S$ onto $S$, then $\sigma$ is one-to-one, and if $\sigma$ is one-to-one map from $S$ into $S$ , then show that $\sigma$ is onto.


$\mathbf{Proof (in \space progress)}:$
Let $|S|=n$ and let $\sigma: S \to S$ be any mapping from $S$ into $S$.
Now, because $\sigma$ is a mapping, every element in S must be mapped somewhere ( is this correct reasoning?), thus we have
$$\sigma^{-1}(S)=S$$
So, we can write $$S= \bigcup_{s \in S}\sigma^{-1}(s)$$
which is also true since $\sigma$ is a mapping and since every s is mapped to somewhere the union of all s that are mapped is all of s( is this correct reasoning)?,
This I understand so far if my reasoning has held, 
The next part I am a bit confused on, it is to make use that each subset is disjoint and then use that to imply that $$|S|=\sum_{s \in S} |\sigma^{-1}(s)|$$
Now Im not exactly sure what is happening here. I mean intuitively it seems to makes sense that since each $s \in S$ can only be mapped to one other $s \in S$, then it would hold, but I still feel a bit fuzzy on it.
Moving on,  if $\sigma$ is onto then we have $|\sigma^{-1}(s)| \ge 1$ because each s must have at least one s if not more that maps to it.
and from above, this gives, $$n=|S|=\sum_{s \in S} |\sigma^{-1}(s)| \ge \sum_{s \in S} 1=n$$ (because cardinality of S is n).
And to assure the equality holds i.e. that n=n it forces that $| \sigma^{-1}(s)|=1$ for every $s \in S$ which therefor shows $\sigma$ is one-to-one
and the converse is similar, that is, if $\sigma$ is one-to-one then 
$|\sigma^{-1}(s)| \le 1$ for every $s \in S$ because of course if it was more than 1 , it would imply that more then one element in $S$ maps to the same element in $S$ which is directly against the definition of one-to-one.
Which again will force us to have $| \sigma^{-1}(s)|=1$ for all $s \in S$, therefor showing that $\sigma$ is also onto.
So yea, basically, I am wondering about the validity of it all, any insight/comments on the topic, and I also added some parts in where I asked if my train of thought was valid. I hope this can all help me to understand and work on my proofs better.
Thanks everyone for the time!
Update:
Some of the comments have left me very curious about what methods I should be attempting. So ideally, if someone could give a solution to this using only what was already taught in Hersteins book, then that would be great. Because from some of the comments it seems that this technique may be too advanced.
 A: I think that Herstein had a naive handling of this problem in mind. A set is finite if it can be  mapped bijectively onto some set $[n]:=\{1,2,\ldots,n\}$ with $n\in{\mathbb N}_{\geq0}$. We therefore have to prove that a surjective $f:\>[n]\to[n]$ is automatically injective, and vice versa.
I shall prove the first of these two statements, using induction. The other is similar, and is left to you. When $n=1$ the statement is obviously true. Therefore assume that $n\geq1$, and that any surjective $f:\>[n]\to[n]$ is automatically injective. 
Let a surjective $g:\>[n+1]\to[n+1]$ be given, and put
$X:=\bigl\{x\in[n]\bigm|g(x)=n+1\bigr\}$. 
If $g(n+1)=n+1$ consider the map
$$f:\quad[n]\to[n],\qquad x\mapsto\left\{\eqalign{1\quad&\quad(x\in X)\cr g(x)&\quad(x\notin X)\cr}\right.\quad.$$
Then $f$ is surjective, whence injective. In particular $X=\emptyset$, and it follows that $g$ is injective as well.
If $g(n+1)=j\in[n]$ the set $X$ is nonempty. Consider the map
$$f:\quad[n]\to[n],\qquad x\mapsto\left\{\eqalign{j\quad&\quad(x\in X)\cr g(x)&\quad(x\notin X)\cr}\right.\quad.$$
Then $f$ is surjective, whence injective. In particular $|X|=1$, and it follows that $g$ is injective as well.
A: You are using cardinal arithmetic in a proof of a theorem which is fundamental to proving that cardinal arithmetic has the well-known properties which we are familiar with. So this is a bit backwards. You can't use high-level conclusions to prove low-level theorems which will then be used to prove higher-level conclusions later. That's a bit circular.
A good book on naive set theory will go through the steps in a "proof-before-use" order so that you don't use theorems in a circular manner.
In this case, you should start with the definition of a finite set. There are several definitions, and the theorem you are trying to prove is roughly equivalent to one of those definitions. So you have to make sure you know what your definitions are first. One of the most popular definitions of finiteness is that a set is equinumerous to one of the finite ordinal numbers, which are defined in a quite complicated way in ZF set theory, if you prove all of the details. Alternatively there are some other definitions of finiteness which don't use the ordinal numbers on the wikipedia finite set web page.
If you start with the equinumerous-to-a-finite-ordinal-number definition for finiteness, then you have a bijection from your set to some finite ordinal number. Then you can do some manipulations on your surjection to show that it is a bijection from $S$ to $S$ using already proved properties of the finite ordinal numbers.
In conclusion, if you don't have a solid definition of a finite set, you can't make your argument logically rigorous. So your first step is to choose that definition. Then you can start using the theorems which go along with that definition, which depend on which book you are using as a source.
