How do people come up with math theorems?

People come up with math theorems by studying existing theorems, making observations, and formulating conjectures. They then use deductive reasoning to prove or disprove the conjectures. This process involves analyzing the properties of mathematical objects, such as numbers, shapes, and equations, and using logical arguments to draw conclusions. People also use trial and error to come up with new theorems. This involves testing different hypotheses and seeing which ones work.