# Matrix Singularity Constraint

I'm using CVXPY. Given a $$2\times2$$ matrix $$A$$, is it possible to add a singularity constraint?

Anything equivalent to:

• $$|A| = 0$$: The determinant is $$0$$
• $$\operatorname{rank}(A) \leq 1$$
• Smallest eigenvalue is $$0$$
• etc...
• X-posted. I would expect someone with some 15K rep points on SO to know the etiquette. Mar 26 at 12:43
• @RodrigodeAzevedo Yes, I'm aware - it's just that this site is a better fit but still in Beta so I wasn't sure about the right place to put it... I should have at least put a cross-link. Sorry. Mar 26 at 12:45
• Try to use the nuclear norm instead of the rank. It is convex, at least. Mar 26 at 13:50
• With proper scaling this does seem to do the trick when I put it in the objective and minimize it. It does not let me create a constraint with it though. Mar 26 at 14:48
• I don't have the big picture. If you edited your question and showed all your work and made an effort to present it clearly, it would be easier for everyone. Mar 26 at 15:15

• No, you're still looking at the coordinate axes in the special case, but now constrained to a box. In general for a 2x2 matrix you have a quadratic equality $a_1 a_4-a_2 a_3 = 0$ Mar 26 at 11:09