# galois group of irreducible monic cubic polynomial

Let $$G$$ be the galois group $$Gal(K/\mathbb{Q})$$ and $$f(x)$$ a monic irreducible cubic over $$\mathbb{Q}[x]$$. I'm having trouble understanding the relationship to $$S_3, A_3$$ with this galois group from reading other posts. In particular, to show that

(a) $$o(G) =3$$ if and only if $$G$$ as a subgroup of $$S_3$$ is $$A_3$$.

(b) $$G = A_3$$ if and only if the discriminant is a square in $$\mathbb{Q}^\times$$

For the first part, I think $$G = \{id, \sigma, \sigma^2\}$$. I'm not sure how the discriminant is related, except for that if the discriminant is positive then $$f$$ has all real roots.

Lastly, is it possible to find an irreducible cubic in $$\mathbb{Q}[x]$$ whose galois group over $$\mathbb{Q}$$ is $$S_3$$ while having all real roots?

If $x_1,x_2,x_3$ are the zeroes of $f$ then the discriminant $D=\delta^2$ where $$\delta=(x_1-x_2)(x_1-x_3)(x_2-x_3).$$ Note the $\delta\ne0$ Swapping two of the $x_i$s maps $\delta$ to $-\delta$. For instance swapping $x_1$ and $x_3$ gives $$(x_3-x_2)(x_3-x_1)(x_2-x_1)=-\delta.$$ On the other hand permuting the $x_i$ in a cycle takes $\delta$ to itself.
Each element of the Galois group $G$ permutes the $x_i$ and so takes $\delta$ to $\pm\delta$. By the Galois correspondence $\delta\in\Bbb Q$ iff $\tau(\delta)=\delta$ for all $\tau\in G$. This is the case iff $G\le A_3$. On the other hand $\delta\in\Bbb Q$ iff $D=\delta^2$ is a square in $\Bbb Q$. So the discriminant is a square iff $G\le A_3$. But as $f$ is irreducible, $|G|\ge3$ and so either $G=S_3$ or $G=A_3$.
There are cubics with three real roots and Galois group $S_3$. Just try a few real-rooted cubics; after very few attempts (probably one) you'll find one.