Proving a relation is a mapping In my abstract algebra book in the preliminary section there is a review of relations, mappings, etc. In the practice problems there are a few problems that check your understanding.
Example 1:
$$f(\frac{p}{q}) = \frac{3p}{3q}$$
This one is trivially a mapping because no matter what p, q you choose you will get a unique value from Q to Q.
Example 2:
$$f(\frac{p}{q}) = \frac{p + q}{q^2}$$
This one is not a mapping. A counter-example is $f(1/2) \neq f(2/4)$. These both map to different values so this cannot be a mapping.
But I am left kind of confused on the "proof" part. Showing a relation is not a mapping seems to be difficult because you have to search for a counter-example of a potentially hard problem. But proving something is a mapping seems extremely difficult. Is it possible to construct some kind of contradiction to prove it, or are you left sort of "guessing and checking"? I am self learning at the moment so I don't really have a professor to ask this to.
 A: Proving that a mapping $f$ is well-defined (or equivalently that $f$ is a mapping) is something that comes up a lot when studying structures defined up to equivalence. The usual way to prove such a claim is to take two representatives $a_1,a_2$ of the same equivalence class (in you example you  would take fractions $a_1=\frac{p_1}{q_1}$ and $a_2=\frac{p_2}{q_2}$ such that $a_1=a_2 \Leftrightarrow p_1q_2=p_2q_1$) and show that $f(a_1)=f(a_2)$. Sometimes this might present some difficulty but this is the standard method.
On the other hand, to prove that $f$ is not well defined requires you to find a specific counterexample which, again, can prove a bit tricky depending on the specific problem at hand.
That being said, I wouldn't stress too much about it, at least for now, since you will surely encounter many such proofs throughout your abstract algebra journey.
A: I've looked at the source work you're using: Thomas W. Judson's Abstract Algebra: Theory and Applications (which appears to be 2015).
It's a breathless avalanche of facts jumbled together with random examples and incidental asides, followed at the bottom of the slope by a morass of exercises. Comes across like a typical high-school textbook. Its fairly excusable that you have probably missed the crucial paragraph in the section "1.2 Sets and Equivalence Relations":

Consider the relation $f: \mathbb Q \to \mathbb Z$ given by $f(p/q)=p$. We know that $1/2 = 2/4$, but is $f(1/2)$ $1$ or $2$? This relation cannot be a mapping because it is not well-defined. A relation is well-defined if each element in the domain is assigned to a unique element in the range.

Appallingly muddled, particularly when later on down the page he uses exactly the same notation where $p/q$ is definitely specified that $p/q$ is "a rational number expressed in its lowest terms with a positive denominator."
I suggest that if you continue with this work you may want to bear in mind that it is less than optimal quality, and possibly back up your study with something a little more solid.
I continue to plug the useful An Introduction to Abstract Algebra by Thomas A. Whitelaw (Blackie, 1978) (if you can find it -- all exercises are with complete answers), or (tougher but rewarding) Allan Clark's Elements of Abstract Algebra (Dover, 1971) (it has no answers to exercises unfortunately, and the latter are not easy unless you are really on top of your material).
