Is piecewise linear function necessarily convex?

1.3k Views Asked by At

In one of his lectures on convex functions, Stephen Boyd claimed piecewise linear functions are convex because a piecewise linear function can be thought of as pointwise maximum of a set of affine functions. However, I am unable to agree to this.

For example, in $\mathbb{R}^2$ , if the slopes of consecutive pieces are non-decreasing I could write it as a pointwise maximum of affine functions.But, in my understanding, the slopes can decrease as well when you move from one piece to the next.

Can someone fill the gaps in my understanding?

1

There are 1 best solutions below

0
On

I had the same question myself. Nonetheless,thinking more about it, I realized that what was maybe missing on your statement (and on my own previous reasoning) is that this is only valid on the intersection of the piecewise affine function domains (Convex Optimization, Section 3.2.3 - page 80). If we neglect this part, what you said is right and we do not have the convexity property of pointwise maximum for piecewise affine functions. On the other hand, if we look at it in this way we are not fulfilling all the assumptions to be able to imply the convexity property of the pointwise maximum of affine functions.