# Complex semidefinite matrix

How to definite a variable W in cvx, it is a complex and semidefinite matrix, but it may be not a hermitian matrix.

In most contexts, the term “semidefinite” implies Hermitian symmetry. CVX adopts this convention. Therefore, real semidefinite matrices must be symmetric, and complex semidefinite matrices must be Hermitian.

Some definitions of semidefiniteness allow for non-symmetry, but you can always relate those definitions back to the symmetric form. For example, consider the real case: a matrix A\in\mathbb{R}^{n\times n} is positive semidefinite if

$$x^TAx\geq 0\quad\forall x\in\mathbb{R}^n.$$

Note the following equivalence:

$$x^TAx\geq 0\quad\Longleftrightarrow\quad x^TAx+x^TA^Tx\geq 0\quad\Longleftrightarrow \quad x^T(A+A^T)x\geq 0$$

So every nonsymmetric real semidefinite matrix is closely related to a symmetric one. The space of such matrices can be represented with the following CVX code:

variable A(n,n)
A + A' == semidefinite(n)


Obviously, a similar thing can be done for complex matrices:

variable A(n,n) complex
A + A' == complex_semidefinite(n)


And if you also want to enforce non-Hermitian symmetry, you can do this:

variable A(n,n) complex
A + A' == complex_semidefinite(n)
A == A.'


Note the use of the non-conjugated transpose operator .' above. I can’t say this would produce a particularly useful set of matrices.