Solutions to the Anticommutator Matrix Equation I'm investigating matrices with regards to antisymmetric properties, and I'm curious if there is a general solution to
$$[A,X]=B$$
in terms of a (constant) matrix $X$, where $[A,X]$ denotes for shorthand the anticommutator $AX+XA$ (note: not $AX-XA$) and $A$ and $B$ are given matrices. For simplicity, let $A$ and $B$ be real symmetric pos. def. matrices. Is there a reference for this if it's true, or is it possibly a deep result requiring much theory and/or more conditions?
 A: This looks to me like it works:  
Since $A$ is real symmetric positive definite, there exists an orthogonal matrix $O$ diagonalizing $A$:
$O^TAO = \Lambda, \tag{1}$
where $\Lambda_{ij} = 0$ for $i \ne j$ and $\Lambda_{ii} = \lambda_i$, where the (real) $\lambda_i > 0$ are the eigenvalues of $A$.  We perform the transformation $Z \to O^TZO$ on the given equation
$AX + XA = B, \tag{2}$
obtaining
$O^T(AX + XA)O = O^TBO, \tag{3}$
which using $OO^T = O^TO = I$ may be written as
$O^TAOO^TXO + O^TXOO^TAO = O^TBO, \tag{4}$
or, with the aid of (1),
$\Lambda O^TXO + O^TXO \Lambda = O^TBO. \tag{5}$
Now, for the sake of notational convenience, let us set $O^TXO = Y$ and $O^TBO = C$; then (5) becomes
$\Lambda Y + Y \Lambda = C. \tag{6}$
We compute $\Lambda Y$ and $Y \Lambda$, setting 
$Y = [y_{ij}]; \tag{7}$
an elementary calculation reveals that
$\Lambda Y = [\lambda_i y_{ij}], \tag{8}$
and
$Y \Lambda = [\lambda_j y_{ij}]; \tag{9}$
that is, left multiplication by the diagonal matrix $\Lambda$ multiplies the row $i$ of $Y$ by $\lambda_i$; right multiplication by $\Lambda$ multiplies column $j$ of $Y$ by $\lambda_j$.  Combining (6), (8) and (9) we find
$[(\lambda_i + \lambda_j) y_{ij}] = [\lambda_i y_{ij}] + [\lambda_j y_{ij}] = \Lambda Y + Y \Lambda = C. \tag{10}$
(10) may readily be solved for $Y$; indeed we have
$Y = [y_{ij}] = [(\lambda_i + \lambda_j)^{-1}c_{ij}], \tag{11}$
where $C = [c_{ij}]$.  Division by $\lambda_i + \lambda_j$ is always an admissible operation in this context, since all the $\lambda_i > 0$, so that $\lambda_i + \lambda_j > 0$ as well.  Having obtained $Y$ via (11), we may re-capture $X$ by performing the inverse of the conjugation $Z \to O^TZO$; thus
$X = OYO^T; \tag{12}$
a complete solution is thus had in the event that $A$ is symmetric positive definite.
In closing, perhaps a few remarks are in order:
1.)  The condition that $A$ by symmetric positive definite can be considerably relaxed and the above solution technique will still basically fly.  For example, if we
merely assume $A$ is diagonizable with positive eigenvalues, essentially the same steps apply with the proviso that the orthogonal matrix $O$ is replaced by the matrix $E$ which diagonalizes $A$:
$E^{-1}AE = \Lambda \tag{13}$
in this case, and $E^{-1}$ replaces $O^T$ in the preceding algebraic maneuvers.
2.)  We can actually go a step further and allow diagonalizable $A$ to have real eigenvalues of both signs, as long as we insist that $\lambda_i \ne -\lambda_j$ for any two eigenvalues of $A$.
3.)  Apparently generalizations into the complex domain are also feasible:  for instance, we may take $A$ to be Hermitian, $A^\dagger = A$, so the eigenvalues are real, and insist the criterion posited in (2.) apply: $\lambda_i \ne -\lambda_j$ for all $i, j$; in this case, $O$ would be replaced by some unitary matrix $U$ with $U^\dagger U = U U^\dagger = I$.
4.)  Hell's bells, boyz, in for a penny, in for a pound, I always say!  Rather than continue to describe various incremental expansions of the class of feasible $A$,
let's just take $A$ to be an arbitrary diagonalizable complex matrix such that the above eigenvalue criterion applies; then it appears that the technique described here applies.
5.)  Of course in the above the diagonalizing matrices $O$, $E$, $U$ all have as their columns the eigenvectors of $A$.
6.)  When $A$ can't be diagonalized it can be reduced to a set of Jordan blocks, at least one of which will be of the form $\lambda I + N$ where $N$ is the usual nilpotent matrix.  Not sure what happens in this case, but it would be interesting to pursue the analogous argument and see what happens.
7.)  Apparently there is no restriction needs be placed on $B$ other than its existence;)!
Finally, 
8.)  A related, similar method can be attempted for equations of the form $AX - XA = B$; then one obtains the analogous condition that $\lambda_i - \lambda_j \ne 0$ for all $i, j, i \ne j$; apparently, since $\lambda_i - \lambda_i = 0$, we would have to have $c_{ii} = 0$, all $i$, and the $y_{ii}$ are unconstrained.  NB:  Not really sure how this works out!  But in a Lie algebra, anything is possible!  I would love to do more with this situation but have neither the time nor the space (here) at present to do so . . . takers, anyone?
OK, I'm typed out for the moment at least.  My name's Bob; thanks for letting me share:)
Hope this helps!  Cheerio,
and as always,
Fiat Lux!!!
A: If $A$ has a full set of eigenvectors, the answer is straightforward:
Expand the linear operator $L(X) = AX+XA$ in terms of the basis $u_i v_j^*$ (where $u_k$ are the eigenvectors of $A$, $v_k$ are the eigenvectors of $A^*$). $L$ is diagonal in this basis, and the diagonal elements are $\lambda_i + \lambda_j $. (A condition for invertibility falls out from this.)
A: Much more generally, let $L:X\rightarrow AX+XB$ where $A,B\in\mathcal{M}_n(K)$ with $K$ an algebraically closed field. Let $spectrum(A)=(\lambda_i)_i,spectrum(B)=(\mu_j)_j$. Then $spectrum(L)=(\lambda_i+\mu_j)_{i,j}$ (without any hypothesis on $A,B$; in particular, $A,B$ do not need to be diagonalizable !)
Proof: In fact $L$ is the sum of two Kronecker products $L=A\otimes I+I\otimes B^T$. cf. http://en.wikipedia.org/wiki/Kronecker_product
Moreover $A\otimes I$ and $I\otimes B^T$ are $n^2\times n^2$ matrices that commute (because $(AX)B=A(XB)$) and, consequently, they are simultaneously triangularizable. The eigenvalues of $A\otimes I$ are $(\lambda_i)_i$, each $n$ times, and the eigenvalues of $I\otimes B^T$ are $(\mu_i)_i$, each $n$ times. It is not difficult to see, considering the triangular forms of $A\otimes I$ and $I\otimes B^T$, that we obtain the $(\lambda_i+\mu_j)_{i,j}$ on the diagonal of the sum. 
