TITLE: Solving for specific entries in a Lyapunov Equation
QUESTION [6 upvotes]: Let $A$ be a $2n\times 2n$ real matrix with the following structure 
\begin{equation}
A = \left(\begin{matrix}
0 & -I \\
K & S
\end{matrix}\right)
\end{equation}
with all sub-matrices of size $n\times n$: $I$ is the identity matrix, $K$ is symmetric positive definite and $S$ is diagonal but singular. I am interested in the (numerical) solution of the  continuous time Lyapunov equation for the $2n\times 2n$ matrix R:
\begin{equation} 
R A^\text{T} + A R = \left(\begin{matrix}
0 & 0 \\
0 & \Gamma
\end{matrix}\right)
\end{equation}
where $\Gamma$ is a diagonal and singular $n\times n$ real matrix. 
However, I only need a few elements of $R$. More specifically, writing 
\begin{equation}
R = \left(\begin{matrix}
X & C \\
C^\text{T} & V
\end{matrix}\right)
\end{equation}
all I really want are the diagonal entries of $V$ (also $n\times n$).
Is there anyway I could reduce this problem to some other (probably Sylvester) equation for $V$ or, better yet, only it's diagonal? I don't really know how to approach this problem.

REPLY [4 votes]: Just doing the matrix multiplications gives four equations:
$$\begin{align}
C^T = -C \\
XK + CS &= V \\
KX - SC &= V \\
KC - CK + VS + SV &= \Gamma
\end{align}$$
the last equation of course gives $VS + SV = \Gamma - KC + CK$, so if we know what $C$ is we get a Sylvester equation for $V$. If we substitute the LHS of the second and third equation in place for $V$ in the fourth equation we get:
$$K(XS + C) + (SX - C)K=\Gamma$$
and assuming $X$ is symmetric, we get $(XS + C)^T = SX - C$, so setting $B = XS + C$, the equation turns into
$$KB + B^TK = \Gamma$$
which we want to solve for $B$. Now, this is not really a standard Sylvester equations since the matrix we seek is transposed, but there are methods to solve these kinds of equations too.
Once $B$ has been found we get
$$C = \frac{1}{2}(B-B^T).$$
Since $B$ is the sum of one antisymmetric ($C$) and one symmetric matrix ($XS$), the antisymmetric part of $B$ has to be $C$.
Thus, one can now calculate the RHS in 
$$VS + SV = \Gamma - KC + CK$$
and then solve for $V$ as a standard Sylvester equation.
So, using this method you just solve two $n \times n$ Sylvester-ish equations instead of one $2n \times 2n$ equation. There might be something smarter lurking in here but I have not found it yet.