Dimension reduction using equality constraints on a simplex-constrained linear system

March 14, 2024

This page is to distill an algebra slog I’ve been doing that is useful for some optimization spaces. Less dimensions is usually better, and we can use equality constraints to express some parameters and combinations of others, and essentially work in a lower dimensional space. Maybe there’s a better way to use this using a more general linear algebra approach but the algebra for this cases was doable enough in a short time.

Say we are working in some linear system, in my case I’ve been doing optimization where the objective function is determined experimentally and not analytically.

In the base case we have continuous real parameters xi, iI, with lower and upper bounds for each, Li and Ui. And usually we’ll have some linear constraint.

IcixiCLixiUiiI

The simplex constraint

Now let’s introduce the simplex constraint, the sum of parameters equals some total T.

Ixi=TIcixiCLixiUiiI

Let’s select a parameter to remove from the search space, x1. Using (3), we can express it as a function of the other parameters,

x1=TI1xi

Subbing this value into (4) and the i=1 constraint of (5), we get the new space to work in:

I1(cic1)xiCc1TTU1I1xiTL1LixiUiiI1

The simplex constraint and one additional linear equality constraint

Now let’s introduce a linear equality constraint.

Ixi=TIaixi=AIcixiCLixiUiiI

Using equations (10) and (11), we can extract parameters x1 and x2 as a function of the other parameters. Not for the following to work, we require that a1a2.

x1=a2TAa2a1I1,2a2aia2a1xix2=Aa1Ta2a1I1,2aia1a2a1xi

Subbing this value into (12) and the i=1,2 constraints of (13), we get the new space to work in:

I1,2(cic1a2c2a1(c1c2)aia2a1)xiC(c1a2c2a1)T(c1c2)aia2a1a2TAa2a1U1I1,2a2aia2a1xia2TAa2a1L1Aa1Ta2a1U2I1,2aia1a2a1xiAa1Ta2a1L2LixiUiiI1,2

The simplex constraint and two additional linear equality constraints

Let’s have two equality constraints.

Ixi=TIaixi=AIbixi=BIcixiCLixiUiiI

This can get away from us very quickly. But if we are wise and want to avoid too much algebra, we can carefully select things so that

a1=0a20b1,b2=0b30

Then things fall out nicely from (20), (21), and (22). We can express x1,x2,x3 explicitly in terms of the other parameters.

x1=TAb3+(a2a3)Ba2b3I1,2,3(1aib3+(a2a3)bia2b3)xix2=Ab3a3Ba2b3I1,2,3aib3a3bia2b3xix3=Bb3I1,2,3bib3xi

Subbing these values into (23) and the i=1,2,3 constraints for (24) we get the new space to work in

I1,2,3[cic1c2c1a2aia2c3a3c2(a2a3)c1a2b3bi]xiCc1Tc2c1a2Aa2c3a3c2(a2a3)c1a2b3BT1a2Aa2a3a2b3BU1I1,2,3(11a2aia2a3a2b3bi)xiT1a2Aa2a3a2b3BL1Ab3a3Ba2b3U2I1,2,3(aib3a3bi)xiAb3a3Ba2b3L2Bb3U3I1,2,3bixiBb3L3LixiUiiI1,2,3