TITLE: Find $\mathrm{Aut}(G)$, $\mathrm{Inn}(G)$ and $\mathrm{Aut}(G)/\mathrm{Inn}(G)$ for $G = D_4$
QUESTION [7 upvotes]: Problem
Find $\mathrm{Aut}(G)$, $\mathrm{Inn}(G)$ and $\mathrm{Aut}(G)/\mathrm{Inn}(G)$ for $G = D_4$
My Attempt
I let $D_4 = \{e, x, y, y^2, y^3, xy, xy^2, xy^3\}$
I found that $\mathrm{Inn}(G)$ consists of 4 bijective conjugation functions, namely $\{\phi_e, \phi_x, \phi_y, \phi_{xy}\}$.  For $\mathrm{Aut}(G)$, I found that there are 12 automorphisms.
Here is the following link that relates to the problem I am doing.
Based on the solution:

Lemma: If $\alpha$ is an automorphism of group $G$ and $G$ has generators $x$ and $y$ with orders $n$ and $m$, respectively then $\alpha(x)$ and $\alpha(y)$ are also generators for $G$ with orders $n$ and $m$.
Proof: First, let us show that the orders agree.  If $g \in G$ has order $n$, let $a = \alpha(g) \in G$ have order $m$.  Then, $a^m = 1$ but by applying $\alpha^{-1} \in \mathrm{Aut}(G)$, we get $g^m = 1$.  However, $g$ has order $n$, so $n$ must divide $m$.  Similarly, $g^n = 1$ and applying $\alpha$, we note that $a^n = 1$, and so we conclude $n = m$.
Secondly, since any element of $G$ can be written as a product of $x$'s and $y$'s, and $\alpha$ is a surjective homomorphism, it follows that any element of $G$ can also be written as a product of $\alpha(x)$ and $\alpha(y)$, hence they generate $G$.
Using this Lemma (or a similar argument), we note that an automorphism of $D_4$ must send $y$ to $y, xy, x^2y$ or $x^3y$ and $x$ to $x$ or $x^3$.  Any such pairing is possible, thus there are $2 \cdot 4 = 8$ such automorphisms...

(The notations that someone use are different from what I denote.)
The question I have is: Why are there 8 automorphisms?  Shouldn't there be 12 automorphisms?  Here is what I have:
$$e \mapsto e$$
$$x \mapsto \text{ either } \{x,y^2, xy^2\}$$
$$y \mapsto \text{ either } \{y, y^3, xy, xy^3\}$$
Then, there are $1 \cdot 3 \cdot 4 = 12$ automorphisms.
Any advices or comments?

REPLY [2 votes]: To determine $\mathrm{Inn}(D_4)$,first observe that the complete list of inner automorphisms is 
$$\phi_{R_{0}},\phi_{R_{90}},\phi_{R_{180}},\phi_{R_{270}},\phi_{R_{H}},\phi_{R_{V}},\phi_{R_{D}},\phi_{R_{D'}}$$
Here $R_0,R_{90},R_{180},R_{270}$ are rotations of square. H and V denote the reflection of square with horizontal and vertical reflection and D and  D' are denote diagonal reflection.Our job is to determine the no. of repetitions in this list.
Now u can check easily that $\phi_{R_{180}}=\phi_{R_{0}}$ also,$\phi_{R_{270}}=\phi_{R_{90}}$
similarly,$H=R_{180} V$ and $D'=R_{180} D$ so we have $\phi_{R_{H}}=\phi_{R_V}$ and $\phi_{R_D}=\phi_{R_D'}$
there are four inner automorphisms 
$$\mathrm{Inn}(D_4)=\{\phi_{R_0},\phi_{R_{90}},\phi_{R_H},\phi_{R_D}\}$$