In my intermediate microeconomics class last year, I was rather surprised by the math involved in building consumer theory. In consumer theory you do things like define a binary relation $\succsim_a$ over a set of outcomes $X$ where $x\succsim_ay$ represents the relation "consumer a weakly prefers good $x$ to good $y$", and then reasoned about that relation by looking at its properties—for instance, we looked at the proof that if $\succsim_a$ is continuous then there is a continuous function $u_a:X\rightarrow \mathbb{R}$ exists, or that if $\succsim_a$ is convex then there is always a most preferred outcome in $X$ under a budget constraint.
This was my first exposure to this kind of mathematics, and I don't even know where it comes from. It seems obviously, to me at least, derived from some area of mathematics, but I don't know what that area is. If I wanted to take a course in maths similar to this, what might I look for in the course title?
P.S. I'm not sure how to tag this.