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!
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$).