In a metric Lie algebra, is the orthogonal complement of a Lie subalgebra a Lie subalgebra?

Let $\mathfrak{g}$ be a (finite-dimensional, real) Lie algebra equipped with a nondegenerate symmetric bilinear form $\langle \cdot{,}\cdot \rangle$ that is ad-invariant, i.e., such that \begin{equation*} \langle [x,y],z\rangle = \langle x,[y,z]\rangle \quad \text{for all $x,y,z \in \mathfrak{g}$}; \end{equation*} let $S$ be a nondegenerate subspace.

Question. Suppose that $S$ is closed under the Lie bracket, i.e., it is a Lie subalgebra. Does it then follow that its orthogonal complement $S^{\perp}$ (which is automatically nondegenerate) is also a Lie subalgebra?

I believe that, in general, the answer is no. However, it would be great if somebody could provide a counterexample.


Take $\mathfrak{g} = \mathbb{R}^3$ with $[x,y] = x \times y$ the cross product and as symmetric bilinear form $\langle \cdot, \cdot \rangle$ the usual scalar product. Then the space $S = \langle e_1 \rangle$ is closed under the Lie bracket and $S^\perp = \langle e_2, e_3 \rangle$ but $e_2 \times e_3 = e_1$.


This is definitely not true. An important example of this is the Cartan decomposition of a semisimple Lie Algebra. These are decompositions of the form $\mathfrak{g} = \mathfrak{k} \oplus \mathfrak{p}$ where $\mathfrak{k}$ is a maximal compact subalgebra (in other words a maximal subalgebra with negative definite Killing form). Then $\mathfrak{p}$ is very far from being a subalgebra. In fact, $[\mathfrak{p},\mathfrak{p}] \subset \mathfrak{k}$.

Note this works for any symmetric decomposition too.

For a simple Lie algebra the Killing form is the only ad-invariant, nondegenerate symmetric bilinear form up to scale. So unless the Lie algebra is compact there is no definite (positive or negative) form with those properties. Thus, "orthogonal complement" is a bit of a dodgy concept. The orthogonal subspace may overlap with the original so it can't be called complementary in general (the Cartan decomposition is an important exception).