I was wondering if linear function is convex or concave? For example f(x)=x, is function whose second derivate is 0 so we cant tell anything using this criteria. Can someone help?
Asked
Active
Viewed 5.7k times
24
-
1take any two points on the graph... where would be the line joining those two points present? – Dec 18 '13 at 12:06
2 Answers
29
A linear function is both. Use this definition of convexity:
For any two points $x_1$ and $x_2$ $$\forall a \in [0,1] \quad f(ax_1 + (1-a)x_2) \leq af(x_1) + (1-a)f(x_2)$$
Flip inequality for concave. Do you see why linear is both?

Gautam Shenoy
- 10,318
-
I don't get it. Linear is supposed to be f(cx1+bx2) = cf(x1) + bf(x2) where c and b are real numbers and x1 and x2 are elements of the domain/I/interval/whatever right? The definition of convex and concave use a and 1-a which only covers numbers in [0,1] so how are we extending this to all real numbers from just [0,1]? – BCLC Dec 16 '14 at 20:15
-
3Exactly my point. To prove convexity, you simply pick the coefficients as mentioned above. Convexity requires that coefficints be in $[0,1]$. Linearity covers this and far more!! That too with equality. – Gautam Shenoy Dec 18 '14 at 03:27
-
Hahaha sorry. I misread the question. Linear is convex and concave but the link to the answer below says iff – BCLC Dec 18 '14 at 07:03
11
-
I don't get it. Linear is supposed to be f(ax1+bx2) = af(x1) + bf(x2) where a and b are real numbers and x1 and x2 are elements of the domain/I/interval/whatever right? The definition of convex and concave uses $\lambda$ and 1-$\lambda$ which only cover numbers in [0,1] so how are we extending this to all real numbers from just [0,1]? – BCLC Dec 16 '14 at 20:14
-
I don't think you need to extend to all real numbers. You already know that it's true for all real numbers which implies it's also true for [0, 1]. – confused00 Nov 05 '16 at 14:21