I have a set $A = \{1, 2, 3\}$.
Relation $S = \{(1, 1), (1, 2), (3, 1) \}$
Relation $T = \{(1, 1), (3, 2), (3, 1) \}$
$S$ is not transitive, but $T$ is transitive. Why is that?
A relation $R$ transitive if $(a,b),(b,c)\in R\Rightarrow (a,c)\in R$.
In $S$, we have $(1, 1), (1, 2)$, and we also have $(1, 2)$. And we have $(3, 1), (1, 1)$, and also $(3, 1)$.
In $T$, we have $(3, 1), (1, 1)$, and we also have $(3, 1)$.
It seems like we have the same kind of situations in both $S$ and $T$, except $S$ has another $a, b, c$ triplet. What makes T transitive but S not?