solving matrix equation I want to solve the following matrix equation. Could anyone give me a hand? Thanks.
Given an $n \times n$ matrix $\mathbf A$ (diagonally dominant), I need to solve an $n \times n$ symmetric matrix $\mathbf  X$ such that
$\mathbf A\mathbf X+\mathbf X\mathbf A^\top =\mathbf  I$,
where $\mathbf I$ is an $n \times n$ identity matrix.

If you are just going to use it for purposes of computation etc. then it seems to me that the simplest way is to consider this as A'X'=B', where A' is $n^2 \times n^2$, X' is $n^2 \times 1$, B' is $n^2 \times 1$. X' and B' are basically 'flattened' versions of X and I, respectively. If general element of X is $x_{ij}$, then $x_{ij}$ is also $(i \times (n-1) + j)$th element of X'. Similarly for getting B' from I. $(i \times (n-1) + j), (k \times (n-1) + l)$th element of A' is number of times $x_ij$ contributes to (k,l)th element in the expansion of the LHS here. So eg. $a'_{11}$ is $2 \times a_{11}$.
