# How to formulate the eigenvalue maximization problem in CVX

I just started to use CVX to solve some optimization problem, now, I got an eigenvalue maximization problem like this: let A \in R^{n \times n} is Hermitian and b \in R^{n \times 1} is a column vector, I want to find best b with constraint 1^T b = 1 such that the smallest eigenvalue of (A+bb^T) is maximized, i.e.,

\max\limits_{b} \min\limits_{\|x\|=1} x^T (A+bb^T) x subject to 1^T b = 1

so how should I write this max-min problem in CVX, thanks!

EDIT: Here is Mark L. Stone’s answer (note I can’t post an answer because I can’t post two answers, and I deleted my original answer, but the board apparently still is “charging me” for that answer which I can’t edit).

CVX has a built-in function lambda_min. Unfortunately, min eigenvalue of A+b*b’ is not concave, so you are out of luck with CVX. Indeed, it can readily be seen by example that your objective function, even when restricted per the constraint on b, is not concave, i.e., your optimization problem specification is not convex.

You can formulate and solve this problem to local optimality using YALMIP with the solver PENLAB as follows (make sure you are using YALMIP’s lambda_min, not CVX’s), which is minimizing the negative of the objective function you want to maximize:

b=sdpvar(n,1)
solvesdp(sum(b)==1,-lambda_min(A+b*b'),sdpsettings('solver','penlab'))


You can specify a non-default starting value for b by use of assign and usex0.