Expression of biquadratic function

I am a beginner in CVX and I have read the reference guide and the DCP ruleset, but I cannot find any useful information. Could anyone help me with this problem?

In my objective function, there is an expression of v’R_Av*v’R_Bv, where R_A and R_B are both Hermitian matrices. So this part should be a biquadratic function of the variable v and it should be convex, but it seems that CVX cannot accept it and it shows:
Disciplined convex programming error:
Cannot perform the operation: {convex} .* {convex}
Can anyone offer me some hints to deal with this problem? Thanks in advance.

It should be convex!

How do you prove that statement?

Most likely the proof will tell you how to solve the problem.

Thank you for your reply. I think it could compared with Ax^2*Bx^2(where A and B are positive constant) for scalar. And my expression is an extension this biquadratic form to a complex vector situation. Is there any problem in this analog?

You can choose the matrices in such a way that your expression becomes v_1^2v_2^2, which is not convex.

I am still curious how do you get this conclusion. We only have one variable vector v and the matrices between them are Hermitian, so I think it is more like the biquadrate ABx^4 rather than ABx1^2x2^2. Could you please give me a more intuitive example? Thanks a lot.

By the way, I have another term ( v’ R_A v)^2, which is equivalent to v’ R_A vv’ R_A v and it can be achieved by square_pos( v’ R_A v) thus accepted by CVX as a convex function. I think there is no big difference when we exchange a R_A with R_B. Is there any problem?

CVX examines each single product of affine expressions, and each single squaring of an affine expression, checking for convexity; it will not check, for example, sums of products of affine expressions. For example, given scalar variables x and y, the expression
x ^ 2 + 2 * x * y + y ^2
will cause an error in CVX, because the second of the three terms 2 * x * y, is neither convex nor concave. But the equivalent expressions
( x + y ) ^ 2 ( x + y ) * ( x + y )
will be accepted.

The above paragraph was copied from the DCP ruleset document and it may be related to my problem, FYI.

You’re correct that 2*x*y is neither convex nor concave. Well neither is x^2*y^2 (which is quite different than x^4), which I believe is @Michal_Adamaszek 's point. I.e., that x^2*y^2 is a special case of the biquadratic, and it is not convex.

You think there is no big difference when we exchange a R_A with R_B. Well, it’s the difference between convex and non-convex.

Thank you very much. I can get your point that to view v’R_Av as x^2 and view v’R_Bv as y^2. But what really confuses me is that even when R_A and R_B are both known and fixed matrices, this expression still cannot be considered as AB*x^4? I mean there is only one variable v. It is hard to understand.

v is a vector. What you are saying is true only if the length of the vector is 1.

v(1) is just as different from v(2) as x is from y.

v(1)^2*v(2)^2 is the same thing (from CVX’s and convexity’s point of view) as x^2*y^2. That is different than v(1)^4 or x^4.

OK, I got it. Thank you for your patient response.