For a semidefinite program (SDP) with a linear matrix inequality (LMI), we can write it as follows.
$$ \begin{array}{ll} \underset {x \in {\Bbb R}^n} {\text{minimize}} & c^T x \\ \text{subject to} & G + x_1 F_1 + x_2 F_2 + \dots + x_n F_n \preceq 0 \\ & A x = b \end{array} $$
where $G, F_1, F_2,\dots, F_n \in S^k$ and $A \in {\Bbb R}^{p \times n}$. I want to transform above form to SDP of standard form:
$$ \begin{array}{ll} \underset {X} {\text{minimize}} & \operatorname{tr} (C X) \\ \text{subject to} & \operatorname{tr} (A_i X) = b_i, \quad i=1,2,\dots,p \\ & X \succeq 0 \end{array} $$
where $C, A_1,\dots,A_p \in S^n$. Suppose $$ A = \begin{bmatrix} a^T_1 \\ a^T_2 \\ \vdots \\a^T_p\end{bmatrix}$$ I tried to diagonalize $c,x,a_i$ such that:
$$ C = \operatorname{diag}(c), \quad X = \operatorname{diag} (x), \quad A_i = \operatorname{diag}(a_i) $$
but I cannot figure out how satisfying constraint $X \succeq 0$. So, what is the trick?