# Using SemidefiniteOptimization with a partial-ordering constraint

I'm running into an issue enforcing a particular constraint on the variables of a SemidefiniteOptimization problem (I'm using Mathematica 12.3).

Specifically, it seems that if a matrix $$A$$ and a vector $$u$$ are variables, one cannot directly enforce the constraint $$A \geq u u^T$$:

A = {{a[1, 1], a[1, 2]}, {a[1, 2], a[2, 2]}};
U = {{u}, {u}};
SemidefiniteOptimization[a[1, 1] + 2 a[1, 2] + a[2, 2],
{VectorGreaterEqual[{A, U.Transpose[U]}, {"SemidefiniteCone", 2}],
u - u == 1}, {a[1, 1], a[1, 2], a[2, 2], u, u}]


results in an error "SemidefiniteOptimization::ctuc: The curvature (convexity or concavity) of the term {u^2,u u} in the constraint ... could not be determined."

This particular issue can be remedied by an equivalent formulation, notably

$$A \geq u u^T \quad \text{if and only if} \quad \begin{pmatrix} A & u \\ u^T & 1 \end{pmatrix} \geq 0. \qquad (*)$$ For example,

soln = SemidefiniteOptimization[a[1, 1] + 2 a[1, 2] + a[2, 2],
{VectorGreaterEqual[{ArrayFlatten[{{A, U}, {Transpose[U],1}}], 0}, {"SemidefiniteCone", 3}],
u - u == 1}, {a[1, 1], a[1, 2], a[2, 2], u, u}];
(* succeeds *)
Eigenvalues[A - U . Transpose[U] /. soln]
(* {20.2665, -4.84524*10^-10}, i.e., A >= U U^T upto numerical errors *)


In my application, the constraint I want to impose is actually $$A \leq uu^T$$. Trying the direct method results in a similar error message about being unable to determine the nature of the constraint.

Can anyone provide guidance on how to coax Mathematica's SemidefiniteOptimization routine to be able to enforce this constraint more directly? Any insights from the community here would be much appreciated.

• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. Jul 30, 2021 at 4:24

The constraint $$A \leq u u^T$$ is non-convex in the variables $$A$$ and $$u$$. As such, the goal of the posted question is not possible: non-convex constraints cannot be straightforwardly applied to semidefinite programming.