TITLE: Mapping class group vs outer automorphism group of the fundamental group for nonorientable surfaces
QUESTION [19 upvotes]: The Dehn--Nielsen--Baer theorem states that for a closed, connected and orientable surface M the extended mapping class group of M is isomorphic to the outer automorphism group of the fundamental group of M. (See, e.g., Theorem 8.1 of A Primer on mapping class groups, available online here: http://www.math.uchicago.edu/~margalit/mcg/mcgv50.pdf.)
I was wondering whether there is similar connection between the two for nonorientable surfaces? If not, are they related at all?
Sorry if this question is trivial: I am a complete begginer in the subject of mapping class groups; I hardly learned the definition last week. What I'm interested in are surface groups of nonorientable surfaces and I thought I might be able to extract some information about them using what is known about MCGs. 
I probably messed up the tags completely: please fell free to re-tag appropriately.

REPLY [14 votes]: Part of the theorem is true in much more generality.  Let $M$ be an Eilenberg-MacLane space of type $K(\pi, 1)$.  That $Out(\pi_1(M))$ is isomorphic to $\pi_0 HomotopyEquivalences(M)$ is a standard fact -- presumably Farb and Margalit's argument factors through this argument?  I haven't read their book so I don't know the answer but I suspect it's yes.  It appears in Hatcher's Algebraic Topology notes, anyhow. 
To finish the proof for surfaces you have to argue that for non-orientable surfaces $\pi_0 Diff(M) \to \pi_0 HomotopyEquivalences(M)$ is an isomorphism of groups.  This breaks into two questions -- (1) is every homotopy-equivalence homotopic to a diffeomorphism, and (2) can non-trivial diffeomorphisms be homotopic to the identity? 
Looking at the Margalit-Farb paper it looks like they answer (2) by lifting the diffeomorphism to a map of the universal cover, in the case that's a hyperbolic plane (the non-hyperbolic cases are considered special cases), and then extend to the disc compactification.  This is a fairly standard type of argument.
For (1) they use what they call the Dehn-Nielsen-Baer theorem, but they also give alternative proofs, later in Theorem 8.9.   One nice way to think of this is to do it inductively -- homotope the image (under the homotopy-equivalence) of a simple closed curve to an embedding.  Then you can cut the domain and range along those curves, and reduce the problem to one for a lower-genus surface, where the homotopy-equivalence is a diffeomorphism on the boundary already.  Eventually you get to a homotopy-equivalence of discs which restricts to a diffeo on the boundary (you need to cut along arcs to do this) and then at that point you can use the straight-line homotopy, since discs are convex.