Is $\mathfrak{so}(2n)$ contained in $\mathfrak{sl}(2n)$? Let $\mathfrak{so}(2n) = D_n  =\left\{ \begin{pmatrix} A&B \\ C&-A^T \end{pmatrix}:  A,B,C\in M_n(K), B=-B^T, C=-C^T \right\}$ . Of course the matrices in $D_n$ have trace zero. This could lead me to conclude that $\mathfrak{so}(2n) \subseteq \mathfrak{sl}(2n)$, but this doesn’t seem right as for the inclusion of the respective Dynkin diagrams: in fact, it is not true that $D_n$ is contained in $A_n$. What am I missing here?
 A: There is nothing wrong in what you did. The fact that a simple Lie algebra $\mathfrak g_1$ is a subalgebra of another simple Lie algebra $\mathfrak g_2$ doesn't imply the existence of a connection between their Dynkin diagrams (as your own example shows).
A: Although the other answer is correct and it is important to learn that one semisimple Lie algebra being included in another does not at all imply inclusion the respective root systems / Dynkin diagrams, I'd like to point out that something is going on here.
Namely, if the subalgebra in question is given as fixed points of a certain automorphism, then under certain conditions which are not entirely clear to me, the root system of the subalgebra can be found (almost) by looking at the quotient (people say "folding") of the root system of the big algebra. (In principle this is sound: the roots are elements of the dual of a CSA, so if there were any hope for functoriality from Lie algebras to root systems, it should be contravariant. But see what comes for weird mixes of quotients and subobjects.)

*

*If we have a root system of type $A_{2n-1}$ with basis $(\alpha_1, ..., \alpha_{2n-1})$ and "mod out" the relation $\alpha_i = -\alpha_{2n-i}$, i.e. look at the coinvariants of the non-trivial Dynkin diagram automorphism, we get a root system of type $C_n$. If we lift this to the "right" automorphism of the Lie algebra, this corresponds to the inclusion of split forms $\mathfrak{sp}(2n) \subseteq \mathfrak{sl}(2n)$. (Case $n=2$ was asked here; note that $B_2=C_2$.)


*In the same setup, a different lifting of that root same system automorphism to an automorphism of the Lie algebra actually kills the root spaces that belong to the long roots in $C_n$ and leaves the short roots therein, which form a system of type $D_n$. This corresponds to the inclusion of split forms $\mathfrak{so}(2n) \subseteq \mathfrak{sl}(2n)$ in your question.


*If we have a root system of type $A_{2n}$ with basis $(\alpha_1, ..., \alpha_{2n})$ and "mod out" the relation $\alpha_i = -\alpha_{2n+1-i}$, i.e. look at the coinvariants of the non-trivial Dynkin diagram automorphism, we get a non-reduced root system of type $BC_n$. The corresponding "correct" automorphism in $\mathfrak{sl}(2n+1)$ kills the root spaces that would belong to the roots of the form $2\alpha$ in that root system, and what remains is a root system of type $B_n$. This corresponds to the inclusion $\mathfrak{so}(2n+1) \subseteq \mathfrak{sl}(2n+1)$.
Big Caveat: All this is not entirely clear to me and as far as I know, there is no good written literature on these things. I would love to learn more about this, or see somebody smarter than me work it out. One case in which things worked, this time "folding" $D_4$ to $G_2$, is How can the generators of subalgebra $\mathfrak g^{\sigma}$ of $\sigma$-stable elements be expressed through generators of Lie algebra $\mathfrak g$?. Compare the comments to the answer to MathOverflow post https://mathoverflow.net/q/244893/27465 for more links and the apparently widely used folding $E_6 \twoheadrightarrow F_4$. I also tried to express what I say here in my answer to Map for roots of a Lie group to roots of a special subalgebra?, but apparently nobody took that seriously, maybe rightly so because I have not really figured out these things clearly enough for myself.
