This post studies a specific chain rule of composition of convex functions. Specifically, we have the following theorem.

Theorem 1For a continuously differentiable increasing function , a convex function where is a convex set and an , if or , then

where is the operator of taking subdifferentials of a function, i.e., for any , and is the interior of with respect to the standard topology in .

**A negative example.** We note that if our condition fails, the inequality may not hold. For example, let for all and defined on . Then is a point which is not in the interior of , . However, in this case and . Thus, the equality fails.

It should be noted that if is open and is also differentiable, then the above reduces to the common chain rule of smooth functions.

*Proof:* We first prove that . We have for all ,

where are just the definition of subdifferential of at and at . We also use the fact that in the inequality as is increasing.

Now we prove the other direction. Without lost of generality, suppose such that is not empty. Let , we wish to show that is in the set . First according to the definition of subdifferential, we have

This gives

Rearranging the above inequality gives

for some between and by mean value theorem. Now, by letting , if is right continuous at , then by Lemma 1 in this post and is continuously differentiable, we know is nondecreasing in and we have

If , then dividing both sides of the above inequality by gives

This shows that is indeed a member of and thus . In this case, we only need to verify why must be right continuous at .

If , then is definitely continuous at and so is by standard result in convex analysis. If , then we are done by inequality (7). If , using the inequality (6), we have

Since , then can take a small positive and negative multiple of standard basis vectors in in the inequality (8). This shows and it indeed belongs to the set as for by standard convex analysis result.

Thus our task now is to argue why is indeed right continuous at . Using Lemma 4 in this post, we know the limit exists and . Now if , then is indeed right continuous at and our conclusion holds. So we may assume . But in this case is going to be negative infinity as . Recall from inequality (5), we have

where is between and . We claim that as , approaches a positive number. If this claim is true, then from the above inequality, we will have

which cannot hold. Thus we must have right continuous at .

Finally, we prove our claim that is approaching a positive number if . Using mean value theorem, we have for some

Now cancel the term above, we see that . We claim . If , then because is increasing, we have that is constant in as . This contradicts our assumption that and our proof is complete.