TITLE: Purpose of the Peano Axioms
QUESTION [20 upvotes]: Wikipedia says the Peano Axioms are a set of axioms for the natural numbers. Is the purpose of the axioms to create a base on which we can build the rest of mathematicas formally?
If this is true were they chosen because they are agreed to be basic and reasonable?
They do not deal with set theory which I thought was the basis for formal mathematics, are they an alternative to it?

REPLY [2 votes]: In his 1965 article
Benacerraf, Paul, What numbers could not be. Philos. Rev.  74  (1965) 47–73,
Benacerraf pointed out that if observer A learned that the natural numbers "are" the Zermelo ordinals   $\emptyset$, $\{\emptyset\}$, $\{\{\emptyset\}\}$, etc., while observer B learned that they are the von Neumann ordinals $\emptyset$, $\{\emptyset\}$, $\{ \emptyset, \{\emptyset\}\}$, then, strictly speaking, they are dealing with different things.  Nevertheless, observer A's actual mathematical practice is practically the same as observer B's. Hence, different ontologies may support one and the same practice. 
Benacerraf's observation helps us place the set theoretic framework in a proper perspective: it can be the basis of formal mathematics if you choose it to be. As you have observed, in the case of Peano arithmetic it doesn't have to be.
Note also that many leading mathematicians no longer consider set theory to be the foundation of formal mathematics. This is because for various reasons set theory is too inflexible. Cutting edge research today often relies on category theory, rather than set theory, as the foundation.