When did mathematicians think of axiomatically building or defining operations etc?

Edited question: In response to Qiaochu Yuan's comment asking me to narrow down the question,the edited question is as follows: When did mathematicians first think of axiomatically building set theory with the level of rigour seen nowadays?(I am asking this because I learnt of the Peano's axioms and was amazed at how little needs to be assumed to build the number system)

Original question: I am interested to know when and under what circumstances mathematicians first thought of axiomatically building the number system and defining binary operations like addition and subtraction or for that matter the theory of sets ?

-
This is a big question. My impression is that the person who did the most to really push the axiomatic method in modern mathematics is Hilbert, but there are a lot of other names and directions to mention. Could you possibly make your question a little narrower? – Qiaochu Yuan May 7 '12 at 8:35
The modern notion of abstract group is apparently due to Cayley, so I think the answer lies a little bit before Hilbert. – Zhen Lin May 7 '12 at 8:44
@Zhen: yes, but the realization and popularization of the notion that the axiomatic method could be applied to all kinds of mathematical objects besides groups certainly comes later (e.g. Fréchet did not introduce the metric space axioms until 1906). – Qiaochu Yuan May 7 '12 at 9:28
The axiomatisation of arithmetic happened pre-1900 though: Dedekind (1888) and Peano (1889). Analysis earlier still... – Zhen Lin May 7 '12 at 9:51
The theory of sets is quite a different matter -from binary operations and arithmetic. It was invented, in the sense of developing its foundations and yoga, by Cantor, but there must clearly have been people (philosophers?) thinking about it before. – plm May 7 '12 at 9:58