The following is from Representation Theory of Finite Groups, by B. Steinberg; Example 3.1.14, p.16:
Let $\rho:S_3\to GL_2(\mathbb{C})$ be specified on the generators $(1 \ 2)$ and $(1 \ 2\ 3)$ by
$$\rho_{(1 \ 2)}=\begin{bmatrix}-1 & -1 \\ 0 & 1\end{bmatrix}, \ \rho_{(1 \ 2 \ 3)}=\begin{bmatrix}-1 & -1 \\ 1 & 0\end{bmatrix} $$
I'm trying to verify that $\rho:S_3\to GL_2(\mathbb{C})$ is a representation. By definition a representation is homomorphism, thus I want to show that $\rho_{gh}=\rho_g\rho_h$ for every $g,h\in S_3$. Starting with $$\rho_{(1 \ 2)}\rho_{(1 \ 2 \ 3)}=\begin{bmatrix}-1 & -1 \\ 0 & 1\end{bmatrix}\begin{bmatrix}-1 & -1 \\ 1 & 0\end{bmatrix}=\begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix}$$ we need to verify that $\rho_{(1 \ 2)(1 \ 2 \ 3)}=\rho_{(2 \ 3)}=\begin{bmatrix}0 & 1 \\ 1 & 0 \end{bmatrix}$, but I can't see how to do that. Moreover, I have doubts on checking the homomorphism property only for generators, that is, why checking the homomorphism property for the generators is enough to establish that $\rho$ is a representation?