# Cvx error when multiply with -1j

Hi,
I have a scalar that is convex and real, lets say “x”.
when trying to multiply it with -1jx I get the following error:
Disciplined convex programming error:
Cannot perform the operation: {complex affine} .
{convex}

Now although some may argue that -1j is in fact a affine function, I should note that multiplying x by real scalar is fine.
Am I missing something?

http://cvxr.com/cvx/doc/dcp.html#expression-rules

• A valid convex expression is
• a valid constant or affine expression;
• a valid call to a function in the atom library with a convex result;
• an affine scalar raised to a constant power p≥1
, p≠3,5,7,9,…* * ;
• the sum of two or more convex expressions;
• the difference between a convex expression and a concave expression;
• the product of a convex expression and a nonnegative constant;
• the product of a concave expression and a nonpositive constant;
• the negation of a concave expression.
• A valid concave expression is
• a valid constant or affine expression;
• a valid call to a function in the atom library with a concave result;
• a concave scalar raised to a power p∈(0,1)
• ;
Let `x` be a CVX variable. Consider the convex expression `x^2`. Then consider the expression `2*x^2`; that is also convex. What is the convexity of `1j*x^2` or `-1j*x^2` ; they are neither convex nor concave, so CVX will not allow them.