Are all quadratic functions convex and vice versa or are quadratic functions just one type of convex function? If so, could someone please provide examples of functions that are convex but not quadratic?
Asked
Active
Viewed 3,404 times
2 Answers
5
Not all quadratic functions are convex. For instance, $f(x)=-x^2$ is not convex. And not all convex functions are quadratic, like $f(x)=e^x$.
Julián Aguirre
- 76,354
-
Thank you Julian, Sorry I should have been more clear in my question, but are all quadratic functions either convex or concave? I think the answer is yes but just wanted to confirm. – miggety Mar 27 '17 at 18:32
-
1Quadratic functions of one variable $ax^2+bx+c$ are convex if $a>0$ and concave if $a<0$. This is no longuer true in several variables, as the example $f(x,y)=x^2-y^2$ shows. – Julián Aguirre Mar 27 '17 at 22:18
2
Any quadratic form generalized to $n$ dimensions is of the form $$f(\mathbf x) = \frac{1}{2}\mathbf x^TA\mathbf x + b^T\mathbf x + c$$ This is convex when A is a positive definite matrix.
Dhanvi Sreenivasan
- 5,637
-
Thanks Dhanvi, that makes sense and i'm assuming if a is negative definite then the quadratic would be concave. is that correct? What resource would you recommend for a refresher on this material? I've seen it expressed as xAx but not sure where the 1/2 in the formula comes from. Can you please recommend a book? – miggety Mar 27 '17 at 18:36
-
I'm currently doing a course on Convex Optimization, which uses these concepts. Convex Optimization by Boyd and Vandenberghe covers these topics well enough I guess. – Dhanvi Sreenivasan Mar 29 '17 at 03:26
-
May you please explain what it the purpose of dividing the first term to 2? – m.taheri Oct 27 '20 at 14:00
-
For an elegant representation of it's derivative.. nothing more than that – Dhanvi Sreenivasan Oct 28 '20 at 06:21