Modification of the continuous time Lyapunov Equation

For my research I have been working with different continuous-time Lyapunov equations of the form $$M R + R M^\text{T} = G$$ where all matrices are real and $n\times n$ ($R$ is symmetric). Component-wise, they read $$\sum_k\left( M_{i,k} R_{k,j} + M_{j,k}R_{k,i} \right)= G_{i,j}$$ However, I have now modified the problem so that the diagonal equations ($i=j$) become $$\sum_k\left( M_{i,k} R_{k,i} + M_{i,k}R_{k,i} \right) -\delta_i R_{i,i}= G_{i,i}$$ ie, a new term appears which involves only the diagonal entries, with the $\delta_i$ being real numbers.

How do I express this extra term in matrix notation? I was hoping this could be written as a Riccati or Sylvester type of equation so that I could employ specialised solvers.

Actually, a related but more general question is: what linear transformation $T$ (and its accompanying matrix) should I perform in a matrix $A$ to obtain a diagonal matrix with the original entries; i.e., $$T(A) = \text{diag}(a_{1,1}, a_{2,2},\ldots,a_{n,n})$$

Thank you very much for the support.

Gabriel

-
as long as I know there are many diagonalization methods but they dont relate the diagonal matrix to the matrix elements directly. But for example you have $\sigma_i^2=\sum_{ij}A_{ij}^2$. –  Seyhmus Güngören Aug 30 '12 at 21:02

You can do this but I am not sure it is the most efficient way of doing it (I'll illustrate it on a $3\times 3$ matrix)
$$A=\begin{bmatrix}a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33} \end{bmatrix}$$
$$\begin{bmatrix}a_{11}&0&0\\ 0&a_{22}&0\\ 0&0&a_{33} \end{bmatrix}=\begin{bmatrix}1&0&0\\ 0&0&0\\ 0&0&0 \end{bmatrix}A\begin{bmatrix}1&0&0\\ 0&0&0\\ 0&0&0 \end{bmatrix}+\begin{bmatrix}0&0&0\\ 0&1&0\\ 0&0&0 \end{bmatrix}A\begin{bmatrix}0&0&0\\ 0&1&0\\ 0&0&0 \end{bmatrix}+\begin{bmatrix}0&0&0\\ 0&0&0\\ 0&0&1 \end{bmatrix}A\begin{bmatrix}0&0&0\\ 0&0&0\\ 0&0&1 \end{bmatrix}$$
You can generalize it to $n\times n$ matrix.
Another way to do it is use pole-place method to place the eigenvalue of the $A$ matrix in diagonal elements of A, then perform normal diagonalization to obtain a diagonal form with diagonal elements of A. (but this is a nasty way of doing it and at the end I am not sure how you can enforce the order on the final diagonal matrix) –  sara Aug 30 '12 at 21:06
The idea in your answer is probably unfeasible, since my system has $n > 200$. Could you point out a reference for this pole-place method? By the way, thanks for the support. –  Gabriel Landi Aug 31 '12 at 14:15