# Formulating Linear Constraints on a Matrix

1. Jun 1, 2010

### JeSuisConf

Hi everyone. I have this problem which I am trying to formulate. Basically, I have the following linear constraints:

$$p_{11} = 2$$
$$p_{22} = 5$$
$$p_{33}+2p_{12}=-1$$
$$2p_{13} =2$$
$$2p_{23} = 0$$

And these are for the symmetric matrix

$$\mathbf{P} = \left( \begin{array}{ccc} p_{11} & p_{12} & p_{13} \\ p_{12} & p_{22} & p_{23} \\ p_{13} & p_{23} & p_{33} \end{array} \right)$$

I would like to formulate a way to represent the linear constraints and $$\mathbf{P}$$ as a matrix at the same time.

I can do this using $$\mathbf{P}$$ or a vector of the entries of $$\mathbf{P}$$. The linear constraints are easy if I use a vector ($$\mathbf{Ap}=\mathbf{b}$$, but then I don't know how to represent $$\mathbf{P}$$ as a matrix from the vector! And if I leave $$\mathbf{P}$$ as a matrix, all the constraints are easy to formulate except $$p_{33}+2p_{12}=-1$$. Can anyone help me figure this out?

If anyone's curious, I'm trying to solve for $$\mathbf{P}$$ over the cone of PSD matrices using SDP. But I am entirely new to SDP and I'm scratching my head formulating this problem. I feel stupid right now :'(

2. Jun 1, 2010

### JeSuisConf

I answered my own question... and the answer has to do with algebraic dependence in the structure of the problem, and how SDP problems are formulated. I just thought I was missing something obvious ... hence my convoluted search.

3. Jun 1, 2010

### HallsofIvy

Well, I'm glad you answered it. It looks simple to me: I you let $p_{12}= p$ then $p_{33}= -1- 2p$ and all other values are essentially given:
$$\begin{pmatrix}2 & p & 1 \\ p & 5 & 0 \\1 & 0 & -1-2p\end{pmatrix}$$

4. Jun 1, 2010

### JeSuisConf

That's exactly what came out in the end. I'm not sure why I didn't see it at first... I always seem to manage to do things in the most roundabout way.