# How do you learn to write proofs? & how to prove that if $f: A \to B$ is a surjection, then $f$ has a right inverse?

Hello fellow math enthusiasts, I am currently in a proof based class but am struggling to even understand how to write a proof. Whenever the teacher or fellow classmates write proofs none of the things they write or say make sense. This entire subject of math does not make sense to me but I am very good at computational mathematics. I am currently in the process of writing two different proofs one of them is in a previous post I made and the other one is for the proposition

Let $$f: A \to B$$ be a surjection. Then $$f$$ has a right inverse.

I do not get where to start or what to do. It seems that when the teacher does it they just write random stuff on the board and boom there is a proof, it would be much appreciated if I could get your guys' help. Thank you for your time!!!

• Start by making sure you completely understand the relevant definitions. Can you write down the definition of surjection? What about the definition of a right inverse? If you want to show that $f$ has a right inverse, what do you need to show? Can the fact that $f$ is a surjection help you get what you need? – angryavian Nov 17 '19 at 0:19
• The same as talking, by imitation. This fact should be learn not only by those who are learning how to write proofs, but also to those in this website who like to chastise questions in which the author claims to understand intuitively but doesn't know how to start the proof. The help that those need is not to be sent to think, or work harder, but to see finished proofs written by people with experience doing so. – conditionalMethod Nov 17 '19 at 0:22
• Your question is too broad, and there are countless similar questions here you could read for help: try searching. The short answer: you learn to write a proof by learning what it means to justify a claim. In the example you cited, you need to clearly understand what a “surjection” and what a “right inverse” are. If you don’t know the definitions, there’s no way you can hope to give a proof. Then you need to show why $f$ being subjective implies there must exist a right inverse for $f$. One way to do that is to explicitly construct a right inverse. – symplectomorphic Nov 17 '19 at 0:22
• Since you're in a class, the way to learn what's being taught in that class is to go see the teacher and explain the difficulty you are having and ask the teacher for help. That's what she's paid for. – Gerry Myerson Nov 17 '19 at 1:24
• That's a tricky proof, it requires the axiom of choice. Has your class covered that? – user4894 Nov 17 '19 at 1:25

I will construct a map $$g:B\rightarrow A$$ that is the right inverse of $$f.$$
Since $$f:A\rightarrow B$$ is surjective, for any $$b\in B,$$ there is a $$a\in A$$ such that $$f(a)=b.$$ Let $$g(b)=a.$$
Then, clearly, for any $$b\in B,$$ $$f\circ g(b)=b,$$ or in other words, $$g$$ is a right inverse.
• I'm not totally sure what you mean, but I know $g$ is a map from $B$ to $A$ by definition of a right inverse. The construction of $g$ itself is very natural, and maybe it may just be a matter of reviewing the definitions and really understanding them. – Kenta S Nov 17 '19 at 1:41