I know that functions $x \mapsto x^2$ and $x \mapsto 2^x$ are convex. If I use multiple variables, e.g., $$f (x_1, x_2, x_3) := x_1^2 + x_2^2 + x_3^2, \qquad g (x_1, x_2, x_3) := 2^{x_1} + 2^{x_2} + 2^{x_3}$$ would these functions also be convex?
Asked
Active
Viewed 61 times
1 Answers
1
Given the way you are defining the functions, yes these would be convex. In fact this would be true for any $n\in\mathbb{N}$. That is, $$ f(x_1,...,x_n) = x_1^2 + \cdots + x_n^2 $$ is a convex function. This follows from the fact that the sum of convex functions is convex.
More generally if $g_1,...,g_n:\mathbb{R}\to\mathbb{R}$ are all convex, then any function of the form $$ f(x_1,...,x_n) = g_1(x_1) + \cdots + g_n(x_n) $$ is also convex by the same reasoning.
Highlander13
- 370