# Unbounded SDP optimal solution

I am trying to find the sum of 2 smallest eigenvalues using CVX.
I know you would say it is not a convex problem. but if you consider the
hypograph of the problem then it is convex problem and the maximizing it
would be ok.
I have the following model. B is incidence matrix, L is Laplacian matrix,

n = 8;
k = 2;
B = [ 1  0  0  1  0  0  0  0  0  0  0  0  0;
-1  1  0  0  1  1  0  0  0  0  0  0  1;
0 -1  1  0  0  0  0  0 -1  0  0  0  0;
0  0 -1  0  0 -1  0  0  0 -1  0  0  0;
0  0  0 -1  0  0 -1  1  0  0  0  0  0;
0  0  0  0  0  0  1  0  0  0  1  0  0;
0  0  0  0  0  0  0 -1  1  0 -1  1 -1;
0  0  0  0 -1  0  0  0  0  1  0 -1  0];
L = B *B';
cvx_begin sdp
variable Z(n,n) symmetric
variables lambda mu
maximize (k * lambda + trace(eye(n) * Z))
subject to
L - lambda * eye(n) - Z - mu * ones(n,n) == semidefinite(n);
Z == semidefinite(n);
cvx_end


It is unbounded(+Inf), But as someone can say it has to have 2.8860 solution. Because by finding eigenvalues separately you get this.

Actually, it is indeed well known in the literature that the sum of the k largest eigenvalues of a symmetric matrix is convex, and the sum of the k smallest eigenvalues is concave. So you’re good there. But there simply must be something wrong with your formulation, because the model you’re using here is quite clearly unbounded. The value of lambda is free to approach -\infty and can thereby ensure that your first LMI constraint is positive semidefinite for any values of Z and mu.

@mcg: Thanks a lot. Yeah I had some changes. The sign for the trace term in the objective function should be minus and (-Z) should be replaced by (+Z) in the constraints.
everything is going to be ok in this way.