My question could appear naive but I am reading up representation theory by myself. I am at a loss to understand the way how the action of the matrix happens for $S_3$. For example how does each of these representation work on the vectors $(e_1 -e_2)$ and $(e_2 -e_3)$ is unclear.
The text says that $$(1, 2) (e_1-e_2) = -(e_1 - e_2)$$ and $$(1, 2) (e_2 - e_3) = (e_1 - e_3).$$ How does one derive from the matrix action on the vector $(e_1, -e_2)$ and $(e_2, -e_3)$.

Since$$(1\ \ 2)e_1=e_2,\ (1\ \ 2)e_2=e_1\text{, and }(1\ \ 2)e_3=e_3,$$it is clear that$$(1\ \ 2)(e_1-e_2)=e_2-e_1=-(e_1-e_2)\text{ and that }(1\ \ 2)(e_2-e_3)=e_1-e_3.$$So, if we define $w_1$ and $w_2$ as $e_1-e_2$ and as $e_2-e_3$ respectively, we get that $(1\ \ 2)w_1=-w_1$ and that$$(1\ \ 2)w_2=e_1-e_3=e_1-e_2+e_2-e_3=w_1+w_2.$$Therefore, the matrix of the action of $(1\ \ 2)$ on $\bigl\{(x,y,z)\in\mathbb{R}^3\,|\,x+y+z=0\bigr\}$ with respect to the basis $\{w_1,w_2\}$ is indeed$$\begin{pmatrix}-1&1\\0&1\end{pmatrix}.$$