text: Q:
  
  $\mathbb S_n$ as semidirect product
  
  In this note, I've read that $\mathbb S_n$ is a semidirect product of the alternating group $A_n$ by $\mathbb Z_2$. So I am trying to define a morphism $\rho: \mathbb Z_2 \to Aut(A_n)$ to show that $\mathbb S_n \cong A_n \rtimes Z_2$. I would appreciate suggestions on how could I define the morphism. Thanks in advance.
  
  A:
  
  More generally:
  Theorem. If $G$ has a subgroup of index two, $H$ say, and there exists an element $g\not\in H$ of order two then $G$ splits as a semidirect product $G=H\rtimes\mathbb{Z}_2$.
  This is because $\langle g\rangle\cap H=1$, and the other (internal) semidirect product conditions follow because $H$ has index two (so is normal, and so on).
  So, in order to answer your question you simply need to find an element of order two in $S_n$ which is not contained in $A_n$.
  
  A:
  
  Hint: Given $\mathrm{sign}$ the parity of a permutation, you have an exact sequence 
  $$1 \to A_n \to S_n \overset{\mathrm{sign}}{\longrightarrow} \mathbb{Z}_2 \to 0.$$
  
  