0

The convex and affine function definition I am seeing is this: $f:R^n \to R$ is convex if $dom f$ is a convex set and if for all $x,y\in domf$, and $\theta$ with $0\leq\theta\leq 1$, we have $f(\theta x+(1-\theta)y)\leq\theta f(x)+(1-\theta)f(y)$

For an affine function we always have equality, $f(\theta x+(1-\theta)y)=\theta f(x)+(1-\theta)f(y)$

My confusion comes from, why convex function require its domain to be convex, and why affine function does not require anything about its domain(at least I cannot find anywhere mentioning)?

I was thinking about a function f(x)=2x with doamin $(-\infty,1]\cup[2.\infty)$

Then, when $x=1,y=2\in domf$ this equation does not hold properly: $f(\theta x+(1-\theta)y)=\theta f(x)+(1-\theta)f(y)$ because $\theta x+(1-\theta)y)$ is not in $domf$

Doesn't it mean, we also should specify some requiresments for domain of affine functions?

1 Answers1

0

If the domain is not convex then $f(\theta x + (1-\theta)y$ will not be well-defined for all $\theta$. The affine requirement is much stronger however since it demands both equality and has no constraints on $t$. This will force the domain to be affine to ensure the function is well-defined just as with convexity.

We can interpret the affine condition geometrically as well. We say that a function $f(x)$ is concave if $-f(x)$ is convex. This means that for a concave $f(x)$ that we have $-f(\theta x + (1-\theta)y) \leq -\theta f(x) -(1-\theta)f(y)$ so that $f(\theta x + (1-\theta)y \ge \theta f(x) + (1-\theta) f(y)$ which is simply the convex condition with the inequality reversed.

So this means the equality condition will be satisfied if and only if the function $f(x)$ is both concave and convex. Since a function is convex if and only if its epigraph is convex we can see geometrically that we need to be able to mirror the graph of an affine function and maintain convexity which forces flatness.

The second derivative test is lurking in the background here as well. Since we need the Hessian to be positive semi-definite to ensure convexity which means for a concave function $f(x)$ that $-f(x)$ is convex implying $f(x)$ itself is negative semi-definite. The only number that is both non-negative and non-positive is zero meaning that the for the hessian $H$ we have $x^THx = 0$ for all $x$ implying $H$ is the zero matrix. If we go back to first year calculus we have now said that the second derivative is zero, and this means the function is of the form $Ax+b$ for constants $A$ and $b$, which is affine as expected.

CyclotomicField
  • 11,018
  • 1
  • 12
  • 29