# A doubt with an example

Hello,

Looking in some examples provided with TFOCS (solved first with CVX) as “test_psdCompletion.m”, I do not understand why if you are solving the following problem:

`````` minimize (1/2)*norm( A * X - b )^2
st		 X >= 0
trace(X) <= lambda
``````

in the following way

``````objective    = @(X) sum_square( X(omega) - b )/2;
cvx_begin
variable Xcvx(N,N)
minimize objective(Xcvx)
subject to
Xcvx == semidefinite(N)
trace(Xcvx) <= lambda
cvx_end
``````

In the upper problem you have a matrix multiplication A*X that you want to be as close as possible to b.

But in the lower problem you are setting that X in some indices (omega) has to be as close as possible to b.

I do not get it.

Thanks

The particular example that is being formulated in CVX uses a simple “sampling” operator for A. That is, A(X) = X(\Omega). If X were a vector, then you can construct a matrix representation of A simply by selecting the rows of the identity matrix corresponding to the indices in \Omega.

Ok thanks.
So A*X is not a matrix multiplication as I thought. If the problem that I want to solve with TFOCS is like the upper problem but with a matrix multiplication. From which example should I work?