What is the outer automorphism group of the Lie group $\text{SL}_2(\mathbb{R})$ as an abstract group? I hope to ask what the outer automorphism group of the Lie group $\text{SL}_2(\mathbb{R})$ is, just as an abstract group. It seems like Dieudonné's paper On the automorphisms of the classical groups explicitly left out the case $\text{SL}_n(K)$ for $n=2$. Hua's appendix solves it for $\text{SL}^\pm_2(\mathbb{R})$ which according to Hua is not the same as the case $\text{SL}_2(\mathbb{R})$, since -1 is not in the commutator subgroup of $\mathbb{R}$. I will appreciate any help or any reference.
related: What is the outer automorphism group of SL(2,Fq)?
 A: It is a standard fact that the automorphism group of $G=\mathrm{SL}_2(\mathbf{R})$ as topological group equals $\mathrm{PGL}_2(\mathbf{R})$, which is also the automorphism group of the Lie algebra viewed as $\mathbf{R}$-algebra. In particular, the outer automorphism group as topological group is cyclic of order 2.

I claim that this is the same as abstract group. Namely, every automorphism is continuous. So, as an abstract group, the automorphism group of $G=\mathrm{SL}_2(\mathbf{R})$ is reduced to $\mathrm{PGL}_2(\mathbf{R})$, and hence its outer automorphism group is cyclic of order 2.

Note: this is highly false for $\mathrm{SL}_2(\mathbf{C})$: while its outer automorphism group as topological group is cyclic of order 2 (induced by complex conjugation), its automorphism group as abstract group has cardinal $2^{\mathfrak{c}}$ (use automorphisms of the abstract field $\mathbf{C}$).

Notation: for $h$ in a group $H$, let $C_h$ be the centralizer of $h$ in $H$, and $h$ the normalizer of $h$. Write $X_H$ as the set of $h\in H$ such that $C_h$ is maximal among solvable subgroups of $H$.
Lemma 1: for $g\in G=\mathrm{SL}_2(\mathbf{R})$, we have $g\in X_G$ iff $g$ is non-central elliptic (i.e. $|\mathrm{Trace}(g)|<2$).
Proof: direct verification. If $g$ is central then its centralizer is not solvable. If $g$ is non-central diagonalizable, or $\pm g$ is unipotent, then its centralizer is contained in an upper triangular group. Conversely if $g$ is non-central elliptic, its centralizer is conjugate to $\mathrm{SO}(2)$, which is maximal solvable in $G$.
Lemma 2. Let $T$ be the upper triangular group. Let $H$ be a maximal solvable subgroup of $G$. Suppose that $H$ is infinite and not virtually abelian. Then $H$ is conjugate to $T$.
Proof: then $H$ is Zariski closed. So its unit component has finite index, hence is non-abelian and infinite. So it is conjugate to $T$.
Lemma 3: all maximal abelian subgroups of $T$, except $[T,T]$, are conjugate.
Proof: easy standard elementary verification (also follows by conjugation of maximal tori in solvable algebraic groups).
Lemma 4: let $F$ be a subset of $G$. Then $F$ is bounded if and only if there exist $g,h\in X_G$ and $n$ such that $F\subset (C_gC_h)^n$.
Proof: if $g\in X_G$ then $C_g$ is compact. So the condition implies that $F$ is bounded. Also, if $g,h\in X_G$ don't commute, $C_g\subset C_h$ is a compact generating subset of $G$ and Baire's theorem implies the result.
Now let $f$ be an automorphism. Let us prove that $f$ is continuous. It is enough to prove that $f$ is continuous at $1$. Suppose $g_n\to 1$. By Lemma 4, $f$ preserves boundedness, so $(f(g_n))$ is bounded. Supposing by contradiction that $f(g_n)$ doesn't converge to $1$, we can suppose, after extraction, that it converges to $g\neq 1$. There exist $i_n\to\infty$ such that $g_n^{i_n}$ also tends to $1$. So $f(g_n)^{i_n}$ is bounded as well. This already implies that $|\mathrm{Trace}(g)|\le 2$.
Let $L$ be the set of $g$ that occur as limit of $f(g_n)$ for $g_n$ tending to $1$. This is a normal subgroup. By the previous paragraph, it consists of matrices of $|\mathrm{Trace}|\le 2$. Hence it is either identity, or $\{\pm 1\}$. In the first case, we are done.
In the other case, this already implies that the $f$ induces a continuous automorphism of $\mathrm{PSL}_2(\mathbf{R})$. Hence, after composing by a continuous automorphism, we can suppose that $f$ induces the identity on $\mathrm{PSL}_2(\mathbf{R})$. Hence $f(g)=e(g)g$ for all $g$ with $e(g)\in\{\pm 1\}$. Then $e$ is a homomorphism $\mathrm{SL}_2(\mathbf{R})\to\{\pm 1\}$. Since $\mathrm{SL}_2(\mathbf{R})$ is abstractly a perfect group, we have $e=1$. So $f$ is the identity and the proof is completed.
