Semisimplicity of so(B) Given a symmetric bilinear form on $\mathbb{C}^n$ (with associated symmetric matrix $B$) and the algebra $so(B)$ of complex traceless matrices $X$ with $XB+BX^T=0$, i am trying to prove the following statement:
"The algebra $so(B)$ is semisimple if and only if $B$ is non-degenerate".
My first idea was to find a relation between the Killing form $K$ of $so(B)$ and $B$, and then see whether I could obtain the non-degeneracy of $K$ from that of $B$, but I haven't been able to do so. Does anyone have any ideas on this or maybe another approach?
Thanks!
 A: As noted in a comment, the statement is actually false as stated. However, if we leave out the restriction to traceless matrices, it becomes almost true:
Proposition: Let $n \in \mathbb N \setminus \{2\}$ and $B \in M_{n\times n}(\mathbb C)$ a symmetric matrix. Then
$$so(B) := \{X \in M_{n \times n}(\mathbb C) : XB + BX^T =0 \}$$
(with its natural vector space structure and Lie bracket given by matrix commutator) is a semisimple Lie algebra if and only if the bilinear form corresponding to $B$ is non-degenerate. (For $n=2$, $so(B)$ is never semisimple.)
Proof sketch / hints:

*

*Straightforward check that the space is a Lie algebra.


*Look at two extreme cases: $B=0$ (the zero matrix) and $B =Id_n$. -- In the first case, the condition imposed in the definition of $so(B)$ is empty, so that $so(0)$ is the full Lie algebra of all $n \times n$-matrices, usually called $\mathfrak{gl}_n(\mathbb C)$. This is easily seen to have non-trivial centre and hence is not semisimple. -- In the second case, the Lie algebra is what is usually called $$\mathfrak{so}_n(\mathbb C) := \{X \in M_{n \times n}(\mathbb C): X^T = -X\}$$ and can be shown to be semisimple for all $n \neq 2$ (actually simple for $n=3$ and $n\ge 5$; whereas for $n=2$, it is the one-dimensional abelian Lie algebra). To show this might be the hardest part of the proof, but is of course possible:



*

*A computational proof along the lines of $\mathfrak{sl}(3,F)$ is simple might just get a bit intricate.


*An explicit computation of the root spaces along the lines of https://math.mit.edu/classes/18.745/Notes/Lecture_15_Notes.pdf is maybe the best from a theoretical viewpoint, but here one really needs to know what one is looking for (and e.g. chooses $B$ as the matrix with $1$'s on the antidiagonal instead, so that one can "see" a Cartan subalgebra easily).


*Finally, user orangeskid brings up a nice approach in a comment, which relies on some Lie theory including a compactness argument to show that for all $n$, $\mathfrak{so}_n(\color{red}{\mathbb R})$ (hence also $\mathfrak{so}_n(\mathbb C)$) is reductive. Then, it's relatively easy to show that for $n \neq 2$, its centre is trivial, so we have semisimplicity (and even kind of "explained" the exception at $n=2$).


*The general case is reduced to the two cases above as follows (cf. related answers 1, 2, 3): Note that base change of a symmetric bilinear form corresponds to replacing the representing matrix $B$ by the matrix $P^TBP$, where $P \in GL_{d}(k)$ is the base change matrix between the two bases. (The matrices $B$ and $P^TBP$ are called congruent to each other.) Check that given such $P$, then $X \mapsto P^{-1}X P$ (NB: now one really takes the inverse, not the transpose) defines an isomorphism $so(B) \simeq so (P^TBP)$. -- Next we need a fact from linear algebra, namely, that any symmetric matrix $B$ is congruent to some diagonal matrix; and then further, if the ground field is $\mathbb C$ (or any algebraically closed field), every non-zero diagonal entry can be "scaled" via congruence to $1$, meaning that without loss of generality, $B$ is a diagonal matrix with $n-k$ entries "$1$" and $k$ entries "$0$" and on the diagonal, where $k \in \{0, ..., n\}$. (And this bilinear form is non-degenerate by definition if and only if $k=0$.) -- But for such $B$, it is immediately seen that [EDIT: corrected, thanks] a general $X \in so(B)$ is of the form $$\pmatrix{X_1 & X_2\\0&X_3}$$ where $X_1 \in \mathfrak{so}_{n-k}(\mathbb C)$, $X_3 \in \mathfrak{gl}_k(\mathbb C)$, and $X_2$ is an arbitrary $(n-k) \times k$-matrix. Now, for $k \notin \{0, n\}$, the matrices $\pmatrix{0 & X_2\\0&0}$ form a non-trivial solvable ideal inside this Lie algebra, which thus cannot be semisimple. Thus we are reduced to the cases in 2. In particular, it's clear that $k=0$ is a necessary condition for $so(B)$ to be semisimple.

