If you find any mistakes, please make a comment! Thank you.

## Determine whether given relations are well-defined

Determine whether the following functions are well defined.

$f : \mathbb{Q} \rightarrow \mathbb{Z}$ given by $f(a/b) = a$.

This relation is not well defined since, in particular, $1/2 = 2/4$ but $$f(1/2) = 1 \neq 2 = f(2/4).$$

$f : \mathbb{Q} \rightarrow \mathbb{Q}$ given by $f(a/b) = a^2/b^2$.

This relation is well defined. Note that $$\frac ab = \frac cd \Longrightarrow \frac{a^2}{b^2} = \frac{c^2}{d^2},$$ and hence $f(a/b) = f(c/d)$.