KKT stationarity condition in simple SDP This question is part of my continuing efforts to answer my original question in A puzzling KKT for LMI vs. scalar constraint.
Consider an SDP
\begin{align}
&\min  - \text{Tr}(P)\\
&\ \ \text{s.t.} 
\begin{pmatrix}
A^TP + PA +C^TPC + Q & PB + C^TPD \\
B^T P + D^TPC& R+D^TPD
\end{pmatrix}\succeq0, P\succeq0
\end{align}
In a paper, they define a dual variable as
\begin{align}
Z= \begin{pmatrix}  
S&U^T&0\\
U&T&0\\
0&0&W
\end{pmatrix},
\end{align}
and claim that
\begin{align}
AS+SA^T + CSC^T + BU + DUC^T + U^TB^T + CU^TD^T + D^TTD + W + I=0.
\end{align}
By computing the KKT stationarity condition, we get that the Trace of this equation is zero rather than its argument. What am I missing?
I will be happy for help about this step and two more related questions:

*

*How will the equation change if we change to objective to $-\text{Tr}(R+D^TPD)$.

*Is it a standard SDP? I learned that the objective should be expressed as $c^Tx$.

 A: You can write the primal as:
\begin{align}
&\min  - \text{Tr}(P)\\
&\ \ \text{s.t.} 
\begin{pmatrix}
A^TP + PA +C^TPC + Q & PB + C^TPD & 0 \\
B^T P + D^TPC& R+D^TPD & 0 \\
0 & 0 & P
\end{pmatrix}\succeq0
\end{align}
The Lagrangian is:
\begin{align}
L(P,Z) = - \text{Tr}(P) - \langle 
\begin{pmatrix}
A^TP + PA +C^TPC + Q & PB + C^TPD & 0 \\
B^T P + D^TPC& R+D^TPD & 0 \\
0 & 0 & P
\end{pmatrix} , Z \rangle
\end{align}
If you take the derivative with respect to $P$ you obtain the stationarity condition:
\begin{align}
0&=\frac{\partial L(P,Z)}{\partial P}\\
&=  - \frac{\partial}{\partial P} \left\{\text{Tr}(P) + \text{Tr} \left(S^T(A^TP+PA + C^TPC+Q) + U(PB+C^TPD))\right)\right\}\\
&\ \ \ \ \  - \frac{\partial}{\partial P} \left\{ \text{Tr}\left(U^T(B^TP+D^TPC) + T^T(R+D^TPD) + P^TW)\right)\right\}.
\end{align}
By using the general relation $\frac{\partial}{\partial P} \text{Tr}(\Gamma P \Lambda) = \frac{\partial}{\partial P} \text{Tr}(\Lambda\Gamma P ) = \Lambda^T\Gamma^T$ for any $\Lambda,\Gamma$ and the cyclic trace property, we get:
\begin{align}
0&= I + AS + SA^T + CSC^T + U^TB^T + CU^TD^T + BU + DUC^T + DTD^T+ W.
\end{align}
As for your other questions:

*

*the $I$ at the end will become $DD^T$

*there is no 'standard' SDP, but an SDP in standard form is:
$$\min_{X \succeq O} \{ \text{Tr}(CX) : \text{Tr}(A_iX)=b_i, \; i=1,\ldots,m\}$$
so clearly the given SDP is not in standard form. You can always reformulate it into standard form though (using a different choice for $X$).

