I am trying to write a biological model that models protein interaction. I am having an issue with one aspect. Lets say protein A and protein B interact with eachother to form complex AB. Now every A molecule and B molecule will come together to form AB. The amount of AB formed is described by a constant k where $$ k=\frac{(free A)*(free B)}{(complexed AB)} $$ When there are just two components that interact in a one to one manner, it is easy to calculate the amount of free A, free B, and complexed AB when the total amount of A and B, and k are known. However, lets say there is a mixture of containing A1, A2, B1, and B2. Now you can have either A1B1, A1B2, A2B1, and A2B2 forming, each with their own k. This gives a set of equations:
$$ k_{11} = \frac{(free A_1)(free B_1)}{(complexed A_1B_1)} $$ $$ k_{12} = \frac{(free A_1)(free B_2)}{(complexed A_1B_2)} $$ $$ k_{21} = \frac{(free A_2)(free B_1)}{(complexed A_2B_1)} $$ $$ k_{22} = \frac{(free A_2)(free B_2)}{(complexed A_2B_2)} $$
Which are are connected by the concentration of free A and B. I cannot come up with a formula to find the free As, free Bs, and complexed ABs in this scenario with the total concentration of the As and Bs, and each k. I may be asking a bit much, and this may be a bit ambiguous, but I would be happy to provide more information if needed, and I would be more than happy if someone could so much as point me in the right direction to figure this out.