How are (pure) mathematicians paid to do research? Let's say my interests lie in the foundations of mathematics and I want to do research in that area. How am I going to get paid for that in the traditional context of academia?
In the US, 99% of long-term positions that involve being paid to do research in pure math are tenure track faculty positions, colloquially known as professorships (in the US, they follow the progression Assistant Professor -> Associate Professor -> Professor). A professor is paid to teach, do research, and to a lesser extent, to do a variety of other vaguely related things that are discussed in many places on this website and elsewhere.
Professors teach and do research. It is not true that (quoting from one of the comments) “mathematicians are not paid to do research, but instead do research on the side and teach to make a living”. It is also not true that (quoting from another comment) “at some universities, research is the main job and teaching is a necessary byproduct”. Perhaps some professors have the mindset that their job is “mainly” about one or the other thing, but that’s simply a matter of personal perception rather than an objective truth. The objective truth is that professors teach and do research, and are paid to do those two things. Nothing is “on the side” or is “the main job”.
It is also not the case that (as seems to be implied by another answer) all math professors have, or need, grant funding to do their work. Grant funding is good to have, and getting it is both a catalyst for and a side-effect of career success. It can also give your salary a modest boost. But most of the funding doesn’t go directly into your pocket, and there are plenty of math professors who have steady employment and do quite well in their research without having it.
Finally, there is a very small number of mathematicians who have permanent, full time positions doing only research. Examples of places where such positions exist are the Institute of Advanced Study, and Microsoft Research. Those positions are very prestigious and rare, so hoping to land one of them is not a viable career plan.
The current top answer is simplistic and US-centric.
First, it glosses over the obvious. Tons of PhD students and postdocs are paid to do research and nothing else. It is difficult (and not really desirable, or usually possible) to be a postdoc forever, but this is certainly doable for many years, even more than a decade if you count PhD+postdoc.
Second, and this is the part which is US-centric in the current top answer, many researchers are employed as full-time tenured researchers. In France for example, more than 10% of all tenured mathematicians affiliated to the CNRS – i.e. almost all French mathematicians in public institutions – are full-time researchers (see this document by the Insmi, 400 researchers out of 3600 full-time researchers). Similar positions exist in many European countries (I know it's the case at least in Belgium, Switzerland, Spain... with various titles). Yes, these positions are enviable and difficult to get, but they are not some unattainable holy grails that only exist at IAS, IHES or the likes.
Third, many private companies employ math researchers. Not many employ researchers on the foundations of mathematics of course, and you would need to do research on what the company wants, but you'd still be a full-time math researchers. These positions exist anywhere, in small startups, global corporations, and anything in between. These aren't positions that exist only in "elite" institutions. Things like data analysis, machine learning, etc are hot right now, and you need serious math for them.
Finally, let me address a misconception in your comment.
So, usually mathematicians are not paid to do research, but instead do research on the side and teach to make a living?
I believe you are confused by the word "professor". While etymologically it means "teacher", nowadays, a professor at a university has a double job: teacher and researcher (and a third job called "administration"). The same goes for a lecturer, a reader, a maître de conférences, a førsteamanuensis, or whatever your job title is. Many academics are relatively blasé and consider that teaching is actually a chore that is imposed on top of the main job, research – a discussion for another time.
This funding comes from two main sources:
- Employment, e.g. by getting a professorship somewhere. This means a steady salary. Note professorships aren't just teaching duties - professors are also expected to output research, mentor PhD students who output research, and so on (see this recent question for what happens to "unproductive" professors).
- Grant funding. You write proposals to whoever is funding mathematics research (e.g. the NSA if you're in the US). You tell them what you intend to do, how you intend to do it, how much money you'll need, etc. If they approve of your proposal then they send you money to do the research.
Lot of great answers, already. Some different thoughts (not as good, but hopefully additive):
You could do it as an avocation. Go and earn a bunch of money elsewhere and then do it on the side. Like Fermat.
(US answer) Look at government service, especially the NSA, but also national labs or FFRDCs (quasi government as they have contractors running them). It's not a "great answer" as you don't have total freedom and really they like applied guys more. All that said, there are pure guys going in there and you might find a niche (all you need is enough pay for one). And the pay/benefits/hours/security are great. At least take a look.
I will argue that research is the primary job that most salaried professors get paid to do. From Wikipedia: Professor:
Professors often conduct original research and commonly teach undergraduate, professional and postgraduate courses in their fields of expertise.
Note that "research" is listed first. From an excellent page by Mark Tomforde, University of Houston, "Job Responsibilities of Professors":
In the UH math department, the responsibilities of a typical tenured or tenure-track faculty member are usually allocated as 40% Research, 40% Teaching, and 20% Service.
Note that research is again listed first. (The approximate allocation matches what I've heard expressed many times, in many places.) Steven Krantz in How to Teach Mathematics (Ch. 6) quotes the Chair of the University of Chicago Mathematics Department, welcoming a new faculty member in the 1960s:
Remember: Our job is proving theorems.
At my institution, faculty promotion is officially based on the standard triad (research, teaching, and service); but I've been told by those involved that in practice, it really just boils down to number of research publications (justified by the fact that research publications are easier to identify and count than quality teaching or service).
One might argue philosophically that the "emphasis" of faculty work derives from the funding source. Traditionally most funding in the U.S. came from state governments (arguing in favor of a research focus); over time state support has shrunk, and student tuition increased, such that today it approaches a 50/50 ratio (arguing in favor of parity emphasis with teaching). See Figure 8 here.