Can we minimize a scalar like x'Ay?

Why do I get error if I try to minimize a function of the form x’Ay where A is data matrix and x and y are some variable that I want to minimize. The actual code has many other function in minimization and many constraints. I ma just giving the function where I get complain. The complain is:

Error using cvx/quad_form (line 230)
The second argument must be positive or negative semidefinite.

Error in * (line 261)
[ z2, success ] = quad_form( xx, P, Q, R );

Any suggestion would be appreciated.

Please read Why isn't CVX accepting my model? READ THIS FIRST! and the book previously recommended to you.

Consider the special case of 1 dimension. Then your function is a*x*y . This is neither convex nor concave as a function of x and y, unless a = 0. You can see that by evaluating its Hessian. Things don’t get any better as the dimension is increased.

Would you please comment if I can convert it to convex by log transformation? I could not do it, but I have been told that I can like we do in geometric programming? Would you please help?

That trick only works in one dimension. I.e.,log(x*A*y) us concave if x and y are scalars and A is a positive (definite) scalar.

However, in higher dimensions,log(x'*A*y) is indefinite, i.e., neither convex nor concave.

The expression x’Ay can be expressed as (sum over k ) c_k x1^a1kx2^a2k…
For example [x1,x2]
[C1 C2;C3 C4]*[x3 x4]=C1x1x3+C3x2x3+C32x1x4+C4x2x4 . Here as you see one can express the function in posynomial form with a’s are either 0 or 1. Since I can write the x’Ay as posynomial form why I cannot convert it to convex form. Please help.

I don’t know what you’re doing. My previous reply stands. If you’re doing geometric programming, then follow CVX’s GP rules as documented at .