How do mathematicians propose new theorems? It seems that for a lot of great mathematicians, it was an usual case in their procedure of creating new theorems that they first came up with a rough idea of the theorem, after that they started thinking about how to prove it (some would reshape their theorem while searching for a proof). That is to say, they knew the theorems first, and then proved it.
It makes me wonder that in such circumstances, where these theorems came from, and to what purpose they proposed the theorems? Do they build new theorems as a step toward the proof of a more significants conjecture, or they just notice some patterns from more basic facts and special cases? Can anyone experienced explain this procedure to me, and (better) list some possible triggers for their new ideas? Thanks in advance.
 A: There are many different ways and the process of coming up with a result varies widely. It may also be very domain specific.
Some theorems come from problems. When you face some problem (computing some quantity (by hand or by computer) you think about how to solve it. You use all tools you have at hand and sometime you come up with a new method that does the trick.
You may also face some object that you can describe in mathematical terms (a graph, some algebraic structure, a function, an algorithm…) and you would like to describe and understand it as good as possible. Often, new techniques are needed to do that.
You may also work with some kind of object on a regular basis and note that the techniques you use also apply to another kind of object if you view things slightly differently.
These are just three ways I can think of about how new results come into being, but there are certainly many more.
Finally, it's not at all clear at what point you call your result "theorem". I recall that I hesitated to transfer my results into a "Theorem - Proof" form, but found that doing so actually helps a lot with formulating the result more precisely.
A: I am no way a working mathematician, but, I have in the past re-discovered some results regarding certain mathematical concepts in the past. I feel like the ones I were able to rediscover anything on were from things which I understood in a way which was a meaningful to me.
Let me expand on the last statement: What I mean is that the new ideas I found, I felt on a personal levels that the basic ideas that synthesized the new ideas were quite profound and constantly attempted to understand more and more conceptually.
It also helps if you have an actual big problem that you want to solve, and that problem can be framed in the mathematics you know. For instance, it was a big question for me at some point on how one could write down rotation matrices to rotate vectors in 3D space relative to another one, and that accidently led me to discovering a field (which already existed) called lie algebras.
I feel like that is the secret, being able to think somethings are important and then being able to meditate on those important things for long.
A: I discovered one by accident one day while exploring the relationships between the various line segments in the context of a circle inscribed within a right-angled triangle.
(It's not a particularly profound theorem, but it appears to be something that nobody else had discovered.)
This is the process that goes:

"I wonder what properties this mathematical construct has? Let's try things out. Ooh! That's neat!"

On the other hand, it is often the case where a mathematician will notice a pattern in some structure, and infer that it looks as though there is a basic rule which causes that pattern to come about.
For example, to pick another arbitrary construct that I doodled with at one time: looking at the Stern-Brocot construction of rational numbers, one may wonder whether all rationals appear exactly once in the list. And, after a certain amount of thinking about it, you can show yes, it is the case, and my theorem proves it.
Except that in this case I was not the first to come up with it.
This is the process that goes:

"That's an interesting pattern. I wonder if it always works like that?"

If you can't prove your hypothesis but it still looks like it should hold, then rather than prove a theorem, you may end up getting your name attached to a conjecture instead, especially if you manage to interest other people in the same problem.
A: Most theorems come from someone trying to find a solution to a certain problem, and they find something interesting, like a relationship between 2 variables e.g. Pythagorean Theorem, or some constant e.g. the speed of light. They then try in a more general context, then if their idea holds, and they can prove it is true, then it becomes a theorem. If the idea holds, but they can't find a proof, then it is a conjecture, like the Collatz Conjecture.
A: In a brutal simplification we might say that there are two kinds of mathematicians: those who create new theories and those who solve problems or conjectures. The first group undertakes the formalization of some notion, which usually existed in an implicit and rather obscure way. That gives rise to a sequence of definitions, which in turn suggest new properties that look natural but require a proof. Eventually, the development of the theory hits some wall: a property or relationship that looks true but isn't a direct consequence of the definitions. The second kind of challenges usually comes from well-established but unsolved problems and the will to solve them. A variant of this happens when someone wants to extend the validity of a theorem by removing a hypothesis or weakening it (making the result stronger). Yet another variant happens when someone tries to find a counterexample that would show that some hypothesis is essential. In sum, exploring new territories, solving interesting problems, generalizing results and finding counterexamples are the main sources of inspiration for new mathematics. Note also that finding a substantially simpler proof of a well-known result is also a valuable contribution in itself that may bring new insights on a particular domain.
It is important to note that a line of thought originally intended to clarify something or produce a desired outcome is often deflected to an unanticipated idea that flourishes in a new result. In other words, mathematicians sometimes find a new theorem as a side effect or deviation of their planned route. Even though theorems are always the conclusion of serious thinking, they may arise in departure from the initial objective.
