I have a n-dimensional decision variable “x” that has two components “x1” (dimension "d1) and “x2” (dimension “d2”) such that “d1 + d2 = n”.

I also have a (n x n)-correlation matrix between variables (x1, x2): C = [C1 C12;C12’ C2] with C1 being “d1 x d1”, C12 being “d1 x d2”, and C2 being “d2 x d2”.

x1 has constraints on it.

I am trying to impose a constraint on x2 so that its correlation to x1 (in addition to its constraint) is minimized, i.e., the optimizer will put positions in elements of x2 that are negatively correlated to (most of) elements in x1. Thus, I was thinking to enforce “x1’*C12*x2 <= 0” but would get an error that C12 is not square (and d1 =/= d2). Was there another re-formulation I could have tried to meet this requirement? thank you.