Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Convex function
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples== ===Functions of one variable=== * The function <math>f(x)=x^2</math> has <math>f''(x)=2>0</math>, so {{mvar|f}} is a convex function. It is also strongly convex (and hence strictly convex too), with strong convexity constant 2. * The function <math>f(x)=x^4</math> has <math>f''(x)=12x^2\ge 0</math>, so {{mvar|f}} is a convex function. It is strictly convex, even though the second derivative is not strictly positive at all points. It is not strongly convex. * The [[absolute value]] function <math>f(x)=|x|</math> is convex (as reflected in the [[triangle inequality]]), even though it does not have a derivative at the point <math>x = 0.</math> It is not strictly convex. * The function <math>f(x)=|x|^p</math> for <math>p \ge 1</math> is convex. * The [[exponential function]] <math>f(x)=e^x</math> is convex. It is also strictly convex, since <math>f''(x)=e^x >0 </math>, but it is not strongly convex since the second derivative can be arbitrarily close to zero. More generally, the function <math>g(x) = e^{f(x)}</math> is [[Logarithmically convex function|logarithmically convex]] if <math>f</math> is a convex function. The term "superconvex" is sometimes used instead.<ref>{{Cite journal | last1 = Kingman | first1 = J. F. C. | doi = 10.1093/qmath/12.1.283 | title = A Convexity Property of Positive Matrices | journal = The Quarterly Journal of Mathematics | volume = 12 | pages = 283β284 | year = 1961 | bibcode = 1961QJMat..12..283K }}</ref> * The function <math>f</math> with domain [0,1] defined by <math>f(0) = f(1) = 1, f(x) = 0</math> for <math>0 < x < 1</math> is convex; it is continuous on the open interval <math>(0, 1),</math> but not continuous at 0 and 1. * The function <math>x^3</math> has second derivative <math>6 x</math>; thus it is convex on the set where <math>x \geq 0</math> and [[concave function|concave]] on the set where <math>x \leq 0.</math> * Examples of functions that are [[Monotonic function|monotonically increasing]] but not convex include <math>f(x)=\sqrt{x}</math> and <math>g(x)=\log x</math>. * Examples of functions that are convex but not [[Monotonic function|monotonically increasing]] include <math>h(x)= x^2</math> and <math>k(x)=-x</math>. * The function <math>f(x) = \tfrac{1}{x}</math> has <math>f''(x)=\tfrac{2}{x^3}</math> which is greater than 0 if <math>x > 0</math> so <math>f(x)</math> is convex on the interval <math>(0, \infty)</math>. It is concave on the interval <math>(-\infty, 0)</math>. * The function <math>f(x)=\tfrac{1}{x^2}</math> with <math>f(0)=\infty</math>, is convex on the interval <math>(0, \infty)</math> and convex on the interval <math>(-\infty, 0)</math>, but not convex on the interval <math>(-\infty, \infty)</math>, because of the singularity at <math>x = 0.</math> ===Functions of ''n'' variables=== * [[LogSumExp]] function, also called softmax function, is a convex function. *The function <math>-\log\det(X)</math> on the domain of [[Positive-definite matrix|positive-definite matrices]] is convex.<ref name="boyd" />{{rp|74}} * Every real-valued [[linear transformation]] is convex but not strictly convex, since if <math>f</math> is linear, then <math>f(a + b) = f(a) + f(b)</math>. This statement also holds if we replace "convex" by "concave". * Every real-valued [[affine function]], that is, each function of the form <math>f(x) = a^T x + b,</math> is simultaneously convex and concave. * Every [[norm (mathematics)|norm]] is a convex function, by the [[triangle inequality]] and [[Homogeneous function#Positive homogeneity|positive homogeneity]]. * The [[spectral radius]] of a [[nonnegative matrix]] is a convex function of its diagonal elements.<ref>Cohen, J.E., 1981. [https://www.ams.org/journals/proc/1981-081-04/S0002-9939-1981-0601750-2/S0002-9939-1981-0601750-2.pdf Convexity of the dominant eigenvalue of an essentially nonnegative matrix]. Proceedings of the American Mathematical Society, 81(4), pp.657-658.</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)