How do I determine if this relation is an equivalence relation? I'm trying to do the following problem in my book, but I don't understand how the book got their answer.
The problem: 
Determine whether the following relations are equivalence relations:$\newcommand{\relR}{\mathrel{R}}$
The relation $\relR$ on $\mathbb{R}$ given by $x\relR y$ if and only if $|x-y|\leq1$.  
The answer only says it isn't transitive and gives this example: 
$(1\relR2)\wedge(2\relR3)$, but $1\not\relR 3$. Where did they get those numbers from?
As for the problem being reflexive and symmetric, please correct me if I'm wrong but here is what I assume it to be:
Reflexive: For any $x$ such that $x\relR x\Rightarrow x\leq1$
Symm: For any $x$, $y$ such that $x\relR y\Rightarrow|x-y|\leq1\text{ and }1\geq|x-y|$
 A: *

*Reflexivity means $xRx$ which is $|x-x|=0\le 1$ verified.

*Symmetric means $xRy\implies yRx$ which is $|x-y|\le 1\implies |y-x|\le 1$ verified too.


Now transitivity is not verified.


*

*transitivity means $xRy\text{ AND } yRz\implies xRz$
So can you find $x,y$ at distance $1$ apart, $y,z$ at distance $1$ apart, but $x,z$ are further apart ?
A simple example is $x=1,y=2,z=3$ since $|x-y|=|1-2|=1\le 1$ and $|y-z|=|3-2|=1\le 1$ but $|x-z|=|1-3|=2>1\quad$ so $\require{cancel}x\cancel{R}z$
Of course you could choose any other numbers, for instance $7,8,9$ or $-0.5,0,0.6$, the book selected $1,2,3$ because these are "easy" numbers to plug in.
A: Let $xRy$ if and only if $|x-y|\le 1$.
Reflexivity: Notice $|x-x|=0\le 1$. Thus $xRx$.
Symmetry: Let $xRy$. Then $|x-y|=|y-x|=1$, which implies $yRx$.
The numbers for the proof that $R$ is not transitive are cooked up (there are many such examples), but you can see why there is a problem:
$|1-2|=1\le 1$, which proves that $1R2$. Similarly, $|2-3|\le 1$, so $2R3$. But then we can compute $|1-3|=2\not\le 1$, so $1\not R 3$.
This is contradicts the requirement of transitivity, which would imply (in particular) that
$$1R2\;\wedge\; 2R3\quad\Rightarrow\quad 1R3.$$
A: 
Reflexive: For any x such that xRx ---> x <= 1

No, reflexivity requires that $\def\R{\operatorname R}\forall x{\in}\Bbb R~(x\R x)$, which is clearly true (given the definitions for absolute value, substraction, and the $\leqslant$ comparator).$$\forall x{\in}\Bbb R~(\lvert x-x\rvert\leqslant 1)$$

Symm: For any x,y such that xRy ---> |x-y| <= 1 and 1>= |x-y|

No, symmetry requires that $\forall x{\in}\Bbb R\,\forall y{\in}\Bbb R~(x\R y\to y\R x)$, which is clearly true. $$\forall x{\in}\Bbb R\,\forall y{\in}\Bbb R~(\lvert x-y\rvert\leqslant 1\to\lvert y-x\rvert\leqslant 1)$$

Transivity requires that $\forall x{\in}\Bbb R\,\forall y{\in}\Bbb R\,\forall z{\in}\Bbb R\;((x\R y\land y\R z)\to x\R z)$.   The truth value for this universal statement not so obvious, so we shall look into the possibility of counterexamples.    We just need to demonstrate one counterexample to disprove a universal quantified statement.
Our relation, $\R$ is not transitive if $\exists x{\in}\Bbb R\,\exists y{\in}\Bbb R\,\exists z{\in}\Bbb R\;(x\R y\land y\R z\land x\require{cancel}\cancel{\R}z)$ .   That is to say, should there exist some $x,y,z$ where $y$ is at most a distance of one from each of $x$ and $z$, but $x$ is more than one from $z$.
$$\exists x{\in}\Bbb R\,\exists y{\in}\Bbb R\,\exists z{\in}\Bbb R\;\big(\lvert x-y\rvert \leqslant 1\,\land\, \lvert y-z\rvert\leqslant 1\,\land\,\lvert x-z\rvert \gt 1\big)$$
So what real numbers could possible make that so?  
Well, $1,2,3$ easily fit that bill. $$\lvert \mathbf 1-\mathbf 2\rvert \leqslant 1\,\land\, \lvert \mathbf 2-\mathbf 3\rvert\leqslant 1\,\land\,\lvert \mathbf 1-\mathbf 3\rvert \gt 1$$
A: An equivalence relation $\sim$ satisfies three axioms.


*

*Reflexivity. $x \sim x$ for all $x$.

*Symmetry. If $x \sim y$ then $y \sim x$ for all $x, y$.

*Transitivity. If $x \sim y$ and $y \sim z$ then $x \sim z$ for all $x, y, z$.


If all three hold, then $\sim$ is an equivalence relation. If any one of them fails to hold, then $\sim$ is not an equivalence relation. Any equivalence relation induces a partition of a set, and any partition of a set induces an equivalence relation.
To prove that your relation breaks Axiom 3, recall that for any $x, y, z $ $|x - y| \leq |x - z| + |z - y|$. This property is called the triangle inequality.
