Equivalence relation and partitions. 
Are these equivalence relations? If yes, give a corresponding partition. If no show a counterexample.

*

*On the set $Q\setminus \{0\}:a\sim b\iff a\cdot b>0$


*On the set $Z:a\approx b\iff b-1\leq a\leq b+1$


*

*Reflexivity:

let $a\in\mathbb{Q}\setminus\{0\}$.
then $a\cdot a>0$, since $a\not=0$ it holds.
Symmetry:
let $a,b\in\mathbb{Q}\setminus\{0\}$.
if $a\cdot b>0$, then $b\cdot a>0$.
since $\cdot$ is commutative, this holds.
Transitivity:
suppose $(a\sim b)\wedge(b\sim c)\wedge(a\not\sim c)$.
case 1: let $a<0$.
then $b<0$ and $c<0$, otherwise the inequalities don't hold.
but then $a\sim c$ holds.
case 2: let $a>0$.
then $b>0$ and $c>0$, otherwise the inequalities don't hold.
but then $a\sim c$ holds.
therefore the assumption is wrong and $\sim$ is transitive.
Therefore $\sim$ is an qquivalence relation on $\mathbb{Q}\setminus\{0\}$.
Let the partition $P=\{\{\mathbb{Q}\setminus\{0\}\} \}$


*Transitivity:

let $a=0$, $b=1$ und $c=2$.
$a\approx b$ and $b\approx c$, and $a\not\approx c$.
Therefore it's not an equivalence relation.
How to make a partition in this context? Partition is known to me, I just don't know if mine is that what they are asking for.
 A: There is a shortcut for 1. 
Whenever a relation $R$ on some set $X$ can be characterized by: $$xRy\iff f(x)=f(y)$$ where $f$ denotes some function that has $X$ as its domain then this relation is an equivalence relation. 
Observe that e.g. the obviously true statement: $$\forall x\in X [f(x)=f(x)]$$  allready guarantees reflexivity of $R$. 
Also for symmetry and transitivity there are statements like that.
The equivalence class represented by $x\in X$ takes the form: $$[x]:=\{y\in X\mid f(y)=f(x)\}$$
Then the partition induced by $R$ can be written as:$$\mathcal P=\{[x]\mid x\in X\}$$
If $S:=\{f(x)\mid x\in X\}$ then the partition can also be written as: $$\mathcal P=\{f^{-1}(\{r\})\mid r\in S\}$$
where $f^{-1}(\{r\}):=\{x\in X\mid f(x)=r\}$. Sets like  $f^{-1}(\{r\})$ are the fibres of the function and the non-empty fibers of a function always form a partition of the domain of the function.

Now note that $a\sim b\iff f(a)=f(b)$ where $f$ is the function prescribed by $a\mapsto \frac{a}{|a|}$, i.e. it sends $a$ to its sign. 
Also note that here $S=\{-1,1\}$. 
So the partition turns out to be $\{P,N\}$ where $P$ denotes the subset of positive and $N$ denotes the subset of negative elements of $\mathbb Q\setminus\{0\}$.

In the context of proving that a relation is an equivalence it is very useful to start with looking for such function. Actually if the relation is an equivalence then automatically such a function exists (but can be well covered): the function $x\mapsto[x]$.
