Matrix Commutator Equation 
Let $A$ and $B$ be symmetric $n \times n$ matrices. Then $[A, B] = [B, X]$, where $X = $?

This is probably an easy question, but I cannot presently see the solution. I am not sure how determine what $X$ must necessarily be on the supposition that it satisfies $[A,B]=[B,X]$. I was able to show that $[A,B] = [B, -\frac{1}{2}(A+A^T)]$ for all $A$ and $B$ generally, and so if $A$ is symmetric, $[A,B] = [B,-A]$. This gives us a sufficient condition on $X$ for it to satisfy the equation, but I am having trouble showing that it is a necessary condition, that if the equation holds, then $X=-A$. 
I could use a hint.
 A: The linear matrix equation $\rm [A, B] = [B, X]$ can be written in the form
$$\rm B X - X B =  A B - B A$$
Vectorizing, we obtain a system of $n^2$ linear equations in $n^2$ variables
$$\left( (\mathrm I_n \otimes \mathrm B) - (\mathrm B \otimes \mathrm I_n) \right) \mbox{vec} (\mathrm X) = \mbox{vec} (\mathrm A \mathrm B - \mathrm B \mathrm A)$$
Whether the solution $\rm X = -A$ is unique or not depends on the rank of the $n^2 \times n^2$ matrix above.
A: We suppose that we work in $M_n(\mathbb{R})$.
The set $S$ of solutions of the equation in the unknown $X$, $BX-XB=AB-BA$, is exactly $-A+C(B)$ where $C(B)$ is the commutant of $B$. Then $S$ is an affine space of dimension at least $n$. 
Remark. Assume that $B$ is generically chosen amongst the symmetric matrices; then its eigenvalues are distinct and, consequently $C(B)$ is composed of the polynomials in $B$ and $dim(C(B))=n$. Since $A$ is also symmetric, each solution $X$ is symmetric.
A: The answer you gave may or may not be correct (what definition of $[,]$ are you using?). 
You're not going generally going to get uniqueness (i.e., that it's a "necessary" condition), as you'll see by looking at 
$B = I$ or at $B = 0$, for which there are infinitely many solutions for $X$ in general. 
