an interesting fact about automorphisms is this:
the group Aut(G) has a subgroup Inn(G), the group of inner automorphisms.
an inner automorphism is of the form: x-->gxg^-1, and furthermore Inn(G) = G/Z(G), so how many inner automorphisms a group has (sort of) measures how "non-abelian" G is.
in the case of D4, D4/Z(D4) is of order 4, so there are 4 inner automorphisms of D4 (for example, () and (1 3)(2 4) lead to the same inner automorphism, the identity map).
since D4 is "half-abelian", one might expect that D4 has outer automorphisms, and this turns out to be true.
letting D4 = <r,s>, where r = (1 2 3 4), s = (1 3), we see that any element of Aut(D4) must either map r-->r, or r-->r^3, and that s must map to either s, rs, r^2s, or r^3s (we can't have s-->r^2, because if φ in Aut(D4) mapped r-->r, then φ(rs) = φ(r)φ(s) implies that φ(rs) = r^3, but e = φ(e) = φ((rs)^2) ≠ φ(rs)φ(rs) = r^6 = r^2. similarly if φ(r) = r^3, then φ(rs) must be r, but e = φ(e) = φ((rs)^2) ≠ φ(rs)φ(rs) = r^2).
it is natural to ask whether φ:r-->r, s-->rs, and ψ:r-->r^3,s-->s are automorphisms. it is instructive to verify this yourself (they are).
φ^2 is the same as conjugation by r, and ψ is the same as conjugation by s. in this case Inn(D4) = <φ^2,ψ>. but there is no inner automorphism corresponding to φ (the inner automorphisms of D4 correspond to the cosets Z(D4), rZ(D4), sZ(D4), (rs)Z(D4), and each of these cosets have order 2 in D4/Z(D4), so any inner automorphism of D4 is of order 2), which is of order 4.
an isomorphism between Aut(D4) and D4 is given explicitly by:
φ --> r
ψ --> s
in Galois theory, the group of automorphisms of an extension field E which leave fixed a base field F, is a special group, and is closely conected to a group of permutations of roots of a polynomial which factors in E. in the example given above, the group {1C,*} where:
1C: a+bi--->a+bi (the identity automorphism)
*:a+bi--->(a+bi)* = a-bi (complex conjugation automorphism)
corresponds to S2, where the polynomial in question is x^2+1, and the set of roots is {i,-i} (the identity automorphism corresponds to the identity permutation () on the set of roots, and the conjugation automorphism corresponds to the only transposition, (1 2), which sends i-->-i, and -i-->i).