# Convex set and convex functions

1. Jan 26, 2012

### kingwinner

Theorems about convex functions often look like the following:
Let f: S->R where S is a convex set.
Suppose f is a convex function.......

So here are my questions:

1) For a convex function, why do we always need the domain to be convex set in the first place?

2) Can a convex function be discontinuous?

Thanks for any inputs.

2. Jan 26, 2012

### chiro

Hey kingwinner.

For number 2 the answer is yes.

The reason is that convex sets themselves can be discontinuous. The easiest example to consider is a two-dimensional convex polygon. You can use a variety of ways to describe these and one is in term of the Jordan crossing theorem. All that really says is that if you draw a line from any point inside the polygon to any point outside, it only crosses the boundary once. You can extend this idea to any dimension for polygons in that dimension.

Its easy to just draw a linear function with two parts where the first part has a lower (but still positive) gradient than the second part and use the polygon example or otherwise to see why.

For number 1 I can't say for sure. I think you might have to prove this one.

One suggestion that I have is to consider a paraboloid (sp?) in three dimensions or an object that has a parabola of varying types as its cross section in both x-z and y-z planes. This is a simple convex function.

Now using something like contour lines you might be able to visualize a situation where a convex domain still has the property of the function being convex. Its probably not a substitute for a proper proof, but you might be able to find a counterexample quickly.

3. Jan 28, 2012

### kingwinner

Definition: A real valued function f:X->R defined on a convex set X in a is called convex if, for any two points x_1 and x_2 in X and any t E [0,1],
f(t x_1 + (1-t) x_2) ≤ t f(x_1)+(1-t)f(x_2)

Look at the definition of convex function above, they always have f defined on a "convex set" in the first place, THEN they start talking about convex functions. My question is: why do we always need the domain of f to be a "convex set" in order to talk about a convex function?

Thanks.

4. Jan 28, 2012

### micromass

Because $tx_1+(1-t)x_2$ need to lie in the domain of the function f. Otherwise this function is not well defined.

5. Jan 28, 2012

### kingwinner

I see, that makes sense. If the domain is not a convex set, then it doesn't even make sense to talk about convex function.

So in general, to prove that a function is convex, we always have to first prove that the domain of the function is a convex set in the first place, is that right?

6. Jan 28, 2012

Indeed!!