I apologize if this question seems too vague for this site. I have a general question regarding how we determine "correct" answers in math.
I am currently a college student studying physics/engineering. When given a math problem, my approach is to conceptualize the problem to figure out what ideas might apply. Then, once I start to see a path to the solution, I try to take logical steps to reach that solution. Up to this point, everything I am doing seems logical to me. After doing all this, how do I know if my answer is right? I check with my professor's answer. If the answers match, great (if the professor used a different approach, I will typically take the time to understand it). If not, I go back to my work and I am usually able to find the flaw in my logic.
I was wondering what the process of solving a problem for a professional mathematician is. I imagine that a mathematician goes through a similar series of logical steps (at least after he/she has conceptualized the problem). Once they get their solution, though, how do they know if it is right? Just because the solution seems logical, it does not necessarily mean it is right (like I said, my solutions seem logical until I see the "right" answer). Math is not like physics where you can run an experiment to test your answer. So how do mathematicians know if their solutions are right?
Despite what many a philosopher, theologian, and mathematician will argue, truth is fundamentally one of two things:
1) An opinion or agreed upon belief
In this case, an answer is correct when it is agreed upon by the consensus (if not majority) of people considering it. Alternatively the person or people in question may agree upon certain rules (formally called axioms in mathematics, also definitions) which are considered to be incontrovertible truths.
In the latter case, you can determine whether a statement is true (i.e. - whether or not your answer is correct) by verifying that it either naturally follows from or is confirmed by these axioms. A statement is false (i.e. your answer is wrong) if it contradicts itself or these axioms. This is the means by which mathematicians verify proofs.
2) The agreement of a statement with a physical referrent
In this case an answer is correct when it accurately describes something which can be observed. Such observations may take the form of personal experiences ("objects raised above the ground fall back towards it") or experimental evidence ("objects with mass accelerate towards each other according to a force proportional to their masses.). This is the means by which scientists verify hypotheses.
Generally, an "experimental" approach to mathematics is acceptable at least in the case of numerical problems (e.g. $x^2=2$), where the answers can be computed exactly via arithmetic. In a more abstract setting (e.g. Given ... prove that $S$ is a subgroup of $W$), mathematicians rely more heavily on axioms.