$\forall {\boldsymbol p}, {\boldsymbol w} \in A$ and $\forall \lambda \in \R$ we have $\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w} \in A$
$\forall {\boldsymbol p}, {\boldsymbol w} \in A$ and $\forall \lambda \in [0,1]$ we have $\lambda {\boldsymbol p} + \lambda {\boldsymbol w} \in A$
$\forall {\boldsymbol p}, {\boldsymbol w} \in A$ and $\forall \lambda \in [0,1]$ we have $\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w} \in A$
Explanation. Every convex combination of two points of the set, that is, every point of the segment joining them, must belong to the set. With $\lambda \in \R$ we would get the whole line.
Explanation. $\frac{1}{3}\cdot 1 + \frac{2}{3}\cdot 7 = 5$ and $\frac{1}{3}\cdot 4 + \frac{2}{3}\cdot 1 = 2$. The point $(3,3)$ comes from swapping $\lambda$ and $1-\lambda$; $(4, \frac{5}{2})$ is the midpoint.
Explanation. $\frac{1}{2}(0,0) + \frac{1}{4}(4,0) + \frac{1}{4}(0,8) = (1, 2)$. With all scalars equal to $\frac{1}{3}$ we would get the centroid $(\frac{4}{3}, \frac{8}{3})$.
Given three points ${\boldsymbol p}^{(1)}, {\boldsymbol p}^{(2)}, {\boldsymbol p}^{(3)} \in \R^n$, for which scalars $(\lambda_1, \lambda_2, \lambda_3)$ is the point $\sum_{k=1}^{3} \lambda_k {\boldsymbol p}^{(k)}$ a convex combination of them?
$(\frac{1}{2}, \frac{1}{3}, \frac{1}{6})$
$(\frac{1}{2}, \frac{1}{2}, \frac{1}{2})$
$(1, -\frac{1}{2}, \frac{1}{2})$
$(\frac{1}{5}, \frac{3}{10}, \frac{2}{5})$
Explanation. We need nonnegative scalars summing to $1$: $\frac{1}{2}+\frac{1}{3}+\frac{1}{6} = 1$. The other triples sum to $\frac{3}{2}$, have a negative scalar, or sum to $\frac{9}{10}$.
In $\R^2$, the set of all convex combinations of three non-collinear points (their convex hull) is:
the boundary (the three sides only) of the triangle with vertices at the three points
the set made of the three given points only
the disk bounded by the circle through the three points
the filled triangle (interior and sides) with vertices at the three points
Explanation. With $\lambda_1, \lambda_2, \lambda_3 \ge 0$ summing to $1$ we get all the points inside and on the boundary of the triangle; the sides correspond to the cases with one zero scalar.
Given a center ${\boldsymbol c} \in \R^2$ and a radius $r > 0$, what is the shape of the set $\{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - {\boldsymbol c}\|_1 \le r \}$?
a square centered at ${\boldsymbol c}$, with axis-aligned sides of length $2r$
a square centered at ${\boldsymbol c}$, with axis-aligned sides of length $r$
a diamond centered at ${\boldsymbol c}$, with vertices at distance $r$ along the axes
a disk centered at ${\boldsymbol c}$, bounded by a circle of radius $r$
Explanation. The points with $|x_1 - c_1| + |x_2 - c_2| \le r$ form a diamond whose vertices are at distance $r$ from ${\boldsymbol c}$ along the axes. The axis-aligned square is the ball of the norm $\infty$, the disk that of the norm $2$.
Explanation. The condition is $\max\{|x_1-2|, |x_2-1|\} \le 2$, that is, $0 \le x_1 \le 4$ and $-1 \le x_2 \le 3$: a square of side $2r = 4$. The diamond is the ball of the norm $1$; the square with vertices $(1,0), (3,0), (3,2), (1,2)$ has side $r$ instead of $2r$.
Explanation. It is a diamond centered at $(1,2)$ with vertices at distance $r = 2$ along the axes. The square $(-1,0), (3,0), \dots$ is the ball of the norm $\infty$; the other options use radius $1$ or $4$.
the intersection of convex sets is convex only if the sets are bounded
the intersection of two convex sets is convex only if one contains the other
the intersection of finitely many convex sets is convex
the union of two convex sets is convex
Explanation. If two points belong to all the $A_i$, every convex combination of them belongs to each $A_i$ (convex) and hence to the intersection. The union of two disjoint disks is not convex.
Explanation. The first set contains $(1,0)$ and $(-1,0)$, but their midpoint $(0,0)$ has norm $0 < 1$. The others are a ball, a half-plane and the intersection of two convex sets.
find a point of $\R^n$ that does not belong to $A$
find ${\boldsymbol p}, {\boldsymbol w} \in A$ such that $\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w} \notin A$ for every $\lambda \in [0,1]$
show that $A$ is unbounded
Explanation. The definition requires the condition for all pairs and all $\lambda$: one counterexample negates it. Asking it for every $\lambda$ is too much (the endpoints $\lambda = 0, 1$ always give points of $A$).
Given two distinct points ${\boldsymbol p}, {\boldsymbol w} \in \R^n$, for which values of $\lambda \in [0,1]$ does their convex combination $\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}$ coincide with ${\boldsymbol w}$?
$\lambda = 1$
$\lambda = \frac{1}{2}$
for no value of $\lambda \in [0,1]$
$\lambda = 0$
Explanation. With $\lambda = 0$ we get $0\cdot{\boldsymbol p} + 1\cdot{\boldsymbol w} = {\boldsymbol w}$; with $\lambda = 1$ we get ${\boldsymbol p}$, with $\lambda = \frac{1}{2}$ the midpoint.
In $\R^2$ let $A_1 = \{ {\boldsymbol x} : \|{\boldsymbol x}\|_\infty \le 1 \}$ and $A_2 = \{ {\boldsymbol x} : \|{\boldsymbol x} - \begin{pmatrix} 4 \\ 0 \end{pmatrix}\|_\infty \le 1 \}$ (two squares). Which computation shows that the union $A_1 \cup A_2$ is not a convex set?
$\begin{pmatrix} 0 \\ 0 \end{pmatrix} \in A_1$ and $\begin{pmatrix} 4 \\ 0 \end{pmatrix} \in A_2$, and their sum $\begin{pmatrix} 4 \\ 0 \end{pmatrix}$ does not belong to $A_1$
$\begin{pmatrix} 1 \\ 0 \end{pmatrix} \in A_1$, $\begin{pmatrix} 3 \\ 0 \end{pmatrix} \in A_2$, and with $\lambda = \frac{1}{2}$ we get $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$, which belongs neither to $A_1$ nor to $A_2$
$\begin{pmatrix} 1 \\ 0 \end{pmatrix} \in A_1$, $\begin{pmatrix} 3 \\ 0 \end{pmatrix} \in A_2$, and with $\lambda = \frac{1}{2}$ we get $\begin{pmatrix} 4 \\ 0 \end{pmatrix}$, which does not belong to $A_1$
the point $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$ has distance $2 > 1$ from both centers, so it does not belong to $A_1 \cup A_2$
Explanation. We need a convex combination of two points of the union that falls outside the union: $(2,0)$ has distance $2 > 1$ (in the norm $\infty$) from both centers. A point outside the set, alone, proves nothing.
Let $S = \{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x}\|_2 = 1 \}$ (the circle only). Which reasoning is correct?
$S$ is not convex: with ${\boldsymbol p} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$, ${\boldsymbol w} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$, $\lambda = \frac{1}{2}$ we get $\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}$, whose norm is $\frac{\sqrt{2}}{2} \ne 1$
$S$ is convex, because it is the boundary of the closed ball of radius $1$, which is convex
$S$ is not convex: with ${\boldsymbol p} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$, ${\boldsymbol w} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$ we get ${\boldsymbol p} + {\boldsymbol w} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$, whose norm is $\sqrt{2} \ne 1$
$S$ is convex, because it is defined by the norm $2$, which is a convex function
Explanation. The midpoint of two points of the circle lies inside the disk, not on $S$. The sum ${\boldsymbol p} + {\boldsymbol w}$ is not a convex combination. The constraint is an equality, not $\le$: the convexity of the norm is not enough.
On the balls of the Euclidean norm in $\R^n$, which statement is correct (for every center ${\boldsymbol c} \in \R^n$ and every radius $r > 0$)?
the set $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 \ge r \}$ is convex
the set $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 = r \}$ is convex
the set $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 \le r \}$ is convex only if ${\boldsymbol c} = {\boldsymbol 0}$
the set $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 \le r \}$ is convex
Explanation. It is Observation 1.5: the closed ball of the Euclidean norm is convex for every center and radius. The complement of the open ball and the sphere are not convex.
On operations among convex sets $A_1, \dots, A_m \subseteq \R^n$, which statement is correct?
for every $m$ sets $A_i \subseteq \R^n$, if $\bigcap_{i=1}^m A_i$ is convex then every $A_i$ is convex
for every $m$ convex sets $A_i \subseteq \R^n$, the set $\bigcap_{i=1}^m A_i$ is convex only if it is nonempty and bounded
for every $m$ convex sets $A_i \subseteq \R^n$, the set $\bigcap_{i=1}^m A_i$ is convex
for every $m$ convex sets $A_i \subseteq \R^n$, the set $\bigcup_{i=1}^m A_i$ is convex
Explanation. Two points of the intersection belong to each $A_i$, and each convex $A_i$ contains the segment joining them: the intersection is convex (Observation 1.7). The union is not (two disjoint disks), and the converse is false: two non-convex sets can have a convex intersection (for instance a single point).
On the balls of the norm $\infty$ in $\R^2$, which statement is correct (for every center ${\boldsymbol c} \in \R^2$ and every radius $r > 0$)?
$\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_\infty \le r \}$ is not convex, because it has corners
$\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_\infty \le r \}$ is convex and it is the axis-aligned square with center ${\boldsymbol c}$ and side $2r$
$\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_\infty \le r \}$ is convex and it is the axis-aligned square with center ${\boldsymbol c}$ and side $r$
$\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_\infty \le r \}$ is convex and it is the diamond with vertices at distance $r$ from ${\boldsymbol c}$
Explanation. It is Observation 1.6 with its comment: $\max\{|x_1-c_1|, |x_2-c_2|\} \le r$ gives $c_j - r \le x_j \le c_j + r$, a square of side $2r$. The diamond is the ball of the norm $1$.
Given ${\boldsymbol c} \in \R^n$ and $r > 0$, which properties are needed to prove that the ball $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 \le r \}$ is a convex set?
triangle inequality and absolute homogeneity of the norm, with $\lambda \ge 0$ and $1 - \lambda \ge 0$
Cauchy–Schwarz inequality and differentiability of the norm, with $\lambda \in [0,1]$
positivity ($\|{\boldsymbol y}\| \ge 0$) and absolute homogeneity of the norm, with $\lambda \in [0,1]$
triangle inequality and absolute homogeneity of the norm, with an arbitrary $\lambda \in \R$
Explanation. In the proof: $\|\lambda({\boldsymbol p}-{\boldsymbol c}) + (1-\lambda)({\boldsymbol w}-{\boldsymbol c})\|_2 \le |\lambda|\,\|{\boldsymbol p}-{\boldsymbol c}\|_2 + |1-\lambda|\,\|{\boldsymbol w}-{\boldsymbol c}\|_2$ (triangle inequality and homogeneity), then $|\lambda| = \lambda$ and $|1-\lambda| = 1-\lambda$ because $\lambda \in [0,1]$.
What is needed to prove that the intersection of $m$ convex sets $A_1, \dots, A_m$ is convex?
the definition of intersection and the boundedness of each $A_i$
the definition of intersection and the convexity of at least one $A_i$
the definition of intersection and that the $A_i$ are balls
the definition of intersection and the convexity of each $A_i$
Explanation. Two points of the intersection belong to each $A_i$; each $A_i$ is convex, so it contains their convex combination, which then belongs to the intersection. The convexity of all the $A_i$ is enough; that of a single one is not.
To prove that the ball $B = \{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x}-{\boldsymbol c}\|_1 \le r \}$ is convex we take ${\boldsymbol p}, {\boldsymbol w} \in B$ and $\lambda \in [0,1]$, and at some point we go from $|\lambda|\,\|{\boldsymbol p}-{\boldsymbol c}\|_1 + |1-\lambda|\,\|{\boldsymbol w}-{\boldsymbol c}\|_1$ to $\lambda\,\|{\boldsymbol p}-{\boldsymbol c}\|_1 + (1-\lambda)\,\|{\boldsymbol w}-{\boldsymbol c}\|_1$. What justifies this step?
the hypotheses $\|{\boldsymbol p}-{\boldsymbol c}\|_1 \le r$ and $\|{\boldsymbol w}-{\boldsymbol c}\|_1 \le r$
the absolute homogeneity of the norm $1$
$\lambda \ge 0$ and $1 - \lambda \ge 0$, because $\lambda \in [0,1]$
the triangle inequality of the norm $1$
Explanation. The absolute value of a nonnegative number is the number itself. The triangle inequality, absolute homogeneity (which produces the factors $|\lambda|$ and $|1-\lambda|$) and the hypotheses $\le r$ are used in other steps of the same proof.
Explanation. The condition is equivalent to $0 \le x_1 \le 6$ and $0 \le x_2 \le 6$: it is the ball of the norm $\infty$ with center $(3,3)$ and radius $3$, an axis-aligned square of side $2r = 6$. The diamond $(3,0), (6,3), \dots$ would be the ball of the norm $1$; the other options have side $3$ or $12$.
In $\R^2$ let $A = \{ {\boldsymbol x} : \|{\boldsymbol x}\|_2 \le 2 \}$ (a disk) and $B = \{ {\boldsymbol x} : x_1 + x_2 \ge 2 \}$ (a half-plane). What can be said about the set $A \cap B$?
it is convex, because it is the intersection of two convex sets
it is not convex, because its boundary joins an arc and a segment
it is convex only because it is bounded, since it lies inside $A$
it is not convex, because the half-plane $B$ is unbounded
Explanation. The disk (ball of the norm $2$) and the half-plane are convex, and the intersection of convex sets is convex. The shape of the boundary and boundedness do not decide convexity.
Given ${\boldsymbol p}, {\boldsymbol w} \in \R^n$ and $\lambda \in [0,1]$, the point $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$ is a convex combination of them. As $\lambda$ varies in $[0,1]$, with ${\boldsymbol p} \ne {\boldsymbol w}$, what do these points describe?
the ray starting at ${\boldsymbol p}$ towards ${\boldsymbol w}$
only the midpoint of ${\boldsymbol p}$ and ${\boldsymbol w}$
the segment with endpoints ${\boldsymbol p}$ and ${\boldsymbol w}$
the line through ${\boldsymbol p}$ and ${\boldsymbol w}$
Explanation. With $\lambda = 1$ we get ${\boldsymbol p}$, with $\lambda = 0$ we get ${\boldsymbol w}$, and the intermediate values give the points in between. With $\lambda \in \R$ we would get the whole line.
Given ${\boldsymbol p}, {\boldsymbol w} \in \R^n$ and $\lambda \in [0,1]$, the point $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$ is a convex combination of them. Is the point $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$ a convex combination of ${\boldsymbol p} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$ and ${\boldsymbol w} = \begin{pmatrix} 4 \\ 4 \end{pmatrix}$?
no, because it is not the midpoint
yes, with $\lambda = \frac{1}{3}$
yes, with $\lambda = \frac{2}{3}$
yes, with $\lambda = \frac{3}{4}$
Explanation. $\lambda \cdot 1 + (1-\lambda) \cdot 4 = 4 - 3\lambda = 3$ gives $\lambda = \frac{1}{3} \in [0,1]$ (the same for the second coordinate). With $\frac{2}{3}$ the roles of ${\boldsymbol p}$ and ${\boldsymbol w}$ are swapped.
Given $m$ points ${\boldsymbol p}^{(1)}, \dots, {\boldsymbol p}^{(m)} \in \R^n$, which conditions must the scalars $\lambda_1, \dots, \lambda_m$ satisfy for $\sum_{i=1}^m \lambda_i {\boldsymbol p}^{(i)}$ to be a convex combination?
$\lambda_i \ge 0$ for every $i$ and $\sum_{i=1}^m \lambda_i = 1$
$\lambda_i \ge 0$ for every $i$, with no other condition
$\sum_{i=1}^m \lambda_i = 1$, with arbitrary signs
$\lambda_i \in [0,1]$ for every $i$ and $\sum_{i=1}^m \lambda_i \le 1$
Explanation. Both are needed: nonnegative scalars summing to $1$. With only $\lambda_i \ge 0$ we also get multiples of the points; with only $\sum \lambda_i = 1$ also points outside the hull.
What is the convex combination with scalars $\lambda_1 = \lambda_2 = \lambda_3 = \frac{1}{3}$ (the centroid) of the points $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 6 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 0 \\ 3 \end{pmatrix}$?
$\begin{pmatrix} 3 \\ \frac{3}{2} \end{pmatrix}$
$\begin{pmatrix} 1 \\ 2 \end{pmatrix}$
$\begin{pmatrix} 6 \\ 3 \end{pmatrix}$
$\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
Explanation. $\frac{1}{3}\begin{pmatrix} 0 \\ 0 \end{pmatrix} + \frac{1}{3}\begin{pmatrix} 6 \\ 0 \end{pmatrix} + \frac{1}{3}\begin{pmatrix} 0 \\ 3 \end{pmatrix} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}$. The point $\begin{pmatrix} 3 \\ \frac{3}{2} \end{pmatrix}$ is the average of only two points; $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$ swaps the coordinates.
Given ${\boldsymbol p}, {\boldsymbol w} \in \R^n$ and $\lambda \in [0,1]$, the point $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$ is a convex combination of them. Which value of $\lambda$ gives the midpoint of the segment with endpoints ${\boldsymbol p}$ and ${\boldsymbol w}$?
$\lambda = 0$
$\lambda = 2$
$\lambda = \frac{1}{2}$
$\lambda = 1$
Explanation. With $\lambda = \frac{1}{2}$ we get $\frac{1}{2}({\boldsymbol p} + {\boldsymbol w})$. With $\lambda = 1$ and $\lambda = 0$ we get the endpoints; $\lambda = 2$ is not in $[0,1]$.
A set $A \subseteq \R^n$ is convex if $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w} \in A$ for all ${\boldsymbol p}, {\boldsymbol w} \in A$ and all $\lambda \in [0,1]$. Are the empty set and a set made of a single point convex?
only the empty set
yes, both
no, neither
only the single-point set
Explanation. For the empty set there are no points to check; for a single point ${\boldsymbol p}$, every combination $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol p}$ is ${\boldsymbol p}$ itself.
A set $A \subseteq \R^n$ is convex if $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w} \in A$ for all ${\boldsymbol p}, {\boldsymbol w} \in A$ and all $\lambda \in [0,1]$. Which subset of $\R^2$ is convex?
$\{ {\boldsymbol x} : x_1 \ge 0,~ x_2 \ge 0 \}$
$\{ {\boldsymbol x} : x_1 x_2 \ge 0 \}$
$\{ {\boldsymbol x} : x_1^2 + x_2^2 = 4 \}$
$\{ {\boldsymbol x} : |x_1| \ge 1 \}$
Explanation. The first quadrant is convex. $x_1 x_2 \ge 0$ is the union of the first and third quadrants (the segment between $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} 0 \\ -1 \end{pmatrix}$ leaves it); the circle and $|x_1| \ge 1$ have «holes».
Does the point $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$ belong to the ball $\{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x}\|_\infty \le 1 \}$, where $\|{\boldsymbol x}\|_\infty = \max\{|x_1|, |x_2|\}$?
no: $\sqrt{1 + 1} = \sqrt{2} > 1$
yes: $1 + (-1) = 0 \le 1$
yes: $\max\{|1|, |-1|\} = 1 \le 1$
no: $|1| + |-1| = 2 > 1$
Explanation. The ball of norm $\infty$ is the square $[-1,1] \times [-1,1]$, and $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$ is one of its vertices. The other answers use the norm $1$, the norm $2$ or the sum without absolute values.
The set $\{ {\boldsymbol x} \in \R^2 : \max\{|x_1 - 1|,\, |x_2 + 1|\} \le 2 \}$ is a square with sides parallel to the axes. How long is its side?
$4$
$2$
$2\sqrt{2}$
$8$
Explanation. It is $\{|x_1 - 1| \le 2,~ |x_2 + 1| \le 2\} = [-1, 3] \times [-3, 1]$: the radius $2$ is half the side. $2\sqrt{2}$ is half the diagonal.
A set $A \subseteq \R^n$ is convex if $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w} \in A$ for all ${\boldsymbol p}, {\boldsymbol w} \in A$ and all $\lambda \in [0,1]$. One checks that the midpoint of two particular points of $A$ belongs to $A$. What can be concluded?
that $A$ is certainly convex
that $A$ is certainly not convex
that $A$ is convex, provided it is bounded
nothing, until all pairs are checked
Explanation. The definition is universal: a single pair (and a single $\lambda$) is not enough to prove it. A single pair and $\lambda$ with the point outside $A$ is instead enough to rule it out.
The intersection of convex sets is convex. If $A_1 \subseteq \R^n$ is convex and $A_2 \subseteq \R^n$ is <em>not</em>, what can be said of $A_1 \cap A_2$?
it is never convex
it is convex only if $A_1 \subseteq A_2$
it may or may not be convex
it is always convex
Explanation. In $\R$: with $A_1 = [0,1]$ and $A_2 = [0,1] \cup [2,3]$ the intersection $[0,1]$ is convex; with $A_1 = [0,3]$ it is $A_2$, not convex. Even if $A_1$ is not contained in $A_2$ it can be convex ($A_1 = [0, \frac{3}{2}]$).
The ball $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 \le r \}$ is convex. What happens if the boundary is removed, that is, one considers $\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_2 < r \}$?
it becomes the empty set
it stays convex
it is no longer convex
it is convex only in $\R^2$
Explanation. The same proof works with $<$: $\|\lambda({\boldsymbol p} - {\boldsymbol c}) + (1-\lambda)({\boldsymbol w} - {\boldsymbol c})\|_2 \le \lambda \|{\boldsymbol p} - {\boldsymbol c}\|_2 + (1-\lambda)\|{\boldsymbol w} - {\boldsymbol c}\|_2 < r$. These are the spherical neighborhoods of chapter 5.
Let ${\boldsymbol p}^{(1)}, {\boldsymbol p}^{(2)}, {\boldsymbol p}^{(3)} \in \R^2$ and $\lambda_1, \lambda_2, \lambda_3 \ge 0$ with $\lambda_1 + \lambda_2 + \lambda_3 = 2$ (not $1$). Does the point $\sum_i \lambda_i {\boldsymbol p}^{(i)}$ lie in the triangle of the three points?
not always: the sum must be $1$
yes, because the scalars are nonnegative
yes, if every $\lambda_i$ is at most $1$
no, it never does
Explanation. With ${\boldsymbol p}^{(i)}$ = $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$, $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ and $\lambda = (1, 1, 0)$ we get $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, in the triangle; with $\lambda = (0, 0, 2)$ we get $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$, outside.
Balls of norms are convex, and the proof uses the properties of the norm. For $g({\boldsymbol x}) = |x_1| - |x_2|$, which is not a norm, what can be said of $\{ {\boldsymbol x} \in \R^2 : g({\boldsymbol x}) \le 1 \}$?
it is convex, like every ball of a norm
it is convex, because $g$ is a continuous function
it is empty, because $g$ can take negative values
it is not convex: a midpoint of two of its points leaves it
Explanation. $g(2, \pm 1) = 1 \le 1$ but $g(2, 0) = 2 > 1$, and $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$ is the midpoint. Without the properties of the norm the convexity of the «ball» can fail.
On the balls of the norm $1$, $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_1 \le r \}$ with $\|{\boldsymbol x}\|_1 = \sum_j |x_j|$, which statement is correct (for every center ${\boldsymbol c}$ and radius $r > 0$)?
they are convex sets
they are convex only if ${\boldsymbol c} = {\boldsymbol 0}$
they are convex only in $\R^2$
they are not convex, because they have vertices
Explanation. The triangle inequality and the homogeneity of the norm $1$ show that the segment between two points of the ball stays in the ball, for every center and dimension. The vertices (the diamond in $\R^2$) do not prevent convexity.
On a set $A \subseteq \R^n$, which statement is correct?
$A$ is convex if and only if it is both bounded and closed
$A$ is convex if and only if it contains the origin
$A$ is convex if and only if its complement is convex
$A$ is convex if and only if it contains every segment with endpoints in $A$
Explanation. The segment between ${\boldsymbol p}$ and ${\boldsymbol w}$ is the set of the combinations $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$ with $\lambda \in [0,1]$: this is the definition. A circle is bounded and closed but not convex; a half-plane is convex with a convex complement, a disk is not.
Explanation. Balls of norm $1$, $2$ and $\infty$ (with $\le$) are convex. A circle and the outside of a ball are not; the union of two balls is not in general (for example with ${\boldsymbol c}$ far from the origin).
Given ${\boldsymbol p} \ne {\boldsymbol w} \in \R^n$, the points $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$ with $\lambda \in [0,1]$ form the segment between ${\boldsymbol p}$ and ${\boldsymbol w}$. What do we get by restricting $\lambda$ to $[0, \frac{1}{2}]$?
only the midpoint of the segment
the half of the segment on the side of ${\boldsymbol w}$
the whole segment between ${\boldsymbol p}$ and ${\boldsymbol w}$
the half of the segment on the side of ${\boldsymbol p}$
Explanation. With $\lambda = 0$ we get ${\boldsymbol w}$ and with $\lambda = \frac{1}{2}$ the midpoint: the intermediate values cover the half of the segment containing ${\boldsymbol w}$.
A set $A \subseteq \R^n$ is convex if it contains $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$ for all ${\boldsymbol p}, {\boldsymbol w} \in A$ and <em>every</em> $\lambda \in [0,1]$. Is it enough that it contains the midpoints (only $\lambda = \frac{1}{2}$)?
no: the rational numbers are a counterexample
yes: repeating midpoints gives the whole segment
yes, at least for subsets of $\R$
no: no set contains all its midpoints
Explanation. The average of two rationals is rational, but between $1$ and $2$ there is $\sqrt{2}$, which is not rational: the segment is not contained. All $\lambda \in [0,1]$ are needed.
The ball $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 \le r \}$ is convex for every $r > 0$. What does it become with $r = 0$?
the empty set, convex
a nonconvex subset of $\R^n$
the whole space $\R^n$, convex
the single point ${\boldsymbol c}$, convex
Explanation. $\|{\boldsymbol x} - {\boldsymbol c}\|_2 \le 0$ holds only for ${\boldsymbol x} = {\boldsymbol c}$ (positivity of the norm); a single-point set is convex.
The ball $\{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x}\|_\infty \le 1 \}$, with $\|{\boldsymbol x}\|_\infty = \max\{|x_1|, |x_2|\}$, is convex. What can be said of $\{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x}\|_\infty \ge 1 \}$?
it is convex, like every set defined by a norm
it is convex, because it is unbounded
it is empty
it is not convex: it misses the origin
Explanation. The direction $\le$ is essential: the outside of the square has a «hole». The midpoint of $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} -1 \\ 0 \end{pmatrix}$ is the origin, with norm $0 < 1$.
In $\R^2$, the set of the convex combinations of three <em>non-collinear</em> points is the triangle with vertices at the three points. What do we get if the three points are collinear, for example $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$?
only the three points
the segment between $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
the segment between $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$
a triangle with zero area containing the whole line
Explanation. Every convex combination lies on the line $x_1 = x_2$, between the leftmost and the rightmost point; the middle point $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ adds nothing.
With ${\boldsymbol p} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$ and ${\boldsymbol w} = \begin{pmatrix} 2 \\ 0 \end{pmatrix}$, which point is $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$ with $\lambda = -1$, a value outside $[0,1]$?
$\begin{pmatrix} 2 \\ 0 \end{pmatrix}$, that is, the point ${\boldsymbol w}$ itself
$\begin{pmatrix} 4 \\ 0 \end{pmatrix}$, on the line through ${\boldsymbol p}$ and ${\boldsymbol w}$, beyond ${\boldsymbol w}$
$\begin{pmatrix} -2 \\ 0 \end{pmatrix}$, on the line through ${\boldsymbol p}$ and ${\boldsymbol w}$, beyond ${\boldsymbol p}$
$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$, the midpoint of the segment between the two points
Explanation. $-1 \cdot \begin{pmatrix} 0 \\ 0 \end{pmatrix} + 2 \cdot \begin{pmatrix} 2 \\ 0 \end{pmatrix} = \begin{pmatrix} 4 \\ 0 \end{pmatrix}$: with $\lambda < 0$ we leave the segment on the side of ${\boldsymbol w}$. This is why a convex combination requires $\lambda \in [0,1]$.
A polygon in $\R^2$ has a «reflex» corner (a vertex where the boundary bends inwards). Is it a convex set?
no: one of its segments can leave it
yes: every polygon in $\R^2$ is convex
yes, because its sides are straight
yes, if the polygon is also bounded
Explanation. Taking two points on either side of the reflex corner, the segment joining them passes outside the polygon, as in the figure of the notes; straight sides are not enough.
What is the value of the function $f : \R^3 \to \R$, $f({\boldsymbol x}) = x_1 x_2 + x_3^2$, at the point ${\boldsymbol x} = \begin{pmatrix} 1 \\ -2 \\ 2 \end{pmatrix}$?
$6$
$-6$
$0$
$2$
Explanation. $1\cdot(-2) + 2^2 = -2 + 4 = 2$. Typical mistakes: sign of $x_2$ ignored ($6$) or a signed square ($-6$).
What is the gradient $\nabla f({\boldsymbol x})$ of $f : D \subseteq \R^n \to \R$?
the sum of the first-order partial derivatives of $f$
the row vector of the second-order partial derivatives of $f$
the column vector of the first-order partial derivatives of $f$
the matrix of the second-order partial derivatives of $f$
Explanation. Definition 2.2: $\nabla f({\boldsymbol x})$ has components $\frac{\partial f({\boldsymbol x})}{\partial x_j}$. The matrix of the second-order derivatives is the Hessian.
Let $f : \R^n \to \R$ be differentiable and ${\boldsymbol x}$ a point with gradient $\nabla f({\boldsymbol x}) \ne {\boldsymbol 0}$. What is the direction of steepest descent of $f$ at ${\boldsymbol x}$?
a direction perpendicular to $\nabla f({\boldsymbol x})$
the first column of $\nabla^2 f({\boldsymbol x})$
$-\nabla f({\boldsymbol x})$
$\nabla f({\boldsymbol x})$
Explanation. The gradient gives the direction of steepest ascent, its opposite that of steepest descent. The directions perpendicular to the gradient are tangent to the level set.
Let $f : \R^n \to \R$ be differentiable and ${\boldsymbol x}$ a point with $\nabla f({\boldsymbol x}) \ne {\boldsymbol 0}$. How is the gradient oriented with respect to the level set $\{ {\boldsymbol y} : f({\boldsymbol y}) = f({\boldsymbol x}) \}$ through ${\boldsymbol x}$?
it is always parallel to one of the axes
it is perpendicular to the level set and points toward increasing values of $f$
it is tangent to the level set
it is perpendicular to the level set and points toward decreasing values of $f$
Explanation. It is the geometric property of the gradient: it is perpendicular to the level set and gives the direction of steepest ascent. For instance, for $(x_1-2)^2 + (x_2-2)^2 + 1$ the gradients are radial and point out of the level circles; the same holds for $e^{x_1} + x_2^2$, whose level sets are not circles.
For a twice differentiable function $f : D \subseteq \R^n \to \R$, when is the Hessian $\nabla^2 f({\boldsymbol x})$ symmetric?
only when $f$ is a quadratic function
only at the points where the gradient of $f$ is zero
when the second-order partial derivatives of $f$ are continuous
always, whatever the function $f$ is
Explanation. With continuous second-order derivatives the order of differentiation does not matter, $\frac{\partial^2 f}{\partial x_i \partial x_j} = \frac{\partial^2 f}{\partial x_j \partial x_i}$. The function $x_1^2 x_2$ is not quadratic, but its Hessian is symmetric.
For $f : D \subseteq \R^n \to \R$, how is the entry in row $i$ and column $j$ of the Hessian $\nabla^2 f({\boldsymbol x})$ obtained?
by differentiating $f$ twice with respect to $x_i$, for every $j$
by differentiating $\frac{\partial f}{\partial x_j}$ with respect to $x_i$
by multiplying $\frac{\partial f}{\partial x_i}$ by $\frac{\partial f}{\partial x_j}$
by adding $\frac{\partial f}{\partial x_i}$ and $\frac{\partial f}{\partial x_j}$
Explanation. Entry $(i,j)$ is $\frac{\partial^2 f({\boldsymbol x})}{\partial x_i \partial x_j}$: the derivative with respect to $x_i$ of the partial derivative with respect to $x_j$.
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = 3x_1 - x_2 + 4$, what are the gradient $\nabla f$ and the Hessian $\nabla^2 f$?
$\nabla f = \begin{pmatrix} 3 \\ -1 \end{pmatrix}$ at every point and $\nabla^2 f$ is the zero matrix
$\nabla f = \begin{pmatrix} 3 \\ -1 \\ 4 \end{pmatrix}$ and $\nabla^2 f$ is the zero matrix
$\nabla f = \begin{pmatrix} 3 \\ -1 \end{pmatrix}$ and $\nabla^2 f$ is the identity matrix
$\nabla f = \begin{pmatrix} 3x_1 \\ -x_2 \end{pmatrix}$ and $\nabla^2 f = \begin{pmatrix} 3 & 0 \\ 0 & -1 \end{pmatrix}$
Explanation. The partial derivatives of a linear function plus a constant are constant ($3$ and $-1$), and the second-order derivatives are zero. The constant $4$ is not a variable.
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = x_1^2 x_2 + x_2^3$, what are the gradient $\nabla f$ and the Hessian $\nabla^2 f$ at the point $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$?
$\nabla f = \begin{pmatrix} -2 \\ 4 \end{pmatrix}$, $\nabla^2 f = \begin{pmatrix} -2 & 2 \\ 2 & 6 \end{pmatrix}$
$\nabla f = \begin{pmatrix} -2 \\ -2 \end{pmatrix}$, $\nabla^2 f = \begin{pmatrix} -2 & 2 \\ 2 & -6 \end{pmatrix}$
$\nabla f = \begin{pmatrix} 2 \\ 4 \end{pmatrix}$, $\nabla^2 f = \begin{pmatrix} 2 & 2 \\ 2 & -6 \end{pmatrix}$
$\nabla f = \begin{pmatrix} -2 \\ 4 \end{pmatrix}$, $\nabla^2 f = \begin{pmatrix} -2 & 2 \\ 2 & -6 \end{pmatrix}$
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = x_1^2 + 2x_2^2$, which direction is tangent to the level set $L(6) = \{ {\boldsymbol x} : f({\boldsymbol x}) = 6 \}$ at the point $\begin{pmatrix} 2 \\ 1 \end{pmatrix} \in L(6)$?
$\begin{pmatrix} 4 \\ 4 \end{pmatrix}$
$\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ -1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
Explanation. $\nabla f(2,1) = (2x_1, 4x_2) = (4,4)$ is perpendicular to the level set; a tangent direction has zero scalar product with $(4,4)$: $(1,-1)$. The option $(4,4)$ is the gradient itself.
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = e^{x_1} + x_2^2$, let $L(2) = \{ {\boldsymbol x} : f({\boldsymbol x}) = 2 \}$ be its level set $2$. Which pair (point of $L(2)$, gradient $\nabla f$ at that point) is correct?
$\begin{pmatrix} \ln 2 \\ 0 \end{pmatrix}$ and $\nabla f = \begin{pmatrix} \ln 2 \\ 0 \end{pmatrix}$
$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$ and $\nabla f = \begin{pmatrix} 1 \\ 2 \end{pmatrix}$
$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$ and $\nabla f = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ and $\nabla f = \begin{pmatrix} e \\ 2 \end{pmatrix}$
Explanation. $e^0 + 1^2 = 2$, so $(0,1) \in L(2)$, and $\nabla f = (e^{x_1}, 2x_2) = (1, 2)$. The point $(1,1)$ gives $e + 1 \ne 2$; at $(\ln 2, 0)$ the gradient is $(2, 0)$.
On the Hessian $\nabla^2 f$ of a function $f : D \subseteq \R^n \to \R$, which statement is correct?
if the second-order partial derivatives of $f$ are continuous, the Hessian is symmetric
the Hessian of every function is constant
the Hessian is symmetric only if $f$ is a quadratic function
if the Hessian is symmetric, then $f$ is convex
Explanation. With continuous second-order derivatives $\frac{\partial^2 f}{\partial x_i \partial x_j} = \frac{\partial^2 f}{\partial x_j \partial x_i}$. The Hessian of $x_1^2 x_2$ changes from point to point and is symmetric, and $x_1^2 x_2$ is neither quadratic nor convex.
Let $f : \R^n \to \R$ be differentiable and $\nabla f({\boldsymbol x}) \ne {\boldsymbol 0}$ its gradient at ${\boldsymbol x}$. Which statement is correct?
among unit directions, $\nabla f({\boldsymbol x})$ gives the minimum directional derivative (steepest descent)
$\nabla f({\boldsymbol x})$ is tangent to the level set through ${\boldsymbol x}$
the directional derivative of $f$ along $\nabla f({\boldsymbol x})$ is zero
among unit directions, $\nabla f({\boldsymbol x})$ gives the maximum directional derivative (steepest ascent)
Explanation. The gradient is the direction of steepest ascent; $-\nabla f({\boldsymbol x})$ that of steepest descent. The directions with zero directional derivative are tangent to the level set.
On the Hessian $\nabla^2 f({\boldsymbol x})$ of a function $f : \R^n \to \R$, which statement is correct?
for $f({\boldsymbol x}) = x_1^2 x_2$ it is constant and equal to $\begin{pmatrix} 2 & 2 \\ 2 & 0 \end{pmatrix}$
for a quadratic function it depends on the point, while the gradient is constant
for a quadratic function it is constant; in general it depends on the point, as for $x_1^2 x_2$
it is constant, in the same way, for every function with continuous second-order derivatives
Explanation. For $x_1^2 x_2$ we have $\nabla^2 f = \begin{pmatrix} 2x_2 & 2x_1 \\ 2x_1 & 0 \end{pmatrix}$, which changes with the point. For a quadratic function it is the gradient that depends on the point; the Hessian is constant.
For $f : D \subseteq \R^n \to \R$, which hypothesis on $f$ is enough to conclude that $\frac{\partial^2 f({\boldsymbol x})}{\partial x_i \partial x_j} = \frac{\partial^2 f({\boldsymbol x})}{\partial x_j \partial x_i}$ for all $i, j$, that is, that the Hessian is symmetric?
that $\nabla f({\boldsymbol x}) = {\boldsymbol 0}$
the continuity of the second-order partial derivatives of $f$
the convexity of $f$
that $f$ is quadratic with a symmetric matrix ${\boldsymbol Q}$
Explanation. The symmetry of the Hessian follows from the continuity of the second-order derivatives, which holds for all the functions of the notes; convexity and quadratic form are not needed.
Let $f : \R^n \to \R$ be differentiable. To state that $\nabla f({\boldsymbol x})$ is perpendicular to the level set $\{ {\boldsymbol y} : f({\boldsymbol y}) = f({\boldsymbol x}) \}$ and points toward increasing values of $f$, which hypothesis is needed?
that the gradient at ${\boldsymbol x}$ is nonzero
that the function $f$ is convex
that the Hessian at ${\boldsymbol x}$ is positive semidefinite
that the level set is a circle
Explanation. If the gradient is zero it does not identify any direction. The perpendicularity holds also when the level set is not a circle (for instance for $e^{x_1} + x_2^2$), and without convexity assumptions.
For $f({\boldsymbol x}) = e^{x_1} + x_2^2$ we want to check that the gradient $\nabla f\begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 1 \\ 2 \end{pmatrix}$ is perpendicular, at the point $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$, to the level set $L(2) = \{ {\boldsymbol x} : f({\boldsymbol x}) = 2 \}$, that is, to the curve $x_1 = \ln(2 - x_2^2)$. What is needed?
the scalar product between $(1,2)$ and the point $(0,1)$, which should be zero
the Hessian at $(0,1)$, which is diagonal and hence has perpendicular columns
the convexity of $f$, which makes $L(2)$ the boundary of a convex set
a tangent direction of the curve at the point, $(-2, 1)$, and its zero scalar product with $(1,2)$
Explanation. Two vectors are perpendicular if their scalar product is zero: we need the tangent direction of the curve at the point, obtained by differentiating $x_1 = \ln(2 - x_2^2)$ ($-2$ at $x_2 = 1$), and $1\cdot(-2) + 2\cdot 1 = 0$. The point itself is not a tangent direction.
For a function $f : D \subseteq \R^n \to \R$ of $n$ real variables, what are $D$ and $f({\boldsymbol x})$?
$D$ is the set of the values taken, and $f({\boldsymbol x})$ is a real number
$D$ is a subset of $\R$, and $f({\boldsymbol x})$ is a vector of $\R^n$
$D$ is the domain, a subset of $\R^n$, and $f({\boldsymbol x})$ is a real number
$D$ is the domain, a subset of $\R^n$, and $f({\boldsymbol x})$ is a vector of $\R^n$
Explanation. The function takes as input a vector ${\boldsymbol x}$ of $n$ real numbers, which must lie in the domain $D \subseteq \R^n$, and returns a single real number (scalar function).
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = (x_1-2)^2 + (x_2-2)^2 + 1$, the point $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$ lies on the level set $L(2) = \{ {\boldsymbol x} : f({\boldsymbol x}) = 2 \}$. What is $\nabla f\begin{pmatrix} 3 \\ 2 \end{pmatrix}$ and how is it oriented with respect to $L(2)$?
$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$, perpendicular to $L(2)$ and pointing out of the circle
$\begin{pmatrix} 2 \\ 0 \end{pmatrix}$, perpendicular to $L(2)$ and pointing out of the circle
$\begin{pmatrix} 2 \\ 0 \end{pmatrix}$, tangent to $L(2)$ and hence directed along the circle
$\begin{pmatrix} -2 \\ 0 \end{pmatrix}$, perpendicular to $L(2)$ and pointing toward the center $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$
Explanation. $\nabla f = (2(x_1-2),\; 2(x_2-2)) = (2, 0)$ at $(3,2)$. $L(2)$ is the circle with center $(2,2)$ and radius $1$: the gradient is radial, hence perpendicular, and points toward increasing values of $f$, away from the center. $(1,0)$ forgets the factor $2$.
For $f(x_1, x_2) = \ln(x_1 + x_2)$, which set is the natural domain $D \subseteq \R^2$?
$\{ {\boldsymbol x} : x_1 > 0,~ x_2 > 0 \}$
$\R^2$
$\{ {\boldsymbol x} : x_1 + x_2 > 0 \}$
$\{ {\boldsymbol x} : x_1 + x_2 \ge 0 \}$
Explanation. The logarithm is defined only for positive arguments: we need $x_1 + x_2 > 0$ (zero is excluded). The open first quadrant is contained in the domain, but it is smaller.
For $f({\boldsymbol x}) = x_1^2 + 3x_1 x_2$, what is the partial derivative $\frac{\partial f({\boldsymbol x})}{\partial x_2}$, second component of the gradient?
$3x_1$
$3x_2$
$2x_1 + 3x_2$
$3$
Explanation. Differentiating with respect to $x_2$, $x_1$ is treated as a constant: $x_1^2$ gives $0$ and $3x_1 x_2$ gives $3x_1$. $2x_1 + 3x_2$ is the derivative with respect to $x_1$.
For a function $f : \R^3 \to \R$ with second derivatives, what are the sizes of the gradient $\nabla f({\boldsymbol x})$ and of the Hessian matrix $\nabla^2 f({\boldsymbol x})$?
vector with $9$ components and $3 \times 3$ matrix
vector with $3$ components and $9 \times 9$ matrix
vector with $3$ components and $3 \times 3$ matrix
vector with $3$ components and $3 \times 1$ matrix
Explanation. The gradient has one partial derivative per variable; the Hessian has one second derivative for each pair of variables, hence $3 \times 3$.
Explanation. $\nabla f = \begin{pmatrix} x_2 \\ x_1 \end{pmatrix}$: the pure second derivatives are zero and the mixed ones equal $1$. The matrix is constant and symmetric.
For $f({\boldsymbol x}) = x_1 + x_2$ on $\R^2$, what is the level set $\{ {\boldsymbol x} \in \R^2 : f({\boldsymbol x}) = 3 \}$?
the line $x_1 + x_2 = 3$
the half-plane $x_1 + x_2 \le 3$
only the point $\begin{pmatrix} \frac{3}{2} \\ \frac{3}{2} \end{pmatrix}$
the circle of radius $3$
Explanation. A level set contains the points where $f$ equals <em>exactly</em> the level: here a line. The half-plane is the set of the points with value at most $3$.
Let $f : \R^n \to \R$ be differentiable. Moving slightly from ${\boldsymbol x}$ along a direction tangent to the level set through ${\boldsymbol x}$, how does the value of $f$ change, to first order?
it increases as fast as possible
it decreases as fast as possible
it doubles
it does not change
Explanation. Along the level set $f$ is constant, and the tangent direction is perpendicular to the gradient. The fastest increase is along $\nabla f({\boldsymbol x})$, the fastest decrease along $-\nabla f({\boldsymbol x})$.
For $f({\boldsymbol x}) = e^{2x_1} + x_2$, what is the gradient $\nabla f$ at the point $\begin{pmatrix} 0 \\ 3 \end{pmatrix}$?
$\begin{pmatrix} 2 \\ 3 \end{pmatrix}$
$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$
$\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
Explanation. $\frac{\partial f}{\partial x_1} = 2e^{2x_1}$, which at $x_1 = 0$ equals $2$; $\frac{\partial f}{\partial x_2} = 1$. With $1$ in the first component the factor $2$ of the derivative of $e^{2x_1}$ is forgotten.
For $f({\boldsymbol x}) = x_1^3 + x_2^2$, what can be said of the Hessian matrix $\nabla^2 f({\boldsymbol x})$?
it depends on the point: it is $\begin{pmatrix} 3x_1^2 & 0 \\ 0 & 2x_2 \end{pmatrix}$
it depends on the point: it is $\begin{pmatrix} 6x_1 & 0 \\ 0 & 2 \end{pmatrix}$
it is constant: $\begin{pmatrix} 6 & 0 \\ 0 & 2 \end{pmatrix}$
it is the zero matrix
Explanation. $\frac{\partial^2 f}{\partial x_1^2} = 6x_1$ depends on $x_1$: for functions that are not quadratic the Hessian changes from point to point. The last option contains the first derivatives.
Let $f : \R^n \to \R$ be differentiable and $\bar{\boldsymbol x}$ a point with gradient $\nabla f(\bar{\boldsymbol x}) = {\boldsymbol 0}$. Does the vector $-\nabla f(\bar{\boldsymbol x})$ give a descent direction of $f$?
no: it is the zero vector, not a direction
yes, as at every point of the domain of $f$
yes, provided the function $f$ is convex
no, because $f$ increases in every direction
Explanation. The steepest descent direction $-\nabla f$ requires $\nabla f(\bar{\boldsymbol x}) \ne {\boldsymbol 0}$. With zero gradient the vector is ${\boldsymbol 0}$; whether $f$ increases or not depends on the function.
For $f(x) = x^2$ and $\bar x = 1$, with $f'(1) = 2 \ne 0$, the step $\bar x - \alpha f'(\bar x)$ reduces $f$ for small $\alpha > 0$. Does it hold for every $\alpha > 0$?
yes, for every step $\alpha > 0$
yes, because the derivative $f'(\bar x)$ is not zero
no: it holds for no step $\alpha > 0$
no: with $\alpha = 2$ we get $f(-3) = 9 > 1$
Explanation. The direction $-\nabla f$ guarantees a decrease only for small enough steps: with $\alpha = \frac{1}{4}$ we reach $\frac{1}{2}$ and $f$ decreases, with $\alpha = 2$ we overshoot the minimum.
We want the Hessian matrix of $f({\boldsymbol x}) = |x_1| + x_2^2$ at the point $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$. What can be said?
it equals $\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}$ there
it is the zero matrix there
it is not defined at that point
it equals $\begin{pmatrix} 0 & 0 \\ 0 & 2 \end{pmatrix}$ there
Explanation. The Hessian requires the (first and second) partial derivatives at the point; $|x_1|$ has no derivative at $0$. Away from $x_1 = 0$ the matrix would be $\begin{pmatrix} 0 & 0 \\ 0 & 2 \end{pmatrix}$.
The gradient is the vector of partial derivatives. Can the gradient of $f({\boldsymbol x}) = \max\{x_1, x_2\}$ be computed at the point $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$?
yes: the gradient equals $\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}$
no: the partial derivatives do not exist
yes: the gradient equals $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
yes: the gradient equals $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$
Explanation. Increasing $x_1$ from $1$, $f$ grows like $x_1$ (slope $1$); decreasing it, $f$ stays $1$ (slope $0$): the partial derivative with respect to $x_1$ does not exist, and the same for $x_2$.
The Hessian matrix $\nabla^2 f(\bar{\boldsymbol x})$ of $f : D \subseteq \R^n \to \R$ is the matrix of second partial derivatives. What must exist for it to be defined at $\bar{\boldsymbol x}$?
the second partial derivatives of $f$ at $\bar{\boldsymbol x}$
only the gradient of $f$ at $\bar{\boldsymbol x}$
the convexity of the function $f$ on its domain $D$
a nonempty level set of the function $f$
Explanation. Each entry is a second derivative $\frac{\partial^2 f}{\partial x_i \partial x_j}$ computed at $\bar{\boldsymbol x}$; the gradient alone is not enough, and convexity is not required.
Let $f({\boldsymbol x}) = {\boldsymbol c}'{\boldsymbol x}$ be a linear function on $\R^n$, with ${\boldsymbol c} \ne {\boldsymbol 0}$. Which statement on its gradient $\nabla f$ is correct?
$\nabla f = {\boldsymbol c}$, parallel to the level sets ${\boldsymbol c}'{\boldsymbol x} = k$
$\nabla f = {\boldsymbol 0}$ at every point, because $f$ is linear
$\nabla f = {\boldsymbol c}$, perpendicular to the level sets ${\boldsymbol c}'{\boldsymbol x} = k$
$\nabla f = {\boldsymbol x}$, which depends on the point where it is computed
Explanation. $\frac{\partial}{\partial x_j}\sum_i c_i x_i = c_j$: the gradient is constant and, as always when nonzero, perpendicular to the level sets (here hyperplanes, lines in $\R^2$).
On the Hessian matrix of a function $f({\boldsymbol x}) = {\boldsymbol c}'{\boldsymbol x} + d$ (linear plus a constant) on $\R^n$, which statement is correct?
it does not exist, because $f$ is linear
it is the zero matrix at every point
it is the diagonal matrix with ${\boldsymbol c}$ on the diagonal
it is the matrix ${\boldsymbol c}\,{\boldsymbol c}'$
Explanation. The gradient ${\boldsymbol c}$ is constant, so all second derivatives are zero. This is why, in chapter 4, the linear part does not change the Hessian $2{\boldsymbol Q}$.
The gradient of $f$ is perpendicular to the level set at the points where it is nonzero. For $f({\boldsymbol x}) = x_1^2 + x_2^2$, what is the level set $\{ {\boldsymbol x} : f({\boldsymbol x}) = 0 \}$?
only the point ${\boldsymbol 0}$, where the gradient is zero
a circle of radius $0$ with a perpendicular gradient
the empty set: no point gives $0$
the whole plane $\R^2$, since $f \ge 0$
Explanation. $x_1^2 + x_2^2 = 0$ only at ${\boldsymbol 0}$, where $\nabla f = \begin{pmatrix} 2x_1 \\ 2x_2 \end{pmatrix} = {\boldsymbol 0}$: there is no curve to be perpendicular to, and this is the case excluded by the hypothesis ${\nabla f \ne {\boldsymbol 0}}$.
For $f({\boldsymbol x}) = \sqrt{x_1} + x_2$, with domain $\{ {\boldsymbol x} : x_1 \ge 0 \}$, can the gradient be computed at the point $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$?
yes: the gradient equals $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$
yes: the gradient equals $\begin{pmatrix} \frac{1}{2} \\ 1 \end{pmatrix}$
yes: the gradient equals $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
no: $\frac{\partial f}{\partial x_1}$ does not exist there
Explanation. $\frac{\partial f}{\partial x_1} = \frac{1}{2\sqrt{x_1}}$ grows without bound as $x_1 \to 0^+$, and to the left of $0$ the function is not defined: the gradient requires the partial derivatives at the point.
For $f({\boldsymbol x}) = x_1^2 x_2$, at the point ${\boldsymbol 0}$ the gradient and the Hessian matrix are zero. Can we conclude that $f$ is constant near ${\boldsymbol 0}$?
yes, because the Hessian matrix is symmetric
no, because the Hessian matrix is not symmetric
no: for example $f\big((t, t)'\big) = t^3 \ne 0$ for every $t \ne 0$
yes: zero gradient and Hessian make $f$ constant
Explanation. $\nabla f = \begin{pmatrix} 2x_1x_2 \\ x_1^2 \end{pmatrix}$ and $\nabla^2 f = \begin{pmatrix} 2x_2 & 2x_1 \\ 2x_1 & 0 \end{pmatrix}$ vanish at ${\boldsymbol 0}$, but $f$ takes nonzero values in every neighborhood: the derivatives at one point do not describe the function everywhere.
When is a function $f : D \subseteq \R^n \to \R$ convex in its domain?
if $D$ is convex and $f\big(\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}\big) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for every ${\boldsymbol p}, {\boldsymbol w} \in D$ and every $\lambda \in [0,1]$
if $D$ is convex and $f\big(\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}\big) \ge \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for every ${\boldsymbol p}, {\boldsymbol w} \in D$ and every $\lambda \in [0,1]$
if $f\big(\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}\big) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for every ${\boldsymbol p}, {\boldsymbol w} \in D$ with $\lambda = \frac{1}{2}$, whatever $D$ is
if there exist ${\boldsymbol p}, {\boldsymbol w} \in D$ and $\lambda \in [0,1]$ with $f\big(\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}\big) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$
Explanation. Definition 3.1: the inequality $\le$ for all pairs and all $\lambda$, and the domain must be convex. With $\ge$ we get the definition of concave function.
A function $f : D \subseteq \R^n \to \R$, with convex domain $D$, is concave in $D$ if and only if:
$f$ is not convex in $D$
$f({\boldsymbol x}) \ge 0$ for every ${\boldsymbol x} \in D$
$f$ is convex in $D$ and $D$ is bounded
$-f$ is convex in $D$
Explanation. Observation 3.11: multiplying by $-1$ reverses the inequality. A function can be neither convex nor concave (for instance $x^3$ in $\R$), so «not convex» does not mean concave.
For the vector ${\boldsymbol x} = \begin{pmatrix} 2 \\ -6 \end{pmatrix} \in \R^2$, what are the norms $\|{\boldsymbol x}\|_1$, $\|{\boldsymbol x}\|_2$, $\|{\boldsymbol x}\|_\infty$ (in this order)?
What is the norm $q = 3$, $\|{\boldsymbol x}\|_3$, of the vector ${\boldsymbol x} = \begin{pmatrix} 3 \\ -4 \end{pmatrix} \in \R^2$?
$5$
$\sqrt[3]{91}$
$\sqrt[3]{-37}$
$\sqrt{91}$
Explanation. $\|{\boldsymbol x}\|_3 = (|3|^3 + |-4|^3)^{\frac{1}{3}} = (27 + 64)^{\frac{1}{3}} = \sqrt[3]{91}$. Without absolute values we would get $27 - 64 = -37$; $5$ is the norm $2$.
A norm $\|\cdot\|$ on $\R^n$ satisfies, among others, the absolute homogeneity property. Which of the following is it (for every ${\boldsymbol p} \in \R^n$ and $\alpha \in \R$)?
Explanation. Multiplying a vector by $\alpha$ multiplies its norm by $|\alpha|$ (Definition 3.4). With $\alpha\,\|{\boldsymbol p}\|$ a norm could become negative for $\alpha < 0$; the last option adds a scalar to a vector.
What can be said about the function $f(x) = |x|$ in $\R$?
it is concave, because its graph is made of two segments
it is neither convex nor concave, because it is not differentiable at $0$
it is convex only in $[0, +\infty)$
it is convex, by the triangle inequality and absolute homogeneity
Explanation. Example 3.5: $|\lambda p + (1-\lambda) w| \le \lambda |p| + (1-\lambda) |w|$. Differentiability is not needed: convexity is checked with the definition.
The function $f(x) = \min\{\, x + 2,\; 4 - \frac{1}{2}x \,\}$ in $[-2, 4]$ is:
neither convex nor concave
both convex and concave
concave
convex
Explanation. It is the minimum of two linear functions, which are concave: by Observation 3.13 it is concave (Example 3.6). It is not convex: the graph has an upward corner at $x = \frac{4}{3}$.
If $f_1$ and $f_2$ are convex in $\R^n$, the function $\max\{f_1({\boldsymbol x}), f_2({\boldsymbol x})\}$ is:
neither convex nor concave in general
convex
concave
convex only if $f_1 = f_2$
Explanation. Observation 3.13: the point-wise maximum of convex functions is convex (Example 3.10). It is the minimum of convex functions that in general is not convex.
If $f$ and $g$ are convex in $D$, for which scalars $\alpha, \beta$ is the function $\alpha f + \beta g$ certainly convex in $D$?
for every $\alpha \ge 0$ and $\beta \ge 0$
for every $\alpha, \beta \in \R$
only for $\alpha + \beta = 1$
only for $\alpha = \beta = 1$
Explanation. Observation 3.12: with nonnegative coefficients the two inequalities add up without changing direction. With a negative coefficient the direction is reversed.
$f(x) = x^2$ and $g(x) = 2x^2$ are convex in $\R$. What can be said about $f - g$?
$f - g$ is convex, because it is a difference of convex functions
$f - g$ is neither convex nor concave
$f - g$ is both convex and concave
$f - g = -x^2$ is concave and not convex
Explanation. $f - g = f + (-1)\,g$ has a negative coefficient: Observation 3.12 does not apply. $-x^2$ is concave (Observation 3.11) and not convex ($p = -1$, $w = 1$, $\lambda = \frac{1}{2}$ give $0 > -1$).
Why is the set $\{ {\boldsymbol x} \in \R^2 : x_1^2 + x_2^2 - 9 \le 0,~ x_1 + x_2 - 1 \le 0 \}$ convex?
it is not convex, because its boundary contains an arc of a circle
because it is described by constraints $f_i({\boldsymbol x}) \le 0$ with convex functions $f_i$
because it is bounded, since it lies entirely in the disk of radius $3$
because the functions defining the constraints are differentiable
Explanation. $x_1^2 + x_2^2 - 9$ and $x_1 + x_2 - 1$ are convex, and a set $\{ {\boldsymbol x} : f_i({\boldsymbol x}) \le 0,~ \forall i \}$ with convex $f_i$ is convex (Observation 3.14). Being bounded or having a curved boundary does not decide convexity.
For the convex function $f(x) = |x|$ in $\R$, with $p = -4$, $w = 2$, $\lambda = \frac{1}{2}$, what are the two sides $f\big(\lambda p + (1-\lambda) w\big)$ and $\lambda f(p) + (1-\lambda) f(w)$ of the convexity inequality?
$1$ and $3$
$-1$ and $-1$
$1$ and $1$
$3$ and $1$
Explanation. $\lambda p + (1-\lambda) w = -1$, hence $f(-1) = 1$; $\frac{1}{2}\cdot 4 + \frac{1}{2}\cdot 2 = 3$. As it must be for a convex function, $1 \le 3$.
Explanation. The rotated square with vertices $(\pm 2, 0)$, $(0, \pm 2)$ is cut by the line $x_1 + x_2 = 1$, which meets the sides $x_1 - x_2 = 2$ and $x_2 - x_1 = 2$ at $(\frac{3}{2}, -\frac{1}{2})$ and $(-\frac{1}{2}, \frac{3}{2})$ (Example 3.12).
Explanation. One pair with one $\lambda$ for which the inequality of the definition fails is enough. The pair $p = 0$, $w = 2$ satisfies it (and says nothing about convexity in $\R$); comparing $f(-1)$ with $f(0)$ is not the inequality of the definition.
For the vector ${\boldsymbol x} = \begin{pmatrix} 1 \\ -2 \\ 2 \end{pmatrix} \in \R^3$, what is the correct order among the norms $\|{\boldsymbol x}\|_1$, $\|{\boldsymbol x}\|_2$, $\|{\boldsymbol x}\|_\infty$?
On the convexity of norms as functions from $\R^n$ to $\R$, which statement is correct?
for every norm $\|\cdot\|$ on $\R^n$, the function ${\boldsymbol x} \mapsto \|{\boldsymbol x}\|$ is convex in $\R^n$
for every norm $\|\cdot\|$ on $\R^n$, the function ${\boldsymbol x} \mapsto \|{\boldsymbol x}\|$ is concave in $\R^n$
among the norms, only the Euclidean norm is a convex function
norms are convex functions only on $\{ {\boldsymbol x} : {\boldsymbol x} \ge {\boldsymbol 0} \}$
Explanation. Observation 3.7: the triangle inequality and absolute homogeneity are enough, and they hold for every norm (in particular $1$, $2$, $q$ and $\infty$).
Let $f_i : D_i \subseteq \R^n \to \R$, $i = 1, \dots, m$, be functions convex in their domains. Which statement on sets defined by constraints is correct?
$\{ {\boldsymbol x} \in \bigcap_i D_i : f_i({\boldsymbol x}) \ge 0,~ \forall i \}$ is convex
$\{ {\boldsymbol x} \in \bigcap_i D_i : f_i({\boldsymbol x}) = 0,~ \forall i \}$ is convex
$\{ {\boldsymbol x} \in \bigcap_i D_i : f_i({\boldsymbol x}) \le 0,~ \forall i \}$ is convex only if the $f_i$ are linear
$\{ {\boldsymbol x} \in \bigcap_i D_i : f_i({\boldsymbol x}) \le 0,~ \forall i \}$ is convex
Explanation. Each set $\{ {\boldsymbol x} : f_i({\boldsymbol x}) \le 0 \}$ is convex (if $f_i(\boldsymbol p), f_i(\boldsymbol w) \le 0$, convexity gives $f_i$ of the combination $\le 0$) and the intersection of convex sets is convex (Observation 3.14). With $\ge$ or $=$ the conclusion is false: $\{ {\boldsymbol x} : x_1^2 + x_2^2 - 1 \ge 0 \}$ is not convex.
On the point-wise maximum and minimum $\max_i f_i({\boldsymbol x})$, $\min_i f_i({\boldsymbol x})$ of $m$ functions $f_1, \dots, f_m : D \to \R$, which statement is correct?
the maximum of $m$ convex functions is concave
the maximum of $m$ convex functions is convex only if $m = 2$
the maximum of $m$ convex functions is convex, and the minimum of $m$ concave functions is concave
the maximum of $m$ concave functions is concave, and the minimum of $m$ convex functions is convex
Explanation. The point-wise maximum of convex functions is convex and, passing to $-f_i$, the minimum of concave functions is concave (Observation 3.13). The minimum of $x^2$ and $(x-2)^2$ instead is not convex: with $p = 0$, $w = 2$, $\lambda = \frac{1}{2}$ we get $1 > 0$.
Which results are needed to prove that ${\boldsymbol x} \mapsto \|{\boldsymbol x}\|_2$ is convex in $\R^n$?
the inequality $2ab \le a^2 + b^2$, applied component by component
triangle inequality and absolute homogeneity, with $\lambda, 1 - \lambda \ge 0$, and the convexity of $\R^n$
the Cauchy–Schwarz inequality, applied to ${\boldsymbol p}$ and ${\boldsymbol w}$, and the convexity of $\R^n$
the positive semidefiniteness of the Hessian of $\|{\boldsymbol x}\|_2$ at every point
Explanation. We write $\|\lambda {\boldsymbol p} + (1-\lambda){\boldsymbol w}\|_2 \le |\lambda|\,\|{\boldsymbol p}\|_2 + |1-\lambda|\,\|{\boldsymbol w}\|_2$ and use $\lambda, 1-\lambda \ge 0$; the domain $\R^n$ is convex. Cauchy–Schwarz and $2ab \le a^2 + b^2$ are used instead for the squared norm; the norm is not differentiable at ${\boldsymbol 0}$.
What is needed to prove $\big(\lambda a + (1-\lambda) b\big)^2 \le \lambda a^2 + (1-\lambda) b^2$ for every $a, b \in \R$ and $\lambda \in [0,1]$?
the expansion: the difference between the two sides equals $\lambda(1-\lambda)(a-b)^2 \ge 0$
the triangle inequality $|a + b| \le |a| + |b|$ with $\lambda \in [0,1]$
the hypothesis $a, b \ge 0$, without which the inequality is false
the case $\lambda = \frac{1}{2}$, which extends to every $\lambda$ by symmetry
Explanation. Expanding, the right-hand side minus the left-hand side equals $\lambda(1-\lambda)(a-b)^2$, a product of nonnegative factors. The sign of $a$ and $b$ matters for cubes, not for squares; the case $\lambda = \frac{1}{2}$ alone is not enough.
Let $f, g : D \subseteq \R^n \to \R$ and $\alpha, \beta \in \R$. Which hypotheses does the proof that the combination $\alpha f + \beta g$ is convex in $D$ use?
$f$ and $g$ convex in $D$ (hence $D$ convex), with $\alpha + \beta = 1$
$f$ and $g$ twice differentiable, with positive semidefinite Hessian
$f$ and $g$ convex in $D$ (hence $D$ convex), with arbitrary $\alpha, \beta \in \R$
$f$ and $g$ convex in $D$ (hence $D$ convex), with $\alpha \ge 0$ and $\beta \ge 0$
Explanation. The two convexity inequalities are multiplied by $\alpha \ge 0$ and $\beta \ge 0$ (the direction does not change) and added. The constraint $\alpha + \beta = 1$ is not needed.
On the squared Euclidean norm $f({\boldsymbol x}) = \|{\boldsymbol x}\|_2^2 = x_1^2 + \dots + x_n^2$, seen as a function from $\R^n$ to $\R$, which statement is correct?
it is convex only in $\{ {\boldsymbol x} : {\boldsymbol x} \ge {\boldsymbol 0} \}$
it is not convex, because the square of a convex function never is
it is convex in the whole $\R^n$
it is concave in the whole $\R^n$
Explanation. For every ${\boldsymbol p}, {\boldsymbol w}$ and $\lambda \in [0,1]$ we have $\|\lambda {\boldsymbol p} + (1-\lambda){\boldsymbol w}\|_2^2 \le \lambda \|{\boldsymbol p}\|_2^2 + (1-\lambda)\|{\boldsymbol w}\|_2^2$ (Observation 3.9): it is enough to apply the inequality of squares to every component. The sign of the components does not matter.
For the convex function $f({\boldsymbol x}) = \|{\boldsymbol x} - \begin{pmatrix} 2 \\ 2 \end{pmatrix}\|_2 + 1$ in $\R^2$, with ${\boldsymbol p} = \begin{pmatrix} 5 \\ 2 \end{pmatrix}$, ${\boldsymbol w} = \begin{pmatrix} 2 \\ 6 \end{pmatrix}$ and $\lambda = \frac{1}{2}$, what are the two sides $f(\lambda {\boldsymbol p} + (1-\lambda){\boldsymbol w})$ and $\lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ of the convexity inequality?
$\frac{7}{2}$ and $\frac{7}{2}$
$\frac{7}{2}$ and $\frac{9}{2}$
$\frac{9}{2}$ and $\frac{7}{2}$
$\frac{5}{2}$ and $\frac{9}{2}$
Explanation. The midpoint is $(\frac{7}{2}, 4)$, at distance $\sqrt{(\frac{3}{2})^2 + 2^2} = \frac{5}{2}$ from $(2,2)$: $f = \frac{7}{2}$. Then $f({\boldsymbol p}) = 3 + 1 = 4$ and $f({\boldsymbol w}) = 4 + 1 = 5$, with average $\frac{9}{2}$. $\frac{5}{2}$ forgets the constant $1$.
The function $f : \R \to \R$, $f(x) = \max\{\, \frac{1}{10}(x-10)^2,\; \frac{1}{10}x^2 \,\}$, is:
convex, as the maximum of two convex functions
concave, because the graph has a corner at $x = 5$
neither convex nor concave, because it is not differentiable at $x = 5$
convex only in the interval $[0, 10]$
Explanation. The two parabolas are convex and the point-wise maximum of convex functions is convex (Observation 3.13). The corner at $x = 5$, where the parabolas meet, points downward and does not contradict convexity: differentiability is not needed.
When is a function $f : D \subseteq \R^n \to \R$ concave in its domain $D$?
if $D$ is convex and $f\big(\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}\big) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for every ${\boldsymbol p}, {\boldsymbol w} \in D$ and every $\lambda \in [0,1]$
if $D$ is convex and $f\big(\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}\big) \ge \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for at least one pair ${\boldsymbol p}, {\boldsymbol w} \in D$ and one $\lambda \in [0,1]$
if $f\big(\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}\big) \ge \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for every ${\boldsymbol p}, {\boldsymbol w} \in D$ and every $\lambda \in [0,1]$, whatever $D$ is
if $D$ is convex and $f\big(\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}\big) \ge \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for every ${\boldsymbol p}, {\boldsymbol w} \in D$ and every $\lambda \in [0,1]$
Explanation. Definition 3.2: the value at the convex combination is at least the convex combination of the values, for all pairs and all $\lambda$, over a convex domain. With $\le$ we get the definition of convex function.
Let $f : [a,b] \to \R$ be a concave function and let $p, w \in [a,b]$. Where is the graph of $f$ between $p$ and $w$ with respect to the segment (chord) joining the points $(p, f(p))$ and $(w, f(w))$?
above the chord only if $f(p) = f(w)$
below the chord only if $f$ is differentiable
above the chord or on it
below the chord or on it
Explanation. The points of the chord have height $\lambda f(p) + (1-\lambda) f(w)$ and concavity gives $f(\lambda p + (1-\lambda) w) \ge \lambda f(p) + (1-\lambda) f(w)$: the graph lies above (or on) the chord. «Below» describes convex functions.
A function $f: D \subseteq \R^n \to \R$ is convex if $f(\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for all ${\boldsymbol p}, {\boldsymbol w} \in D$ and $\lambda \in [0,1]$ ($D$ convex). Which function of one variable is convex on $\R$?
$f(x) = x^3$
$f(x) = \sin x$
$f(x) = |x|$
$f(x) = -x^2$
Explanation. The absolute value is a norm: it is convex.
A function $f: D \subseteq \R^n \to \R$ is convex if $f(\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for all ${\boldsymbol p}, {\boldsymbol w} \in D$ and $\lambda \in [0,1]$ ($D$ convex). For $f(x) = x^2$, ${\boldsymbol p} = 0$, ${\boldsymbol w} = 2$, $\lambda = \frac12$: what are the two sides of the inequality?
A function $f : D \subseteq \R^n \to \R$, with $D$ convex, is convex if $f(\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for all ${\boldsymbol p}, {\boldsymbol w} \in D$ and $\lambda \in [0,1]$. Is the function $f(x) = x^2$ with domain $D = [-2, -1] \cup [1, 2]$ convex on its domain according to this definition?
yes, because $x^2$ is a convex function
yes: the inequality holds on the two intervals
no: $x^2$ is not convex on $[1, 2]$
no: the definition requires a convex domain
Explanation. $D$ is not convex (it contains $-1$ and $1$ but not $0$), so the definition does not apply: for example $f(\frac{1}{2}(-1) + \frac{1}{2} \cdot 1)$ is not even defined.
A function $f : D \subseteq \R^n \to \R$, with $D$ convex, is convex if $f(\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for all ${\boldsymbol p}, {\boldsymbol w} \in D$ and $\lambda \in [0,1]$. If $f$ is convex on $[0, 4]$ with $f(0) = 1$ and $f(4) = 9$, which bound holds for $f(1)$?
$f(1) \le 5$
$f(1) = 3$
$f(1) \le 3$
$f(1) \ge 3$
Explanation. $1 = \frac{3}{4} \cdot 0 + \frac{1}{4} \cdot 4$, hence $f(1) \le \frac{3}{4} \cdot 1 + \frac{1}{4} \cdot 9 = 3$: the graph lies below the chord. $5$ is the average with weights $\frac{1}{2}$, which are wrong.
A function $f$ is concave on $[0, 2]$ if $f(\lambda p + (1-\lambda) w) \ge \lambda f(p) + (1-\lambda) f(w)$ for all $p, w \in [0,2]$ and $\lambda \in [0,1]$. If $f(0) = 0$ and $f(2) = 4$, which bound holds for $f(1)$?
$f(1) = 2$
$f(1) \ge 2$
$f(1) \le 2$
$f(1) \ge 4$
Explanation. With $p = 0$, $w = 2$, $\lambda = \frac{1}{2}$: $f(1) \ge \frac{1}{2} \cdot 0 + \frac{1}{2} \cdot 4 = 2$. The graph of a concave function lies above the chord, not necessarily on it.
For all $a, b \in \R$ and $\lambda \in [0,1]$ we have $\big(\lambda a + (1-\lambda) b\big)^2 \le \lambda a^2 + (1-\lambda) b^2$. What are the two sides for $a = 1$, $b = 5$, $\lambda = \frac{1}{2}$?
$9 \le 13$
$13 \le 9$
$9 \le 9$
$6 \le 13$
Explanation. $\big(\frac{1}{2} + \frac{5}{2}\big)^2 = 3^2 = 9$ and $\frac{1}{2} \cdot 1 + \frac{1}{2} \cdot 25 = 13$; the difference is $\lambda(1-\lambda)(a-b)^2 = \frac{1}{4} \cdot 16 = 4$.
A norm on $\R^2$ must be positive, absolutely homogeneous ($\|\alpha{\boldsymbol p}\| = |\alpha|\,\|{\boldsymbol p}\|$) and satisfy the triangle inequality. Which function is <em>not</em> a norm?
$\sqrt{x_1^2 + x_2^2}$
$x_1^2 + x_2^2$
$|x_1| + |x_2|$
$\max\{|x_1|, |x_2|\}$
Explanation. $x_1^2 + x_2^2$ is not homogeneous: doubling ${\boldsymbol x}$ quadruples the value. The others are the norms $1$, $\infty$ and $2$.
What is the convex function $f({\boldsymbol x}) = \|{\boldsymbol x} - \begin{pmatrix} 1 \\ 1 \end{pmatrix}\|_2^2$ at the point $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$?
$5$
$\sqrt{5}$
$3$
$25$
Explanation. ${\boldsymbol x} - \begin{pmatrix} 1 \\ 1 \end{pmatrix} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}$, and the squared Euclidean norm is $2^2 + 1^2 = 5$; $\sqrt{5}$ is the norm, $3$ the norm $1$.
Explanation. $f$ is convex if and only if $-f$ is concave: $|x|$ is convex, hence $-|x|$ is concave. It is not convex as well (for example $f(0) = 0 > -1 = \frac{1}{2}f(-1) + \frac{1}{2}f(1)$).
Why is $|x| = \max\{x, -x\}$ a convex function on $\R$?
because it is the sum of two linear functions
because it is differentiable at every point
because it is the maximum of two linear functions
because it is the minimum of two linear functions
Explanation. The maximum of convex functions is convex, and linear functions are convex. The minimum of linear functions is concave; $|x|$ is not differentiable at $0$.
The maximum of two convex functions is convex. Is the <em>minimum</em> of two convex functions convex?
no: the minimum of convex functions is always concave
not always: $\min\{(x-1)^2, (x+1)^2\}$ is not
yes, always, like the maximum
yes, if the two functions intersect
Explanation. $g(x) = \min\{(x-1)^2, (x+1)^2\}$ has $g(-1) = g(1) = 0$ and $g(0) = 1 > 0$: the graph lies above the chord. It is not concave either ($g(3) = 4 < \frac{1}{2}(g(1) + g(5)) = 8$).
If $g : \R^n \to \R$ is convex, the set $\{ {\boldsymbol x} : g({\boldsymbol x}) \le 0 \}$ is convex. What about the set $\{ {\boldsymbol x} : g({\boldsymbol x}) \ge 0 \}$?
not always: it may not be
yes, always, like $\{ g \le 0 \}$
yes, if $g$ is also continuous
it is always the empty set
Explanation. The property holds for constraints $g \le 0$ with $g$ convex. $\{x_1^2 + x_2^2 \ge 1\}$ contains $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} -1 \\ 0 \end{pmatrix}$ but not the origin.
The function $f({\boldsymbol x}) = \|{\boldsymbol x}\|_2^2$ is convex. Is it also a norm (positive, absolutely homogeneous, with the triangle inequality)?
yes: it is the square of a norm
yes: it is convex and nonnegative
no: it is not a convex function
no: it is not absolutely homogeneous
Explanation. A norm satisfies $\|\alpha{\boldsymbol x}\| = |\alpha|\,\|{\boldsymbol x}\|$; the square multiplies by $\alpha^2$. Being convex and nonnegative is not enough to be a norm.
A function $f : D \subseteq \R^n \to \R$, with $D$ convex, is convex if $f(\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for all ${\boldsymbol p}, {\boldsymbol w} \in D$ and $\lambda \in [0,1]$. A function $f$ on $[0, 2]$ satisfies the inequality for $p = 0$, $w = 2$ and every $\lambda \in [0,1]$. What can be concluded?
that $f$ is convex, if it is continuous
that $f$ is not concave on $[0, 2]$
nothing: all pairs $p, w$ are needed
that $f$ is convex on $[0, 2]$
Explanation. A single pair is not enough: $f(x) = -x^2(2-x)^2$ lies below the chord between $0$ and $2$ (which is zero), but with $p = 0$, $w = \frac{1}{2}$, $\lambda = \frac{1}{2}$ we have $f(\frac{1}{4}) = -\frac{49}{256} > -\frac{9}{32} = \frac{1}{2} f(0) + \frac{1}{2} f(\frac{1}{2})$. A linear function passes the check and is concave.
The inequality $\big(\lambda a + (1-\lambda) b\big)^2 \le \lambda a^2 + (1-\lambda) b^2$ holds for $\lambda \in [0,1]$. Does it also hold for $\lambda = 2$, with $a = 1$ and $b = 0$?
no: the left side equals $2$, the right side $4$
no: the left side equals $4$, the right side $2$
yes: it holds for every $\lambda \in \R$
yes: with $b = 0$ the two sides coincide
Explanation. $\big(2 \cdot 1 + (-1) \cdot 0\big)^2 = 4$ and $2 \cdot 1 + (-1) \cdot 0 = 2$. The difference is $\lambda(1-\lambda)(a-b)^2$, which for $\lambda = 2$ equals $-2 < 0$: we need $\lambda \in [0,1]$.
Let $f, g : D \subseteq \R^n \to \R$ be convex in $D$. Which statement is correct?
the product $f \cdot g$ is convex in $D$
the difference $f - g$ is convex in $D$
$\alpha f + \beta g$ is convex in $D$ for all $\alpha, \beta \ge 0$
$\alpha f + \beta g$ is convex in $D$ for all $\alpha, \beta \in \R$
Explanation. Nonnegative coefficients preserve the direction of the convexity inequality. With a negative coefficient one can get a concave function ($x^2 - 2x^2 = -x^2$); the product may not be convex either ($x \cdot x^2 = x^3$).
On a function $f : D \subseteq \R^n \to \R$, with $D$ convex, which statement is correct?
$f$ is convex in $D$ if and only if $f$ is increasing in $D$
$f$ is convex in $D$ if and only if $-f$ is concave in $D$
$f$ is convex in $D$ if and only if $\frac{1}{f}$ is concave in $D$
if $f$ is convex in $D$, then it is not concave in $D$
Explanation. Multiplying by $-1$ reverses the inequality. A linear function is both convex and concave, and $|x|$ is convex without being increasing; the reciprocal has no general link with concavity.
Explanation. It is the convexity of the Euclidean norm written as an inequality. Equality does not hold in general: with ${\boldsymbol w} = -{\boldsymbol p} \ne {\boldsymbol 0}$ and $\lambda = \frac{1}{2}$ the left side is $0$ and the right side is $\|{\boldsymbol p}\|_2$.
The $q$-norm of ${\boldsymbol x} \in \R^n$ is $\|{\boldsymbol x}\|_q = \big(\sum_j |x_j|^q\big)^{1/q}$, with $q \ge 1$. For which value of $q$ does it coincide with the Euclidean norm?
$q = 2$
$q = 1$
$q = \infty$
$q = \frac{1}{2}$
Explanation. With $q = 2$ we get $\sqrt{\sum_j x_j^2}$. With $q = 1$ we have the Manhattan norm, in the limit $q \to \infty$ the maximum norm; $q = \frac{1}{2} < 1$ does not give a norm.
What is the convex function $f({\boldsymbol x}) = \|{\boldsymbol x} - \begin{pmatrix} 2 \\ 2 \end{pmatrix}\|_2 + 1$ at the point $\begin{pmatrix} 5 \\ 6 \end{pmatrix}$?
$5$
$26$
$8$
$6$
Explanation. ${\boldsymbol x} - \begin{pmatrix} 2 \\ 2 \end{pmatrix} = \begin{pmatrix} 3 \\ 4 \end{pmatrix}$, with Euclidean norm $\sqrt{9 + 16} = 5$, plus $1$. With $26$ the squared norm is used, with $8$ the norm $1$.
Does the point $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$ belong to the convex set $\{ {\boldsymbol x} \in \R^2 : |x_1| + |x_2| - 2 \le 0,~ x_1 + x_2 - 1 \le 0 \}$?
no: it violates the first constraint
no: boundary points are excluded
yes: $1 - 2 \le 0$ and $1 - 1 \le 0$
no: it violates the second constraint
Explanation. $|1| + |0| - 2 = -1 \le 0$ and $1 + 0 - 1 = 0 \le 0$: the point satisfies both constraints (the second with equality, on the boundary, which is included).
For $f({\boldsymbol x}) = 2x_1 - x_2 + 3$ on $\R^2$, when does $f(\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}) = \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ hold?
never, because of the constant $3$
for all ${\boldsymbol p}, {\boldsymbol w}$ and every $\lambda \in [0,1]$
only for $\lambda = \frac{1}{2}$, at the midpoint
only if ${\boldsymbol p}, {\boldsymbol w} \ge {\boldsymbol 0}$
Explanation. A linear function plus a constant satisfies the definition with equality (the constant is written $3 = 3\lambda + 3(1-\lambda)$): it is both convex and concave.
What is the norm $\infty$, $\|{\boldsymbol x}\|_\infty = \max_j |x_j|$, of the vector ${\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \\ -3 \end{pmatrix}$?
$3$
$1$
$5$
$\sqrt{11}$
Explanation. The maximum of the absolute values $1, 1, 3$ is $3$. $5$ is the norm $1$, $\sqrt{11}$ the norm $2$; $1$ is the maximum without absolute values.
The non-symmetric matrix ${\boldsymbol Q} = \begin{pmatrix} 1 & 4 \\ -2 & 3 \end{pmatrix}$ defines the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$. Which symmetric matrix defines the same function?
$\begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix}$
$\begin{pmatrix} 1 & 1 \\ 1 & 3 \end{pmatrix}$
$\begin{pmatrix} 1 & 4 \\ 4 & 3 \end{pmatrix}$
$\begin{pmatrix} 1 & -2 \\ -2 & 3 \end{pmatrix}$
Explanation. We use $\tfrac{1}{2}({\boldsymbol Q} + {\boldsymbol Q}')$: off the diagonal $\frac{4 + (-2)}{2} = 1$. Copying only one of the two entries changes the coefficient of $x_1 x_2$.
What is the gradient of the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$, with ${\boldsymbol Q}$ symmetric?
${\boldsymbol Q}\,{\boldsymbol x}$
$2\,{\boldsymbol Q}$
${\boldsymbol x}'{\boldsymbol Q}$
$2\,{\boldsymbol Q}\,{\boldsymbol x}$
Explanation. Observation 4.2: $\frac{\partial f}{\partial x_k} = \sum_j (q_{kj} + q_{jk}) x_j = 2\sum_j q_{kj} x_j$ because ${\boldsymbol Q}$ is symmetric. $2{\boldsymbol Q}$ is the Hessian.
Explanation. The linear part and the constant have zero second-order derivatives: $\nabla^2 g({\boldsymbol x}) = 2{\boldsymbol Q}$, constant. $2{\boldsymbol Q}{\boldsymbol x} + {\boldsymbol c}$ is the gradient.
With ${\boldsymbol Q} = \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}$, what is the gradient of the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ at the point $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$?
Is the symmetric matrix ${\boldsymbol Q} = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$ positive semidefinite, that is, does ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} \ge 0$ hold for every ${\boldsymbol x} \in \R^2$?
yes: it is symmetric and its trace equals $0 \ge 0$
yes: the first diagonal entry, $1$, is positive
no: with ${\boldsymbol x} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$ we get ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = 0$, but $> 0$ is required
no: with ${\boldsymbol x} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$ we get ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = -1 < 0$
Explanation. The function is $x_1^2 - x_2^2$ and equals $-1$ at $(0,1)$: ${\boldsymbol Q}$ is not positive semidefinite and the function is not convex. Symmetry, trace and one positive diagonal entry are not enough; the value $0$ is allowed by the definition.
For ${\boldsymbol Q} = \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}$ we have ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = x_1^2 + x_2^2 + (x_1 - x_2)^2$. What follows?
the quadratic function is concave
the quadratic function is convex only where $x_1 \ge x_2$
${\boldsymbol Q}$ is positive semidefinite and the quadratic function is convex
${\boldsymbol Q}$ is not positive semidefinite, because it has negative entries
Explanation. A sum of squares is $\ge 0$ for every ${\boldsymbol x}$: ${\boldsymbol Q}$ is positive semidefinite and, since a quadratic function is convex if and only if ${\boldsymbol Q}$ is positive semidefinite (Corollary 4.8), the function is convex. The negative off-diagonal entries do not matter.
With ${\boldsymbol Q} \in \R^{n \times n}$ symmetric, ${\boldsymbol c} \in \R^n$ and $d \in \R$, when is the function $g({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} + {\boldsymbol c}'{\boldsymbol x} + d$ convex in $\R^n$?
always, because the linear part is convex
if and only if ${\boldsymbol Q}$ is positive semidefinite
if and only if ${\boldsymbol c} = {\boldsymbol 0}$
if and only if $d \ge 0$
Explanation. Adding a linear function and a constant does not change convexity: only ${\boldsymbol Q}$ decides, and ${\boldsymbol x}'{\boldsymbol Q}{\boldsymbol x}$ is convex if and only if ${\boldsymbol Q}$ is positive semidefinite.
What is the shape of the level sets $\{ {\boldsymbol x} \in \R^2 : f({\boldsymbol x}) = k \}$, nonempty and with $k \ne 0$, of the quadratic functions $x_1^2 + x_2^2$ and $x_1^2 - x_2^2$?
circles for the first, hyperbolas for the second
hyperbolas for the first, circles for the second
circles for both
pairs of parallel lines for both
Explanation. With ${\boldsymbol Q}$ equal to the identity we get circles (Example 4.2); with ${\boldsymbol Q} = \mathrm{diag}(1,-1)$ hyperbolas (Example 4.9). Pairs of parallel lines appear when some direction does not change the value of the function.
Which symmetric matrix ${\boldsymbol Q}$ gives $f({\boldsymbol x}) = 3x_1^2 - 4x_1x_2 + x_2^2$ in the form ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$?
$\begin{pmatrix} 3 & -4 \\ -4 & 1 \end{pmatrix}$
$\begin{pmatrix} 3 & -4 \\ 0 & 1 \end{pmatrix}$
$\begin{pmatrix} 3 & 2 \\ 2 & 1 \end{pmatrix}$
$\begin{pmatrix} 3 & -2 \\ -2 & 1 \end{pmatrix}$
Explanation. The coefficient of $x_1x_2$ is $q_{12} + q_{21} = 2q_{12} = -4$, hence $q_{12} = q_{21} = -2$. The matrix $\begin{pmatrix} 3 & -4 \\ 0 & 1 \end{pmatrix}$ gives the same function, but it is not symmetric.
Is the quadratic function $f({\boldsymbol x}) = x_1^2 + 4x_1x_2 + x_2^2 = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$, with ${\boldsymbol Q}$ symmetric, convex in $\R^2$?
yes: all the coefficients are positive, so the function is a sum of convex terms
no: it is concave, because the mixed term $4x_1x_2$ dominates the two squares
no: with ${\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$ it equals $-2 < 0$, so ${\boldsymbol Q}$ is not positive semidefinite
yes: the coefficients of $x_1^2$ and $x_2^2$ are positive, so ${\boldsymbol Q}$ has a positive diagonal
Explanation. ${\boldsymbol Q} = \begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix}$ and $1 - 4 + 1 = -2$: ${\boldsymbol Q}$ is not positive semidefinite, hence the function is not convex ($4x_1x_2$ is not a convex term). It is not concave either: at $(1,0)$ it equals $1 > 0$.
With ${\boldsymbol Q} \in \R^{n \times n}$ symmetric and ${\boldsymbol c} \in \R^n$, what is the gradient of $g({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} + {\boldsymbol c}'{\boldsymbol x}$ at the point ${\boldsymbol x} = {\boldsymbol 0}$?
$2\,{\boldsymbol Q}$
${\boldsymbol c}$
${\boldsymbol 0}$
$2\,{\boldsymbol c}$
Explanation. $\nabla g({\boldsymbol x}) = 2{\boldsymbol Q}{\boldsymbol x} + {\boldsymbol c}$, which at ${\boldsymbol 0}$ equals ${\boldsymbol c}$.
For the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ with ${\boldsymbol Q} = \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}$, what are $f({\boldsymbol x})$ and the gradient $\nabla f({\boldsymbol x})$ at the point ${\boldsymbol x} = \begin{pmatrix} 1 \\ 2 \end{pmatrix}$?
Which of the following symmetric matrices ${\boldsymbol Q}$ is positive semidefinite, that is, has ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} \ge 0$ for every ${\boldsymbol x} \in \R^2$?
$\begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix}$
$\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$
$\begin{pmatrix} 1 & 0 \\ 0 & -2 \end{pmatrix}$
$\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$
Explanation. ${\boldsymbol x}' \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix} {\boldsymbol x} = (x_1 + x_2)^2 \ge 0$. The others give negative values: with $\begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix}$ and with $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$ the vector $(1,-1)$ gives $-2$; with $\begin{pmatrix} 1 & 0 \\ 0 & -2 \end{pmatrix}$ the vector $(0,1)$ gives $-2$.
Let $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ be the quadratic function of a symmetric matrix ${\boldsymbol Q} \in \R^{n \times n}$. Which statement is correct?
if $f$ is convex, then ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} > 0$ for every ${\boldsymbol x} \ne {\boldsymbol 0}$
$f$ is convex in $\R^n$ if and only if ${\boldsymbol Q}$ is positive semidefinite
$f$ is convex in $\R^n$ if and only if all the entries of ${\boldsymbol Q}$ are nonnegative
$f$ is convex in $\R^n$ if and only if ${\boldsymbol Q}$ is diagonal
Explanation. It is Corollary 4.8: ${\boldsymbol Q}$ positive semidefinite implies $f$ convex, and conversely. Requiring ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} > 0$ for every ${\boldsymbol x} \ne {\boldsymbol 0}$ is too strong: $(x_1 + x_2)^2$ is convex but equals $0$ at $(1,-1)$.
For the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$, with ${\boldsymbol Q} \in \R^{n \times n}$ symmetric, which statement on gradient and Hessian is correct?
$\nabla f({\boldsymbol x}) = 2\,{\boldsymbol Q}\,{\boldsymbol x}$ and $\nabla^2 f({\boldsymbol x}) = 2\,{\boldsymbol Q}$ at every point
$\nabla f({\boldsymbol x}) = {\boldsymbol Q}\,{\boldsymbol x}$ and $\nabla^2 f({\boldsymbol x}) = {\boldsymbol Q}$ at every point
$\nabla f({\boldsymbol x}) = 2\,{\boldsymbol Q}$ and $\nabla^2 f({\boldsymbol x})$ is the zero matrix
Explanation. Differentiating $\sum_i \sum_j q_{ij} x_i x_j$ gives $\nabla f = 2{\boldsymbol Q}{\boldsymbol x}$ and, differentiating again, $\nabla^2 f = 2{\boldsymbol Q}$: the Hessian of a quadratic function is constant. Without the factor $\frac{1}{2}$ in front of ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ the factor $2$ appears.
On the quadratic functions ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ defined by a square matrix ${\boldsymbol Q} \in \R^{n \times n}$, possibly non-symmetric, which statement is correct?
${\boldsymbol Q}$ and ${\boldsymbol Q}'$ define different quadratic functions
only symmetric matrices define quadratic functions
$\tfrac{1}{2}({\boldsymbol Q} + {\boldsymbol Q}')$ defines the quadratic function of ${\boldsymbol Q}$ multiplied by $\frac{1}{2}$
${\boldsymbol Q}$ and $\tfrac{1}{2}({\boldsymbol Q} + {\boldsymbol Q}')$ define the same quadratic function
Explanation. For $i < j$ the terms $q_{ij} x_i x_j + q_{ji} x_j x_i$ depend only on the sum $q_{ij} + q_{ji}$: we can always assume ${\boldsymbol Q}$ symmetric without loss of generality.
To prove that, if the symmetric matrix ${\boldsymbol Q}$ is positive semidefinite, then $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ is convex, what is used (with ${\boldsymbol p}, {\boldsymbol w} \in \R^n$ and $\lambda \in [0,1]$)?
${\boldsymbol Q}$ diagonal with nonnegative entries, so that $f$ is a sum of squares
the triangle inequality for the Euclidean norm, with $\lambda \ge 0$ and $1 - \lambda \ge 0$
the identity $\lambda^2 = \lambda - \lambda(1-\lambda)$, ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} \ge 0$ for ${\boldsymbol x} = {\boldsymbol p} - {\boldsymbol w}$, and $\lambda(1-\lambda) \ge 0$
${\boldsymbol Q}$ positive definite, the single case $\lambda = \frac{1}{2}$ and the symmetry of ${\boldsymbol Q}$
Explanation. We reach ${\lambda {\boldsymbol p}'{\boldsymbol Q}{\boldsymbol p} + (1-\lambda){\boldsymbol w}'{\boldsymbol Q}{\boldsymbol w}} - \lambda(1-\lambda)({\boldsymbol p}-{\boldsymbol w})'{\boldsymbol Q}({\boldsymbol p}-{\boldsymbol w})$ and the subtracted term is $\ge 0$.
To prove that, if $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ (with ${\boldsymbol Q}$ symmetric) is convex, then ${\boldsymbol Q}$ is positive semidefinite, what is used?
the hypothesis that ${\boldsymbol Q}$ has positive diagonal entries, with $\lambda = \frac{1}{2}$
the convexity inequality with $\lambda \in (0,1)$, the division by $\lambda(1-\lambda) > 0$ and the choice ${\boldsymbol p} = {\boldsymbol x}$, ${\boldsymbol w} = {\boldsymbol 0}$
the convexity inequality with $\lambda = 0$, without divisions, and the choice ${\boldsymbol p} = {\boldsymbol x}$, ${\boldsymbol w} = {\boldsymbol 0}$
the hypothesis that ${\boldsymbol Q}$ is positive semidefinite, applied to the vector ${\boldsymbol p} - {\boldsymbol w}$
Explanation. Convexity gives $\lambda(1-\lambda)({\boldsymbol p}-{\boldsymbol w})'{\boldsymbol Q}({\boldsymbol p}-{\boldsymbol w}) \ge 0$; we divide by $\lambda(1-\lambda) > 0$ and choose ${\boldsymbol w} = {\boldsymbol 0}$. With $\lambda = 0$ the inequality is trivial; assuming ${\boldsymbol Q}$ positive semidefinite would assume the thesis.
To prove that, if $g({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} + {\boldsymbol c}'{\boldsymbol x} + d$ is convex, then ${\boldsymbol Q}$ is positive semidefinite, what is needed?
${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = g({\boldsymbol x}) + (-{\boldsymbol c}'{\boldsymbol x} - d)$ is a sum of convex functions, and ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ convex implies ${\boldsymbol Q}$ positive semidefinite
the hypothesis ${\boldsymbol c} = {\boldsymbol 0}$ and $d = 0$, which reduces $g$ to ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ without loss of generality
the fact that the Hessian of $g$ is zero, because $g$ is quadratic
the hypothesis $g$ concave, applied to $-g$ to get the convexity of ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$
Explanation. $-{\boldsymbol c}'{\boldsymbol x} - d$ is linear plus a constant, hence convex; ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ is the sum of two convex functions, and a convex quadratic function has ${\boldsymbol Q}$ positive semidefinite. We cannot assume ${\boldsymbol c} = {\boldsymbol 0}$: it is exactly what must be handled.
For the quadratic function $f({\boldsymbol x}) = x_1^2 + x_2^2$ (matrix ${\boldsymbol Q}$ equal to the identity), what is the Euclidean norm of the gradient $\|\nabla f({\boldsymbol x})\|_2$ at every point of the level set $\{ {\boldsymbol x} : f({\boldsymbol x}) = 1 \}$?
$1$
$\sqrt{2}$
$4$
$2$
Explanation. $\nabla f({\boldsymbol x}) = 2{\boldsymbol Q}{\boldsymbol x} = 2{\boldsymbol x}$ and the points of the level set have $\|{\boldsymbol x}\|_2 = 1$: the norm of the gradient is $2$. $1$ forgets the factor $2$.
For the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ with ${\boldsymbol Q} = \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}$, that is, $f({\boldsymbol x}) = 2x_1^2 - 2x_1x_2 + 2x_2^2$, what is the shape of the level sets $\{ {\boldsymbol x} : f({\boldsymbol x}) = k \}$ with $k > 0$?
hyperbolas centered at the origin
pairs of parallel lines
ellipses centered at the origin
circles centered at the origin
Explanation. ${\boldsymbol Q}$ is positive semidefinite ($f = x_1^2 + x_2^2 + (x_1 - x_2)^2$) and $f > 0$ away from the origin: the level sets are ellipses, stretched along the bisector $x_1 = x_2$ because of the mixed term. Circles would appear only without mixed term and with equal coefficients.
In the proof that positive semidefinite ${\boldsymbol Q}$ makes ${\boldsymbol x}'{\boldsymbol Q}{\boldsymbol x}$ convex, one reaches $\lambda(1-\lambda)({\boldsymbol p} - {\boldsymbol w})'{\boldsymbol Q}({\boldsymbol p} - {\boldsymbol w}) \ge 0$. What is needed?
${\boldsymbol p} = {\boldsymbol w}$
Invertible ${\boldsymbol Q}$
$\lambda > 1$
Positive semidefinite ${\boldsymbol Q}$
Explanation. The factor $\lambda(1-\lambda)$ is nonnegative and so is the quadratic form.
With ${\boldsymbol Q} = \begin{pmatrix} 1 & 0 \\ 0 & -2 \end{pmatrix}$, how is the quadratic function ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ written?
$x_1^2 - 2x_2^2$
$x_1^2 + 2x_2^2$
$x_1 - 2x_2$
$x_1^2 - 2x_1 x_2$
Explanation. ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = \sum_{i,j} q_{ij} x_i x_j = 1 \cdot x_1^2 + (-2) \cdot x_2^2$: the off-diagonal entries are zero, so there is no mixed term.
Explanation. The mixed term $2x_2x_3$ is split between $q_{23}$ and $q_{32}$, which equal $1$ each; the diagonal holds the coefficients of the squares. The last matrix gives the same function but is not symmetric.
With ${\boldsymbol Q} = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}$, what is the quadratic function ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ at the point ${\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$?
$0$
$4$
$2$
$6$
Explanation. ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = 2x_1^2 + 2x_1x_2 + 2x_2^2 = 2 - 2 + 2 = 2$. With $6$ the sign of the mixed term is wrong, with $4$ it is forgotten.
With ${\boldsymbol Q} = \begin{pmatrix} 3 & 1 \\ 1 & 2 \end{pmatrix}$, what is the gradient $\nabla f = 2{\boldsymbol Q}\,{\boldsymbol x}$ of $f({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ at the point $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$?
$\begin{pmatrix} 2 \\ 6 \end{pmatrix}$
$\begin{pmatrix} 6 \\ 2 \end{pmatrix}$
$\begin{pmatrix} 3 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 6 \\ 0 \end{pmatrix}$
Explanation. ${\boldsymbol Q}\begin{pmatrix} 1 \\ 0 \end{pmatrix}$ is the first column $\begin{pmatrix} 3 \\ 1 \end{pmatrix}$, and the gradient is twice it. With $\begin{pmatrix} 3 \\ 1 \end{pmatrix}$ the factor $2$ is forgotten.
For the quadratic function $f({\boldsymbol x}) = x_1^2 + x_2^2$, what is the radius of the circle $\{ {\boldsymbol x} \in \R^2 : f({\boldsymbol x}) = 8 \}$?
$8$
$4$
$64$
$2\sqrt{2}$
Explanation. $x_1^2 + x_2^2 = r^2$ with $r^2 = 8$, hence $r = \sqrt{8} = 2\sqrt{2}$. The level is the square of the radius, not the radius.
What shape does the graph $\{ (x_1, x_2, f({\boldsymbol x})) \}$ of the quadratic function $f({\boldsymbol x}) = x_1^2 + x_2^2$ have in $\R^3$?
a plane through the origin
a sphere centered at the origin
a paraboloid with vertex at the origin
a cone with vertex at the origin
Explanation. The horizontal sections are the circles $x_1^2 + x_2^2 = k$ and the vertical sections are parabolas: it is a paraboloid. The cone is the graph of $\|{\boldsymbol x}\|_2$.
A symmetric matrix ${\boldsymbol Q}$ is positive semidefinite if ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} \ge 0$ for every ${\boldsymbol x}$. Is the zero matrix $\begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}$ positive semidefinite?
only in dimension $n = 1$
yes: ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = 0 \ge 0$ for every ${\boldsymbol x}$
no: it has no positive entries
no: it is not invertible
Explanation. The definition asks for $\ge 0$, not $> 0$: the zero quadratic form satisfies it. Invertibility and the sign of the entries are irrelevant.
Is the quadratic function $f({\boldsymbol x}) = x_1^2 + 2x_1 x_2 + x_2^2 = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$, with ${\boldsymbol Q}$ symmetric, convex?
yes: $f = (x_1 + x_2)^2$ and ${\boldsymbol Q}$ is positive semidefinite
no: the mixed term $2x_1x_2$ makes it nonconvex
no: the matrix ${\boldsymbol Q}$ is not invertible
only where $x_1 \ge 0$ and $x_2 \ge 0$, in the first quadrant
Explanation. ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = (x_1 + x_2)^2 \ge 0$ for every ${\boldsymbol x}$: ${\boldsymbol Q}$ is positive semidefinite (even though singular) and $f$ is convex.
What is the Hessian matrix of $g({\boldsymbol x}) = 2x_1^2 + x_2^2 + 4x_1 - 3$?
$\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}$
$\begin{pmatrix} 4 & 4 \\ 0 & 2 \end{pmatrix}$
$\begin{pmatrix} 8 & 0 \\ 0 & 2 \end{pmatrix}$
$\begin{pmatrix} 4 & 0 \\ 0 & 2 \end{pmatrix}$
Explanation. The linear part $4x_1 - 3$ has zero second derivatives: the Hessian is $2{\boldsymbol Q}$ with ${\boldsymbol Q} = \begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}$.
If the symmetric matrix ${\boldsymbol Q}$ is positive semidefinite, ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ is convex. With the <em>nonsymmetric</em> matrix ${\boldsymbol Q} = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix}$, how is the convexity of ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ studied?
by looking at the diagonal of ${\boldsymbol Q}$, which is positive
with the transpose $\begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix}$, which is symmetric
with the equivalent symmetric matrix $\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$
it cannot be: the proposition requires ${\boldsymbol Q}$ symmetric
Explanation. ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = x_1^2 + 2x_1x_2 + x_2^2$ is the same function as $\frac{1}{2}({\boldsymbol Q} + {\boldsymbol Q}') = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$, which is positive semidefinite: the function is $(x_1+x_2)^2$, convex. The transpose is not symmetric.
A symmetric matrix ${\boldsymbol Q}$ is positive semidefinite if ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} \ge 0$ for every ${\boldsymbol x}$. Is it enough that the diagonal entries are positive? Consider ${\boldsymbol Q} = \begin{pmatrix} 1 & 3 \\ 3 & 2 \end{pmatrix}$.
no: the off-diagonal entries must be zero
no: with ${\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$ we get ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = -3$
A symmetric matrix ${\boldsymbol Q}$ is positive semidefinite if ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} \ge 0$ for every ${\boldsymbol x}$. For ${\boldsymbol Q} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$ we have ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = 2x_1x_2 \ge 0$ for every ${\boldsymbol x} \ge {\boldsymbol 0}$. Is ${\boldsymbol Q}$ positive semidefinite?
no: with ${\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$ it equals $-2$
yes: the check for ${\boldsymbol x} \ge {\boldsymbol 0}$ is enough
yes: ${\boldsymbol Q}$ is symmetric
no: ${\boldsymbol Q}$ has a zero diagonal
Explanation. The definition asks for ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} \ge 0$ for <em>every</em> ${\boldsymbol x} \in \R^n$, also with components of different signs. A zero diagonal alone is not enough to rule it out (the zero matrix is positive semidefinite).
The proof that a positive semidefinite ${\boldsymbol Q}$ makes $f({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ convex reaches $\lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w}) - f(\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}) = \lambda(1-\lambda)({\boldsymbol p} - {\boldsymbol w})'{\boldsymbol Q}({\boldsymbol p} - {\boldsymbol w})$. Besides ${\boldsymbol Q}$ positive semidefinite, what is needed to conclude that it is $\ge 0$?
that ${\boldsymbol p} \ne {\boldsymbol w}$, two distinct points
that ${\boldsymbol Q}$ is also invertible
that ${\boldsymbol p}, {\boldsymbol w} \ge {\boldsymbol 0}$ componentwise
that $\lambda(1-\lambda) \ge 0$, true for $\lambda \in [0,1]$
Explanation. The product of $\lambda(1-\lambda) \ge 0$ and $({\boldsymbol p} - {\boldsymbol w})'{\boldsymbol Q}({\boldsymbol p} - {\boldsymbol w}) \ge 0$ is nonnegative. With ${\boldsymbol p} = {\boldsymbol w}$ the difference is $0$, which is fine as well.
A quadratic function is defined as $f({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = \sum_{i,j} q_{ij} x_i x_j$, with ${\boldsymbol Q}$ symmetric. Does the function $g({\boldsymbol x}) = x_1^2 + x_2^2 + 1$ fit this definition?
yes, because ${\boldsymbol Q}$ is positive semidefinite
no, because the matrix ${\boldsymbol Q}$ is not symmetric
no: ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ equals $0$ at ${\boldsymbol 0}$, while $g({\boldsymbol 0}) = 1$
yes, with ${\boldsymbol Q}$ equal to the identity
Explanation. Every ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ vanishes at the origin: $g$ has an extra constant and is a quadratic function with a linear part (section 4.4), ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} + {\boldsymbol c}'{\boldsymbol x} + d$ with $d = 1$.
The quadratic function $f({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ is convex if and only if ${\boldsymbol Q}$ is positive semidefinite. Which statement on <em>concavity</em> follows?
no quadratic function is concave
$f$ is concave if and only if $-{\boldsymbol Q}$ is positive semidefinite
$f$ is concave if and only if ${\boldsymbol Q}$ is positive semidefinite
$f$ is concave if and only if ${\boldsymbol Q}$ has a negative entry
Explanation. $f$ is concave if and only if $-f = {\boldsymbol x}'(-{\boldsymbol Q})\,{\boldsymbol x}$ is convex, that is, if $-{\boldsymbol Q}$ is positive semidefinite; for example $-x_1^2 - x_2^2$ is concave.
For every symmetric matrix ${\boldsymbol Q}$, which statement on the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ is correct?
if $f$ is convex, then every entry of ${\boldsymbol Q}$ is $\ge 0$
if every entry of ${\boldsymbol Q}$ is $\ge 0$, then $f$ is convex
if $f$ is convex, then ${\boldsymbol Q}$ is invertible
if $f$ is convex, then $f({\boldsymbol x}) \ge 0$ for every ${\boldsymbol x}$
Explanation. If $f$ is convex, ${\boldsymbol Q}$ is positive semidefinite, that is, ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} \ge 0$ for every ${\boldsymbol x}$. $\begin{pmatrix} 1 & -1 \\ -1 & 1 \end{pmatrix}$ gives $(x_1 - x_2)^2$, convex with negative entries and not invertible; $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$ has entries $\ge 0$ but $2x_1x_2$ is not convex.
Let ${\boldsymbol Q} \in \R^{n \times n}$ be symmetric, ${\boldsymbol c} \in \R^n$ and $d \in \R$. Which statement on $g({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} + {\boldsymbol c}'{\boldsymbol x} + d$ is correct?
$g$ is convex if and only if ${\boldsymbol Q}$ is positive semidefinite and $d \ge 0$
$g$ is convex if and only if ${\boldsymbol c}'{\boldsymbol x} + d \ge 0$ for every ${\boldsymbol x}$
$g$ is convex if and only if ${\boldsymbol Q}$ is positive semidefinite, for every ${\boldsymbol c}$ and $d$
$g$ is convex if and only if ${\boldsymbol Q}$ is positive semidefinite and ${\boldsymbol c} = {\boldsymbol 0}$
Explanation. The part ${\boldsymbol c}'{\boldsymbol x} + d$ is both convex and concave: adding it does not change convexity, which depends only on ${\boldsymbol Q}$.
A symmetric matrix ${\boldsymbol Q} = (q_{ij})$ is positive semidefinite if ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} \ge 0$ for every ${\boldsymbol x}$. Which statement holds for every positive semidefinite matrix?
the off-diagonal entries are zero
every diagonal entry $q_{ii}$ is $\ge 0$
every entry $q_{ij}$ is $\ge 0$
${\boldsymbol Q}$ is invertible
Explanation. With ${\boldsymbol x}$ equal to the $i$-th vector of the standard basis, ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = q_{ii} \ge 0$. $\begin{pmatrix} 1 & -1 \\ -1 & 1 \end{pmatrix}$ is positive semidefinite with negative off-diagonal entries and is not invertible.
Which point lies on the level set $\{ {\boldsymbol x} \in \R^2 : 2x_1^2 - 2x_1x_2 + 2x_2^2 = 2 \}$ of the quadratic function ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ with ${\boldsymbol Q} = \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}$?
Explanation. $2 - 2 + 2 = 2$ at $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$; at the other points the function equals $6$, $8$ and $\frac{1}{2}$. The level set is an ellipse stretched along the diagonal $x_1 = x_2$.
What shape does the graph of the nonconvex quadratic function $f({\boldsymbol x}) = x_1^2 - x_2^2$ have?
a paraboloid opening downward
a cone with vertex at the origin
a saddle surface
a paraboloid opening upward
Explanation. Along $x_2 = 0$ the graph is the parabola $x_1^2$, along $x_1 = 0$ the parabola $-x_2^2$: it is a saddle, and its nonempty level sets with $k \ne 0$ are hyperbolas.
Completing the square, how is $g({\boldsymbol x}) = x_1^2 + x_2^2 - 2x_1$ written?
$(x_1 - 1)^2 + x_2^2 + 1$
$(x_1 - 1)^2 + x_2^2 - 1$
$(x_1 - 2)^2 + x_2^2 - 4$
$(x_1 + 1)^2 + x_2^2 - 1$
Explanation. $x_1^2 - 2x_1 = (x_1 - 1)^2 - 1$: halve the coefficient of $x_1$ and subtract its square. The minimum of $g$ is $-1$, at $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$.
What does $g({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} + {\boldsymbol c}'{\boldsymbol x} + d$ become if ${\boldsymbol Q}$ is the zero matrix?
linear plus constant: convex and concave
a nonconvex quadratic function
a convex but not concave function
a function undefined at some points
Explanation. What remains is ${\boldsymbol c}'{\boldsymbol x} + d$, which satisfies the convexity definition with equality. Consistent with the criterion: the zero matrix is positive semidefinite, and so is its opposite.
For any symmetric matrix ${\boldsymbol Q}$, what is the gradient $2{\boldsymbol Q}\,{\boldsymbol x}$ of the quadratic function ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ at the point ${\boldsymbol x} = {\boldsymbol 0}$?
the matrix $2{\boldsymbol Q}$
the vector of the diagonal entries of ${\boldsymbol Q}$
it depends on the matrix ${\boldsymbol Q}$
the zero vector ${\boldsymbol 0}$
Explanation. $2{\boldsymbol Q}\,{\boldsymbol 0} = {\boldsymbol 0}$ for every ${\boldsymbol Q}$: the origin always makes the gradient of ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ vanish. Whether it is a minimum depends on ${\boldsymbol Q}$ instead. $2{\boldsymbol Q}$ is the Hessian matrix.
In an optimization problem with feasible region $F$ and objective function $f$, what is a point ${\boldsymbol x} \in F$ called?
optimal value
feasible solution
optimal solution
point of local minimum
Explanation. The points of $F$ are the feasible solutions; an optimal solution is a feasible solution with the best value of $f$; the optimal value $z(P)$ is a number, not a point.
What are the optimal solution and the optimal value of the problem $P$: $\max\{\, x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 4$
$\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 0$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 2$
Explanation. For $x \in [-1,2]$ we have $|x| \le 2$ and $x^2 \le 4 = f(2)$; $-2$ would give the same value but it is not feasible. $(0)$ is the optimal solution of the minimization form.
An optimization problem $P$ in minimization form, whose objective function decreases indefinitely over the feasible region, what is it called and what is its optimal value $z(P)$?
infeasible, with $z(P)$ not defined
with an unattainable infimum, with $z(P) = 0$
unbounded, with $z(P) = +\infty$
unbounded, with $z(P) = -\infty$
Explanation. In minimization form an unbounded problem has $z(P) = -\infty$; $+\infty$ corresponds to the maximization form. Infeasible means $F = \emptyset$.
What can be said about the problem $P$: $\min\{\, \frac{1}{x} \ \text{subject to}\ x > 0 \,\}$, with optimal value denoted by $z(P)$?
it is unbounded, with $z(P) = -\infty$
it is infeasible
it has an unattainable infimum $0$: there is no optimal solution and $z(P)$ is not defined
$z(P) = 0$, attained for $x \to +\infty$
Explanation. For every $x > 0$ the point $2x$ is feasible and $\frac{1}{2x} < \frac{1}{x}$: no solution is optimal, but the values stay positive (Example 5.6).
In an optimization problem in minimization form, with objective function $f$ and optimal value $z(P)$, what does a feasible solution $\bar{\boldsymbol x}$ provide?
the upper bound $z(P) \le f(\bar{\boldsymbol x})$
the lower bound $f(\bar{\boldsymbol x}) \le z(P)$
the optimal value $z(P) = f(\bar{\boldsymbol x})$
no information on $z(P)$
Explanation. The minimum cannot exceed the value of a feasible solution. In maximization form the opposite holds: $f(\bar{\boldsymbol x})$ is a lower bound.
In a problem in minimization form, three feasible solutions have objective function values $7$, $3$ and $5$. What is the best bound on the optimal value $z(P)$ that follows?
$z(P) \le 7$
$3 \le z(P)$
$z(P) = 3$
$z(P) \le 3$
Explanation. Every value is an upper bound; the best one is the smallest. We cannot conclude $z(P) = 3$: better solutions may exist.
What is the optimal value of the problem $P$: $\min\{\, -3x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$?
$12$
$-12$
$0$
$-3$
Explanation. $\min\{-3 f\} = -3 \max\{f\}$ and the maximum of $x^2$ over $[-1,2]$ is $4$: $-12$, at $x = 2$. Using the minimum of $x^2$ would give $0$.
Which point belongs to the spherical neighborhood $N\left(\begin{pmatrix} 1 \\ 1 \end{pmatrix}, 2\right)$ with center $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ and radius $2$, that is, the set of the points at Euclidean distance <em>less</em> than $2$ from the center?
$\begin{pmatrix} 3 \\ 1 \end{pmatrix}$
$\begin{pmatrix} -1 \\ -1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ \frac{7}{2} \end{pmatrix}$
$\begin{pmatrix} 2 \\ 2 \end{pmatrix}$
Explanation. $(2,2)$ has distance $\sqrt{2} < 2$. $(3,1)$ has distance exactly $2$: the neighborhood is open and does not contain the circle. The others are at distance $2\sqrt{2}$ and $\frac{5}{2}$.
Let $f : D \subseteq \R^n \to \R$ and let $N(\bar{\boldsymbol x}, \delta)$ be the spherical neighborhood with center $\bar{\boldsymbol x}$ and radius $\delta$. When is $\bar{\boldsymbol x} \in D$ a point of local minimum of $f$ in $D$?
if $f(\bar{\boldsymbol x}) < f({\boldsymbol x})$ for every ${\boldsymbol x} \in D$ different from $\bar{\boldsymbol x}$
if the derivative of $f$ vanishes at $\bar{\boldsymbol x}$
if there exists $\delta > 0$ with $f(\bar{\boldsymbol x}) \le f({\boldsymbol x})$ for every ${\boldsymbol x} \in N(\bar{\boldsymbol x}, \delta) \cap D$
if for every $\delta > 0$ there exists ${\boldsymbol x} \in N(\bar{\boldsymbol x}, \delta) \cap D$ with $f(\bar{\boldsymbol x}) \le f({\boldsymbol x})$
Explanation. Definition 5.5: one radius $\delta$ for which the inequality holds in the whole neighborhood (intersected with $D$) is enough. The strict inequality over the whole $D$ describes a unique point of (global) minimum.
In an optimization problem with objective function $f$ and feasible region $F$, what does the operator $\argmin\{ f({\boldsymbol x}) \text{ subject to } {\boldsymbol x} \in F \}$ return?
the set of all the feasible solutions
the set of all the optimal solutions (empty if none exists)
the optimal value $z(P)$
a single optimal solution, chosen at random
Explanation. A problem may have several optimal solutions (even infinitely many, as in Example 5.2) or none: $\argmin$ returns all of them, or the empty set.
For $f(x) = \min\{(x+2)^2,\; (x-2)^2 + 1\}$ in $[-4,4]$, which point is a point of local minimum but not of (global) minimum?
$x = 2$
$x = -2$
$x = 4$
$x = \frac{1}{8}$
Explanation. In $(1,3)$ we have $f(x) = (x-2)^2 + 1 \ge 1 = f(2)$, but $f(-2) = 0 < 1$. $x = -2$ is the global minimum, $x = 4$ the global maximum, $x = \frac{1}{8}$ a local maximum (Example 5.14).
We optimize $f(x) = x^2$ over the feasible region $F = (0, 1]$, in minimization and in maximization form (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value). Which statement is correct?
in minimization form $\tilde{\boldsymbol x}(P) = (0)$ and $z(P) = 0$; in maximization form $\tilde{\boldsymbol x}(P) = (1)$ and $z(P) = 1$
in minimization form the problem is unbounded; in maximization form $z(P) = 1$
in both forms the extremum is not attained
in minimization form the infimum $0$ is not attained; in maximization form $\tilde{\boldsymbol x}(P) = (1)$ and $z(P) = 1$
Explanation. $0 \notin F$ and for every $x \in F$ we have $f(\frac{x}{2}) < f(x)$; the maximum instead is attained at $1 \in F$ (Example 5.5).
For the objective function $f(x) = \max\{0,\; |x| - 1\}$ over the feasible region $F = [-3,3]$, what are the sets of optimal solutions $\argmin$ and $\argmax$?
$\argmin = [-1,1]$ and $\argmax = \{3\}$
$\argmin = \{0\}$ and $\argmax = \{-3, 3\}$
$\argmin = [-1,1]$ and $\argmax = \{-3, 3\}$
$\argmin = \{0\}$ and $\argmax = \{3\}$
Explanation. $f = 0$ on the whole $[-1,1]$ (infinitely many optimal solutions) and $f = 2$ only at $\pm 3$ (two optimal solutions), Example 5.2.
On the points of local minimum and of (global) minimum of a function $f : D \subseteq \R^n \to \R$, which statement is correct?
a point of local minimum cannot be a point of (global) minimum
every point of (global) minimum is a point of local minimum, but the converse does not always hold
every point of local minimum is a point of (global) minimum
a point of (global) minimum, if it exists, is unique
Explanation. A point of minimum satisfies the inequality in the whole $D$, hence in every neighborhood. The converse is false: in Example 5.14 $x = 2$ is a local but not global minimum.
For every objective function $f$, feasible region $F$ (optima taken over ${\boldsymbol x} \in F$, when they exist) and constant $a < 0$, which property is correct?
$\min\{a\, f({\boldsymbol x})\} = a + \min\{f({\boldsymbol x})\}$
Explanation. Property (5.4): multiplying by a negative constant turns the graph upside down, and the points of minimum of $a f$ are the points of maximum of $f$.
Let $\bar{\boldsymbol x}$ be a feasible solution of a problem in maximization form, with objective function $f$ and optimal value $z(P)$. Which statement is correct?
$z(P) \le f(\bar{\boldsymbol x})$: it is an upper bound
$f(\bar{\boldsymbol x}) = z(P)$
$f(\bar{\boldsymbol x}) \ge z(P)$ only if $\bar{\boldsymbol x}$ is a point of local maximum
$f(\bar{\boldsymbol x}) \le z(P)$: it is a lower bound
Explanation. The maximum is at least the value of every feasible solution. Upper bounds from feasible solutions arise in minimization form.
Let $f : D \subseteq \R^n \to \R$ and $N(\bar{\boldsymbol x}, \delta)$ the spherical neighborhood with center $\bar{\boldsymbol x}$ and radius $\delta$. To prove with the definition that $\bar{\boldsymbol x}$ is a point of local minimum of $f$ in $D$, what is enough?
checking that the derivative vanishes at $\bar{\boldsymbol x}$
checking that $f$ is convex
exhibiting one radius $\delta > 0$ for which $f(\bar{\boldsymbol x}) \le f({\boldsymbol x})$ in $N(\bar{\boldsymbol x}, \delta) \cap D$
checking the inequality for every $\delta > 0$
Explanation. One radius is enough: every smaller radius then works too (for $x_1^2 + x_2^2 - \frac{1}{2}x_1^2x_2^2$ at $(0,0)$ we use $\delta = 1$). Zero derivative and convexity are not the definition.
To conclude that the problem $P$: $\min\{\, x^2 \ \text{subject to}\ 0 < x \le 1 \,\}$, with $f(x) = x^2$ and $F = (0,1]$, has no optimal solution, what is used?
the fact that $f$ is convex and $F$ is an interval
for every $x \in F$ the point $\frac{x}{2}$ is feasible and $f(\frac{x}{2}) < f(x)$
the continuity of $f$ over $F$, which has no isolated points
the fact that $F$ is bounded but does not contain $0$
Explanation. Every feasible solution is beaten by another feasible solution, so none is optimal. Continuity, boundedness and convexity hold, but they do not rule out an optimal solution.
To prove that the problem $P$: $\max\{\, (x-2)^2 \ \text{subject to}\ x \in \R \,\}$ is unbounded, what is needed?
for every $M \ge 0$ a feasible solution with value greater than $M$, for instance $x = M + 3$
that $f$ is convex, and hence increases moving away from the vertex $x = 2$
that the derivative $2(x-2)$ vanishes at no point $x \ne 2$
one feasible solution with positive value, for instance $x = 3$ with $f(3) = 1$
Explanation. Unbounded in maximization form means that $f$ increases indefinitely: $f(M+3) = (M+1)^2 > M$ for every $M \ge 0$. A single solution, convexity or the derivative are not enough.
Given $F \subseteq D \subseteq \R^n$ and $f : D \to \R$, what does the optimization problem $P$ in minimization form, with feasible region $F$ and objective function $f$, ask for?
a point $\tilde{\boldsymbol x}(P) \in D$ with $f(\tilde{\boldsymbol x}(P)) \le f({\boldsymbol x})$ for every ${\boldsymbol x} \in D$
a point $\tilde{\boldsymbol x}(P) \in F$ with $f(\tilde{\boldsymbol x}(P)) \le f({\boldsymbol x})$ for some ${\boldsymbol x} \in F$
a point $\tilde{\boldsymbol x}(P) \in F$ with $f(\tilde{\boldsymbol x}(P)) \le 0$, that is, of nonpositive value
a point $\tilde{\boldsymbol x}(P) \in F$ with $f(\tilde{\boldsymbol x}(P)) \le f({\boldsymbol x})$ for every ${\boldsymbol x} \in F$
Explanation. We look for a point of the feasible region $F$ (not of the whole domain $D$) whose value is not beaten, downward, by any other point of $F$.
What is the optimal value of the problem $P$: $\min\{\, 2\left(\frac{1}{5}x^2 - 3\right) \ \text{subject to}\ -5 \le x \le 5 \,\}$?
$4$
$0$
$-6$
$-3$
Explanation. With $a = 2 > 0$, $\min\{a f\} = a \min\{f\}$; $\frac{1}{5}x^2 - 3 \ge -3$, with equality at $x = 0$, so the minimum is $2\cdot(-3) = -6$. $-3$ forgets the factor $2$, $4$ is the maximum (at $x = \pm 5$).
To prove that ${\boldsymbol 0}$ is a point of local minimum of $f({\boldsymbol x}) = x_1^2 + x_2^2 - \frac{1}{2}x_1^2x_2^2$ in $\R^2$, we use the spherical neighborhood $N({\boldsymbol 0}, 1)$ (center ${\boldsymbol 0}$, radius $1$). What is needed?
the vanishing of the gradient of $f$ at ${\boldsymbol 0}$, which alone guarantees the local minimum
in $N({\boldsymbol 0}, 1)$ we have $x_2^2 < 1$, hence $f({\boldsymbol x}) - f({\boldsymbol 0}) = x_1^2(1 - \frac{x_2^2}{2}) + x_2^2 \ge 0$
the convexity of $f$ in the whole $\R^2$, which makes every point with zero gradient a minimum
the fact that $f({\boldsymbol x}) \ge 0$ for every ${\boldsymbol x} \in \R^2$, that is, that ${\boldsymbol 0}$ is a global minimum
Explanation. In the neighborhood $1 - \frac{x_2^2}{2} > \frac{1}{2}$, so the difference is a sum of nonnegative terms. $f$ is neither convex nor $\ge 0$ everywhere: at $(3,3)$ it equals $18 - \frac{81}{2} < 0$; the zero gradient alone is not enough.
In the minimization problem $P$: $\min\{f({\boldsymbol x}) : {\boldsymbol x} \in F\}$, with feasible region $F$, optimal solution $\tilde{\boldsymbol x}(P)$ and optimal value $z(P)$, what is asked?
The maximum of $f$ over $F$
A point of $F$ of minimum value on $F$
The point of $\R^n$ where $f$ is minimal
Any point of $F$
Explanation. The solution must lie in the feasible region.
In the minimization problem $P$: $\min\{f({\boldsymbol x}) : {\boldsymbol x} \in F\}$, with feasible region $F$, optimal solution $\tilde{\boldsymbol x}(P)$ and optimal value $z(P)$, with $f(x) = (x - 3)^2$ and $F = [0, 1]$, what is the optimal solution?
$\tilde x(P) = 1$, with $z(P) = 4$
$\tilde x(P) = 3$, with $z(P) = 0$
$\tilde x(P) = 0$, with $z(P) = 9$
It does not exist
Explanation. On $[0,1]$ the function decreases: the minimum is at $1$; the point $3$ is not feasible.
In the minimization problem $P$: $\min\{f({\boldsymbol x}) : {\boldsymbol x} \in F\}$, with feasible region $F$, optimal solution $\tilde{\boldsymbol x}(P)$ and optimal value $z(P)$, what is the difference between $\tilde{\boldsymbol x}(P)$ and $z(P)$?
They are the same thing
$z(P)$ is a point, $\tilde{\boldsymbol x}(P)$ a number
$z(P)$ is the value of any point of $F$
A point and its value $f(\tilde{\boldsymbol x}(P))$
In the minimization problem $P$: $\min\{f({\boldsymbol x}) : {\boldsymbol x} \in F\}$, with feasible region $F$, optimal solution $\tilde{\boldsymbol x}(P)$ and optimal value $z(P)$, which statement is correct?
An optimal solution always exists
The optimal value depends on the chosen optimal solution
Unique optimal value, possibly many solutions
The optimal solution is always unique
Explanation. All optimal solutions share the same value.
In the minimization problem $P$: $\min\{f({\boldsymbol x}) : {\boldsymbol x} \in F\}$, with feasible region $F$, optimal solution $\tilde{\boldsymbol x}(P)$ and optimal value $z(P)$, a feasible point $\bar{\boldsymbol x}$ has $f(\bar{\boldsymbol x}) = 7$. What is known about $z(P)$?
Nothing
$z(P) \le 7$
$z(P) \ge 7$
$z(P) = 7$
Explanation. In a minimization problem a feasible solution gives an upper bound.
In the minimization problem $P$: $\min\{f({\boldsymbol x}) : {\boldsymbol x} \in F\}$, with feasible region $F$, optimal solution $\tilde{\boldsymbol x}(P)$ and optimal value $z(P)$, a point $\bar{\boldsymbol x}$ with $f(\bar{\boldsymbol x}) = 5$ violates one constraint. Can we say $z(P) \le 5$?
No: $z(P) \ge 5$ holds
No: it is infeasible
Yes, always
Yes, if $f$ is convex
Explanation. Only feasible solutions give upper bounds.
Consider the optimization problem $\max\{\, x - 1 \ \text{subject to}\ 0 \le x \le 3 \,\}$, with objective function $f(x) = x - 1$ defined on all of $\R$. Does the point $\tilde x = 3$ satisfy the definition of optimal solution in maximization form?
no: $f(4) = 3 > 2 = f(3)$
no: the derivative of $f$ does not vanish at $x = 3$
yes, but only as a solution in minimization form
yes: $f(3) = 2 \ge f(x)$ for every $x \in [0, 3]$
Explanation. The comparison is only with the points of the feasible region $F = [0,3]$, not with the whole domain $\R$: $4 \notin F$. At an endpoint of $F$ the derivative need not vanish.
In the optimization problem $\min\{\, x_1^2 + x_2^2 \ \text{subject to}\ x_1 + x_2 \ge 2 \,\}$, what are the function $x_1^2 + x_2^2$ and the set $\{ {\boldsymbol x} \in \R^2 : x_1 + x_2 \ge 2 \}$ called?
optimal value and optimal solution
level set and active constraint
objective function and feasible region
feasible region and objective function
Explanation. The function to be minimized is the objective function; the set of points we choose from is the feasible region, whose points are the feasible solutions.
What are the optimal solution and the optimal value of the problem $P$: $\max\{\, -|x - 1| \ \text{subject to}\ -2 \le x \le 3 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 0$
$\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = -3$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -2$
Explanation. $-|x - 1| \le 0 = f(1)$ for every $x$, and $x = 1$ is feasible. The endpoints give the smallest values, not the largest.
In an optimization problem with objective function $f$ and feasible region $F$ that has <em>no</em> optimal solutions, what does $\argmax\{ f({\boldsymbol x}) \text{ subject to } {\boldsymbol x} \in F \}$ return?
the empty set
the value $+\infty$
the supremum of $f$ over $F$
the whole feasible region $F$
Explanation. $\argmax$ returns the set of the optimal solutions: if there are none, it is the empty set. A value (such as $+\infty$ or the supremum) is not a set of points.
An optimization problem $P$ is written $\min\{ f({\boldsymbol x}) \text{ subject to } {\boldsymbol x} \in F \}$, with optimal solution $\tilde{\boldsymbol x}(P)$ and optimal value $z(P)$. What is its goal?
computing only the optimal value $z(P)$
listing all the points of the region $F$
proving that the region $F$ is convex
finding an optimal solution $\tilde{\boldsymbol x}(P)$, when one exists
Explanation. The symbol $\min$ is an abuse of notation: we look for a point $\tilde{\boldsymbol x}(P)$ of $F$, and its value $z(P) = f(\tilde{\boldsymbol x}(P))$ follows.
What are the optimal solution and the optimal value of the problem $P$: $\min\{\, x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 4$
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 0$
$\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 1$
Explanation. $x^2 \ge 0 = f(0)$ for every $x$, and $0 \in [-1, 2]$: the minimum is at the interior point $x = 0$, not at an endpoint.
How many optimal solutions does the problem $P$: $\min\{\, \max\{0,\; x - 2\} \ \text{subject to}\ 0 \le x \le 5 \,\}$ have?
none, because the minimum is not unique
infinitely many: every $x \in [0, 2]$
only one: the point $x = 2$
only one: the point $x = 0$
Explanation. $\max\{0, x-2\} = 0$ for $x \le 2$ and $> 0$ for $x > 2$: the optimal value $0$ is attained at every point of $[0,2]$. A problem can have infinitely many optimal solutions.
What can be said of the problem $P$: $\min\{\, -x^2 \ \text{subject to}\ x \in \R \,\}$, with optimal value $z(P)$?
it is unbounded, with $z(P) = -\infty$
it has optimal solution $x = 0$, with $z(P) = 0$
it is infeasible and $z(P)$ is not defined
it has an unattainable infimum $0$
Explanation. $-x^2$ decreases indefinitely: for every $M$, the point $x = |M| + 1$ has value less than $-|M|$. The point $x = 0$ is the <em>maximum</em> of $-x^2$.
What can be said of the problem $P$: $\max\{\, x_1 + x_2 \ \text{subject to}\ x_1 + x_2 \le 1,~ x_1 + x_2 \ge 3 \,\}$, with feasible region $F$ and optimal value $z(P)$?
it is unbounded: $z(P) = +\infty$, no optimal solution
it has optimal value $z(P) = 1$, on the line $x_1 + x_2 = 1$
it has optimal value $z(P) = 3$, on the line $x_1 + x_2 = 3$
it is infeasible: $F = \emptyset$, $z(P)$ undefined
Explanation. No point has $x_1 + x_2$ both $\le 1$ and $\ge 3$: the feasible region is empty and there are no feasible solutions, hence no optimal ones.
What can be said of the problem $P$: $\max\{\, x^2 \ \text{subject to}\ -1 \le x < 2 \,\}$, with optimal value $z(P)$?
it has optimal solution $x = -1$, with value $z(P) = 1$
it is unbounded, with optimal value $z(P) = +\infty$
it has an unattainable supremum $4$
it has optimal solution $x = 2$, with value $z(P) = 4$
Explanation. For $x$ close to $2$ the values approach $4$, but $2 \notin F$: for every $x \in [1, 2)$ the point $\frac{x+2}{2}$ is feasible and better. The other values, such as $f(-1) = 1$, are smaller.
For which three reasons can an optimization problem have no optimal solution?
the function is not differentiable, not continuous, or not linear
it is unbounded, it is infeasible, or the bound is not attained
it is unbounded, it is infeasible, or it has several optimal solutions
the region is not convex, the function is not convex, the region is unbounded
Explanation. These are the three cases of the notes. Having several optimal solutions is not a reason for non-existence; unbounded regions or nonconvex functions do not by themselves prevent existence.
In an optimization problem in minimization form, with objective function $f$ and feasible region $F$, what are an optimal solution and the optimal value also called?
minimum point and minimum of $f$ over $F$
stationary point and critical value of $f$
local minimum and infimum of $f$
maximum point and maximum of $f$ over $F$
Explanation. In minimization form, an optimal solution is a (global) minimum point of $f$ in $F$ and the optimal value is the minimum of $f$ over $F$.
In a problem in minimization form, with objective function $f$ and optimal value $z(P)$, a feasible solution $\bar{\boldsymbol x}$ gives the upper bound $z(P) \le f(\bar{\boldsymbol x})$. If $f(\bar{\boldsymbol x}) = z(P)$, what can be concluded?
$\bar{\boldsymbol x}$ is not feasible
the problem is unbounded
$\bar{\boldsymbol x}$ is only a local minimum point
$\bar{\boldsymbol x}$ is an optimal solution
Explanation. $\bar{\boldsymbol x}$ is feasible and its value equals the optimal value: no point of $F$ does better, so $\bar{\boldsymbol x}$ is optimal (like the fourth solution in the figure of the notes).
For the problem $P$: $\min\{\, x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$, with optimal value $z(P)$, what does the feasible solution $\bar x = \frac{1}{2}$ give?
the upper bound $z(P) \le \frac{1}{2}$
the optimal value $z(P) = \frac{1}{4}$
the upper bound $z(P) \le \frac{1}{4}$
the lower bound $\frac{1}{4} \le z(P)$
Explanation. Its objective value is $(\frac{1}{2})^2 = \frac{1}{4}$, and in minimization form a feasible solution gives an upper bound. It is not the optimal value, which is $0$.
In a problem in minimization form, with objective function $f$, feasible region $F$ and optimal value $z(P)$, which condition on a point $\bar{\boldsymbol x}$ is needed to state $z(P) \le f(\bar{\boldsymbol x})$?
that $\bar{\boldsymbol x}$ is a local minimum point
that $\bar{\boldsymbol x}$ is feasible, that is, $\bar{\boldsymbol x} \in F$
that $\bar{\boldsymbol x}$ is an optimal solution
that $f$ is convex on $F$
Explanation. $z(P) \le f({\boldsymbol x})$ holds for every ${\boldsymbol x} \in F$, so feasibility is enough. For a point outside $F$ the value can be smaller than $z(P)$.
The objective function $f$ has minimum $-2$ over $F$, attained only at $\bar{\boldsymbol x}$. What are the optimal solutions and the optimal value of $\min\{\, f({\boldsymbol x}) + 7 \ \text{subject to}\ {\boldsymbol x} \in F \,\}$?
optimal solution $\bar{\boldsymbol x}$, optimal value $5$
optimal solution $\bar{\boldsymbol x}$, optimal value $-2$
optimal solution $\bar{\boldsymbol x}$, optimal value $-14$
optimal solutions changed, optimal value $5$
Explanation. $\min\{a + f\} = a + \min\{f\}$: the optimal value becomes $7 + (-2) = 5$, and adding a constant shifts the graph without changing the optimal solutions.
Over a feasible region $F$, the objective function $f$ has maximum $3$, attained only at $\bar{\boldsymbol x}$, and minimum $-1$, attained only at $\hat{\boldsymbol x}$. What are the optimal solution and the optimal value of $\min\{\, -2 f({\boldsymbol x}) \ \text{subject to}\ {\boldsymbol x} \in F \,\}$?
$\bar{\boldsymbol x}$, with optimal value $6$
$\hat{\boldsymbol x}$, with optimal value $-2$
$\bar{\boldsymbol x}$, with optimal value $-6$
$\hat{\boldsymbol x}$, with optimal value $2$
Explanation. With $a = -2 < 0$, $\min\{a f\} = a \max\{f\} = -2 \cdot 3 = -6$, attained where $f$ is largest, that is, at $\bar{\boldsymbol x}$.
What happens if the objective function $f$ of a minimization problem over a region $F$ is multiplied by a constant $a > 0$?
every minimum point becomes a maximum point
the optimal value is multiplied by $a$, the solutions stay the same
the optimal solutions change, the optimal value stays the same
nothing changes, not even the optimal value
Explanation. $\min\{a f\} = a \min\{f\}$ for $a > 0$: the graph is stretched vertically and the minimum points stay the same. Minimum and maximum are swapped when $a < 0$.
In $\R$, what is the spherical neighborhood $N\big((3), 2\big)$ with center $3$ and radius $2$, that is, the set of the points at distance less than $2$ from $3$?
the interval $(1, 5]$
the open interval $(3, 5)$
the open interval $(1, 5)$
the closed interval $[1, 5]$
Explanation. $|x - 3| < 2$ is equivalent to $1 < x < 5$: in $\R$ the neighborhood is an open interval centered at the center, without endpoints.
Does the point ${\boldsymbol x} = \begin{pmatrix} 4 \\ 5 \end{pmatrix}$ belong to the spherical neighborhood $N\left(\begin{pmatrix} 4 \\ 4 \end{pmatrix}, 1\right)$, the set of the points at Euclidean distance less than $1$ from $\begin{pmatrix} 4 \\ 4 \end{pmatrix}$?
no: its distance from the center is $2$
no: its distance from the center is exactly $1$
yes: its distance from the center is $1 \le 1$
yes: the neighborhood contains its bounding circle
Explanation. $\sqrt{(4-4)^2 + (4-5)^2} = 1$, which is not less than $1$: the point lies on the circle, excluded from the neighborhood (strict inequality).
How many local minimum points can a function $f : D \subseteq \R^n \to \R$ have in $D$?
even infinitely many
at most one
at most two
exactly one, if the minimum exists
Explanation. For example $f(x) = 0$ on $\R$: every point is a local (and global) minimum point. The notes observe it for local minima and for minimum points.
For $f({\boldsymbol x}) = x_1^2 + x_2^2 - \frac{1}{2}x_1^2 x_2^2$ on $\R^2$, the point ${\boldsymbol 0}$ is a local minimum point with $f({\boldsymbol 0}) = 0$. Why is it not a (global) minimum point?
because $f$ is unbounded above
because the gradient does not vanish at ${\boldsymbol 0}$
because $f\left(\begin{pmatrix} 1 \\ 1 \end{pmatrix}\right) = 0$
because $f\left(\begin{pmatrix} 3 \\ 3 \end{pmatrix}\right) = -\frac{45}{2} < 0$
Explanation. One point with value less than $f({\boldsymbol 0}) = 0$ is enough: $9 + 9 - \frac{81}{2} = -\frac{45}{2}$. That $f$ grows elsewhere does not matter; at $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ it equals $\frac{3}{2}$.
For $f(x) = \min\{(x+2)^2,\; (x-2)^2 + 1\}$ on the domain $[-4, 4]$, what are the (global) maximum point and the maximum?
$x = \frac{1}{8}$, maximum $\frac{289}{64}$
$x = 2$, maximum $1$
$x = 4$, maximum $5$
$x = -4$, maximum $4$
Explanation. $f(4) = \min\{36, 5\} = 5$, $f(-4) = \min\{4, 37\} = 4$, $f(\frac{1}{8}) = \frac{289}{64} < 5$: the last two are local maxima, not global; $x = 2$ is a local minimum.
Let $f : D \subseteq \R^n \to \R$ and $N(\bar{\boldsymbol x}, \delta)$ the spherical neighborhood with center $\bar{\boldsymbol x}$ and radius $\delta$. If $f(\bar{\boldsymbol x}) \le f({\boldsymbol x})$ for all ${\boldsymbol x} \in N(\bar{\boldsymbol x}, \delta) \cap D$, which statement is correct?
$f$ is constant on the whole neighborhood $N(\bar{\boldsymbol x}, \delta) \cap D$
the same inequality holds with every radius smaller than $\delta$
the same inequality holds with every radius larger than $\delta$
$\bar{\boldsymbol x}$ is also a (global) minimum point of $f$ on all of $D$
Explanation. A smaller neighborhood is contained in the one with radius $\delta$, so the inequality still holds; with larger radii it may fail, and the local minimum may not be global.
For every objective function $f$, every feasible region $F$ and every constant $a > 0$ (optima over ${\boldsymbol x} \in F$, when they exist), which property is correct?
Explanation. A positive constant stretches the graph without flipping it: this holds for the maximum as for the minimum. Swapping min/max is needed only with $a < 0$, and an added constant is added to the optimal value.
On the optimal value $z(P)$ of an optimization problem $P$ with feasible region $F$, which statement is correct?
if $F = \emptyset$ it is $+\infty$; if $P$ is a minimization and unbounded it is $-\infty$
if the infimum is not attained, $z(P)$ is the infimum
if $F$ is bounded, $z(P)$ is always defined
if $F = \emptyset$ it is not defined; if $P$ is a minimization and unbounded it is $-\infty$
Explanation. For an infeasible problem $z(P)$ is not defined, and likewise when the bound is not attained (even with $F$ bounded, as $F = (0,1]$ for $\min x^2$); an unbounded minimization problem has $z(P) = -\infty$.
In a minimization problem with objective function $f : D \subseteq \R^n \to \R$ and feasible region $F \subseteq D$, which points are the optimal solutions?
the (global) minimum points of $f$ in $F$
the local minimum points of $f$ in $F$
the points of $F$ where the gradient of $f$ vanishes
the minimum points of $f$ in the domain $D$
Explanation. The optimal solutions are the global optima of $f$ restricted to $F$. A local minimum may not be global; a minimum point in $D$ may not lie in $F$; a zero gradient is neither sufficient nor necessary.
For every objective function $f$, every feasible region $F$ and every constant $a < 0$ (optima over ${\boldsymbol x} \in F$, when they exist), which property is correct?
Explanation. With $a < 0$ the graph flips: the maximum of $a f$ occurs where $f$ is smallest, and equals $a$ times the minimum of $f$ (for example $\max\{-x^2\} = -\min\{x^2\}$).
In an optimization problem $P$ in maximization form, with objective function $f$ and feasible region $F$, what does it mean that the optimal value is $z(P) = +\infty$?
that the supremum is attained at infinity
that the optimal solution is the point $x = +\infty$
that the problem is unbounded: $f$ grows indefinitely over $F$
that the feasible region $F$ is the empty set
Explanation. $z(P) = +\infty$ is the convention for an unbounded maximization problem; there is no optimal solution. For $F = \emptyset$ the optimal value is not defined.
What are the optimal solution and the optimal value of the problem $P$: $\min\{\, (x-2)^2 \ \text{subject to}\ x \in \R \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
it has an unattainable infimum $0$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 0$
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 4$
it is unbounded, with $z(P) = -\infty$
Explanation. $(x-2)^2 \ge 0 = f(2)$ for every $x$: the minimum exists even though $F = \R$ is unbounded. It is the <em>maximization</em> form of the same problem that is unbounded.
What can be said of the problem $P$: $\max\{\, \frac{1}{x} \ \text{subject to}\ x > 0 \,\}$, with optimal value $z(P)$?
it is unbounded, with $z(P) = +\infty$
it has a supremum not attained at $x = 0$
it has optimal solution $x = 1$, with $z(P) = 1$
it is infeasible, because $x = 0$ is excluded
Explanation. For every $M > 0$ the point $x = \frac{1}{M+1}$ is feasible and has value $M + 1 > M$: the objective function grows indefinitely near $0$. There is no finite supremum.
What are the optimal solution and the optimal value of the problem $P$: $\max\{\, x^2 \ \text{subject to}\ 0 < x \le 1 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
it does not exist: the supremum $1$ is not attained
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 0$
it is unbounded, with $z(P) = +\infty$
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
Explanation. $x^2 \le 1 = f(1)$ for $0 < x \le 1$ and $1 \in F$: the maximum is attained. The excluded endpoint, $0$, matters for the minimization form, which has an unattainable infimum.
In the definition of an optimization problem a feasible region $F$ and an objective function $f$ with domain $D$ are given. Which relation must hold between $F$ and $D$?
$F = D$: the feasible region is the domain
$F \cap D = \emptyset$: the two sets are disjoint
$F \subseteq D$: $f$ is defined at every feasible point
$D \subseteq F$: every point of the domain is feasible
Explanation. We must be able to compute $f({\boldsymbol x})$ for every ${\boldsymbol x} \in F$. The domain can be larger, as $D = \R$ and $F = [-1, 2]$ in the examples.
An optimization problem $P$ with objective function $f$ has a feasible region made of a single point, $F = \{\bar{\boldsymbol x}\}$. What can be said of the optimal solution $\tilde{\boldsymbol x}(P)$ and of the optimal value $z(P)$?
$\bar{\boldsymbol x}$ is optimal only if $f(\bar{\boldsymbol x}) = 0$
$\tilde{\boldsymbol x}(P) = \bar{\boldsymbol x}$ and $z(P) = f(\bar{\boldsymbol x})$, in minimization and maximization form
they do not exist, because there are no other points to compare
they exist only in minimization form, not in maximization
Explanation. The condition $f(\bar{\boldsymbol x}) \le f({\boldsymbol x})$ (or $\ge$) for every ${\boldsymbol x} \in F$ needs checking only for ${\boldsymbol x} = \bar{\boldsymbol x}$, where it holds with equality.
What are the optimal solution and the optimal value of the problem $P$: $\max\{\, -\big(\frac{1}{5}x^2 + 1\big) \ \text{subject to}\ -5 \le x \le 5 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = -1$
$\tilde{\boldsymbol x}(P) = (5)$, $z(P) = -6$
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (5)$, $z(P) = 6$
Explanation. $\max\{-f\} = -\min\{f\}$: the minimum of $\frac{1}{5}x^2 + 1$ is $1$, at $x = 0$, hence the maximum of $-f$ is $-1$, at the same point.
For $f(x) = |x|$ on the domain $D = [-1, 2]$, what is the point $x = 2$?
only a local maximum point, not a global one
a local minimum point of $f$ in $D$
neither, because it is an endpoint of $D$
a global (and local) maximum point
Explanation. $|x| \le 2 = f(2)$ for every $x \in [-1, 2]$: it is the maximum, and every maximum point is also a local maximum point. The endpoints of the domain can be optimal; $x = -1$ is a local maximum that is not global.
For $f(x) = x$ on the domain $D = [0, 1]$, is the point $x = 0$ a local minimum point, that is, is there $\delta > 0$ with $f(0) \le f(x)$ for all $x$ of the neighborhood $N\big((0), \delta\big) = (-\delta, \delta)$ lying in $D$?
no: an endpoint of the domain cannot be a local minimum
yes, but it is only local and not global
yes, even though the derivative of $f$ at $0$ is not zero
no: the derivative of $f$ at $0$ equals $1 \ne 0$
Explanation. On $N((0), \delta) \cap [0,1] = [0, \delta)$ we have $f(x) = x \ge 0 = f(0)$. The definition compares values in $D$: a zero derivative is not required, and here $0$ is also the global minimum point.
For $f(x) = \min\{(x+2)^2,\; (x-2)^2 + 1\}$ on the domain $[-4, 4]$, the (global) maximum point is $x = 4$. Which other points are local maximum points?
$x = 0$ and $x = -4$
$x = -4$ and $x = \frac{1}{8}$
none: there is only $x = 4$
$x = -2$ and $x = 2$
Explanation. Near $-4$, $f(x) = (x+2)^2 \le 4 = f(-4)$; at $x = \frac{1}{8}$ the two parabolas meet and $f$ has a peak there, $\frac{289}{64}$. The points $-2$ and $2$ are local minimum points.
For $f(x) = x^2 - 4x$ on the domain $D = [0, 1]$, what are the (global) minimum point and the minimum of $f$ in $D$?
$\tilde x = 1$, minimum $-3$
$\tilde x = 2$, minimum $-4$
$\tilde x = 0$, minimum $0$
$\tilde x = 1$, minimum $-4$
Explanation. $f(x) = (x-2)^2 - 4$ decreases on $[0,1]$, because $2 \notin D$: the minimum is at the endpoint $1$, with $f(1) = -3$. The vertex $x = 2$ does not belong to the domain.
In the problem $\max\{\, x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$ the value $x^2 = 4$ is obtained for $x = -2$ and for $x = 2$. Why is only $x = 2$ an optimal solution?
because $x = -2$ is not feasible
because $2$ is greater than $-2$ and we maximize
because $x = -2$ is a minimum point
it is not true: both are optimal solutions
Explanation. An optimal solution must be feasible: $-2 \notin [-1, 2]$. In $F$ we have $|x| \le 2$, hence $x^2 \le 4 = f(2)$.
Can an infeasible optimization problem, that is, one with feasible region $F = \emptyset$ (and optimal value $z(P)$), also be unbounded?
yes, if the objective function is unbounded on its domain
yes, but only in maximization form
yes: then $z(P) = -\infty$ and $z(P)$ is not defined
no: on an empty $F$ the function takes no values
Explanation. Unbounded means that the objective function improves indefinitely over the feasible region $F$: with $F$ empty there are no values to compare, and $z(P)$ is not defined.
For the problem $P$: $\max\{\, x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$, with optimal value $z(P)$, the feasible solutions $\bar x^{(1)} = -1$, $\bar x^{(2)} = \frac{1}{2}$, $\bar x^{(3)} = 1$ are known. What is the best bound on $z(P)$ that they give?
$z(P) \le 1$
$4 \le z(P)$
$1 \le z(P)$
$\frac{1}{4} \le z(P)$
Explanation. The values are $1$, $\frac{1}{4}$, $1$; in maximization form every feasible solution gives a lower bound and the best one is the largest. $z(P) = 4$ does not follow from these solutions.
How many and which are the optimal solutions of the problem $\min\{\, -2\big(\frac{1}{5}x^2 - 3\big) \ \text{subject to}\ -5 \le x \le 5 \,\}$?
none, because the coefficient is negative
two: $x = -5$ and $x = 5$, with optimal value $-4$
one: $x = 0$, with optimal value $6$
one: $x = 5$, with optimal value $-4$
Explanation. $\min\{-2 f\} = -2 \max\{f\}$: the maximum of $\frac{1}{5}x^2 - 3$ over $[-5,5]$ is $2$, attained at both endpoints, hence two optimal solutions with value $-4$. At $x = 0$ we have the maximum of $-2f$.
Let $f : D \subseteq \R^n \to \R$ and $N(\bar{\boldsymbol x}, \delta)$ the spherical neighborhood with center $\bar{\boldsymbol x} \in D$ and radius $\delta$. What is enough to show to conclude that $\bar{\boldsymbol x}$ is <em>not</em> a local minimum point?
that there is ${\boldsymbol x} \in D$ with $f({\boldsymbol x}) < f(\bar{\boldsymbol x})$
that the derivative of $f$ at $\bar{\boldsymbol x}$ is not zero
that there are $\delta > 0$ and ${\boldsymbol x} \in N(\bar{\boldsymbol x}, \delta)$ with $f({\boldsymbol x}) > f(\bar{\boldsymbol x})$
that for every $\delta > 0$ there is ${\boldsymbol x} \in N(\bar{\boldsymbol x}, \delta) \cap D$ with $f({\boldsymbol x}) < f(\bar{\boldsymbol x})$
Explanation. It is the negation of the definition: no radius works. A distant point with a smaller value only rules out the global minimum; the derivative is not enough (for example $f(x) = x$ on $[0,1]$ has a local minimum at $0$).
For $f(x) = x^3$ on the domain $\R$, what is the point $x = 0$, where the derivative vanishes?
a local maximum point, because $f'(0) = 0$
a global minimum point of $f$ on $\R$
neither a local minimum nor a local maximum
a local minimum point, because $f'(0) = 0$
Explanation. In every neighborhood $(-\delta, \delta)$ there are points with $x^3 < 0$ and points with $x^3 > 0$: neither inequality of the definition holds. A zero derivative is not enough.
What are the optimal solution and the optimal value of the convex minimization problem $P$: $\min\{\, (x-2)^2 + 1 \ \text{subject to}\ 0 \le x \le 5 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 5$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 0$
$\tilde{\boldsymbol x}(P) = (5)$, $z(P) = 10$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 1$
Explanation. The derivative $2(x-2)$ vanishes at $2$, which is feasible and a point of local minimum; in a convex minimization problem every local minimum is optimal (Proposition 6.2), hence $z(P) = f(2) = 1$.
What are the optimal solution and the optimal value of the concave maximization problem $P$: $\max\{\, -(x-3)^2 + 10 \ \text{subject to}\ 0 \le x \le 5 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (5)$, $z(P) = 6$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 0$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 10$
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 1$
Explanation. The derivative $-2(x-3)$ vanishes at $3$, which is feasible and a point of local maximum; in a concave maximization problem every local maximum is optimal (Corollary 6.3), hence $z(P) = f(3) = 10$.
In a convex minimization problem, how many points of local minimum that are not optimal solutions can exist?
it depends on the dimension $n$
none
at most one
infinitely many, if the feasible region is unbounded
Explanation. In a convex minimization problem (convex feasible region and objective function) every point of local minimum is a point of minimum, that is, an optimal solution (Proposition 6.2), whatever the dimension and even if the region is unbounded.
Why is the interval $[a,b] = \{ x \in \R : g_1(x) = a - x \le 0,~ g_2(x) = x - b \le 0 \}$ a convex feasible region?
because it is described by constraints $g_i(x) \le 0$ with linear, hence convex, functions $g_i$
because it is bounded, so every segment between two of its points stays inside it
because it is closed, that is, it contains its endpoints $a$ and $b$
because it is described by constraints $g_i(x) \le 0$ with differentiable functions $g_i$
Explanation. If every $g_i$ is convex, $\{ {\boldsymbol x} : g_i({\boldsymbol x}) \le 0 \}$ is convex (Observation 3.14). Closedness, boundedness and differentiability play no role.
Knowing that $f(x) = 2 + 9x - 6x^2 + x^3$ is convex over $[2,4]$, what are the optimal solution and the optimal value of the problem $P$: $\min\{\, 2 + 9x - 6x^2 + x^3 \ \text{subject to}\ 2 \le x \le 4 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 6$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 4$
$\tilde{\boldsymbol x}(P) = (4)$, $z(P) = 6$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 2$
Explanation. The derivative $3(x-1)(x-3)$ vanishes at $1$ and $3$; only $3$ is feasible, and it is optimal because the problem is a convex minimization problem (Example 6.3). At the endpoints $f(2) = 4$, $f(4) = 6$.
Knowing that $f(x) = 2 + 9x - 6x^2 + x^3$ is concave over $[0,2]$, what are the optimal solution and the optimal value of the problem $P$: $\max\{\, 2 + 9x - 6x^2 + x^3 \ \text{subject to}\ 0 \le x \le 2 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 2$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 2$
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 6$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 4$
Explanation. The derivative $3(x-1)(x-3)$ vanishes at $1$ and $3$; only $1$ is feasible, it is a local maximum and, in the concave maximization problem, it is optimal: $z(P) = 2 + 9 - 6 + 1 = 6$.
To solve a convex problem in one variable, such as ${\min\{\, (x-2)^2 + 1 \ \text{subject to}\ 0 \le x \le 5 \,\}}$, what role does the point where the derivative of the objective function vanishes play?
it suggests the candidate, whose local optimality is then checked with the definition
it proves by itself that the point is an optimal solution, for every problem
it proves that the objective function is convex
it is always an endpoint of the feasible region
Explanation. The zero derivative indicates where to look; then the local minimum (maximum) is checked in a neighborhood and Proposition 6.2 (or Corollary 6.3) gives optimality.
In the problem $P$: $\min\{\, -x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$, which statement is correct?
$x = -1$ is the optimal solution, because it is a point of local minimum
$x = 0$ is the optimal solution, because the derivative vanishes there
it is a convex minimization problem, hence $x = -1$ is optimal
$x = -1$ is a point of local minimum but not an optimal solution, which is $x = 2$
Explanation. The objective function is concave, so it is not a convex minimization problem and local minima may not be optimal. $f(-1) = -1$ is a local minimum, but $f(2) = -4 < -1$; at $0$ there is the maximum.
In the problem $P$: $\max\{\, x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$, what can be said about the point $x = -1$?
it is not a point of local maximum, because $x^2$ grows toward $x = 2$
the problem is a concave maximization problem, so it is optimal
it is a point of local maximum but not an optimal solution, which is $x = 2$
it is the optimal solution, because it is a point of local maximum
Explanation. Near $-1$ (inside $F$) we have $x^2 \le 1$, but $f(2) = 4 > 1$. The function is convex, not concave: the result «local maximum = optimal» holds only for concave maximization.
What are the optimal solution and the optimal value of the problem $P$: $\min\{\, (x_1-2)^2 + (x_2-2)^2 \ \text{subject to}\ x_1 + x_2 \le 2,~ x_1 \ge 0,~ x_2 \ge 0 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. It is the point of the triangle closest to $(2,2)$, which is not feasible: the level circle $2$ touches the side $x_1 + x_2 = 2$ at $(1,1)$ (Exercise 6.3).
$\begin{pmatrix} 2 \\ 0 \end{pmatrix}, \begin{pmatrix} -2 \\ 0 \end{pmatrix} \in F_2$, and their sum $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$ does not belong to $F_2$
$\begin{pmatrix} 2 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 2 \end{pmatrix} \in F_2$, and with $\lambda = \frac{1}{2}$ we get $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, which does not belong to $F_2$
$\begin{pmatrix} 2 \\ 0 \end{pmatrix}, \begin{pmatrix} -2 \\ 0 \end{pmatrix} \in F_2$, and with $\lambda = \frac{1}{2}$ we get $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$, where $0 + 0 - 2 = -2 < 0$
Explanation. We need a convex combination of two points of $F_2$ outside $F_2$. The midpoint $(1,1)$ of $(2,0)$ and $(0,2)$ gives $1 + 1 - 2 = 0 \ge 0$: it belongs to $F_2$, so it proves nothing (Exercise 6.5).
What are the optimal solution and the optimal value of the problem $P$: $\min\{\, (x_1-3)^2 + (x_2-3)^2 \ \text{subject to}\ x_1^2 + x_2^2 - 2 \le 0 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. It is the point of the disk of radius $\sqrt{2}$ closest to $(3,3)$, which is not feasible: along the direction $(1,1)$ we reach the boundary at $(1,1)$, with $(1-3)^2 + (1-3)^2 = 8$.
On convex and concave optimization problems (convex feasible region, convex or concave objective function), which statement is correct?
in a convex minimization problem, the optimal solution is always unique
in a convex minimization problem, every point of local minimum is an optimal solution
in a convex minimization problem, every feasible solution is a point of local minimum
in a maximization problem with a convex objective function, every point of local maximum is an optimal solution
Explanation. It is Proposition 6.2. The optimal solution may not be unique ($\min\{\max\{0, |x|-1\} : -3 \le x \le 3\}$ has infinitely many optimal solutions); the maximization of a convex function is disproved by $\max\{x^2 : -1 \le x \le 2\}$.
On problems with convex feasible region and concave objective function, which statement is correct?
in a concave maximization problem, a point is a point of local maximum if and only if it is a point of maximum
in a concave minimization problem, every point of local minimum is an optimal solution
in a concave maximization problem, the optimal solution always lies on the boundary of the feasible region
in a concave maximization problem, every point of local maximum is unique
Explanation. Corollary 6.3: maximizing a concave $f$ is equivalent to minimizing the convex $-f$, where every local minimum is optimal. In concave minimization the local minima may not be optimal (for instance $\min\{-x^2 : -1 \le x \le 2\}$ at $x = -1$).
On the inequality of cubes, for $a, b \in \R$ and $\lambda \in [0,1]$, which statement is correct?
$\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$ for every $a, b \in \R$
$\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$ if $a, b \le 0$
$\big(\lambda a + (1-\lambda) b\big)^3 \ge \lambda a^3 + (1-\lambda) b^3$ if $a, b \ge 0$
$\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$ if $a, b \ge 0$
Explanation. Observation 6.4: the difference equals $\lambda(1-\lambda)(a-b)^2\big((1+\lambda) a + (2-\lambda) b\big)$, nonnegative if $a, b \ge 0$ and nonpositive if $a, b \le 0$.
To prove that in a convex minimization problem ($F$ convex, $f$ convex over $F$) every point of local minimum $\bar{\boldsymbol x}$ is optimal, we compare it with an arbitrary ${\boldsymbol x} \in F$. What is used?
the boundedness of $F$, which guarantees the existence of a point of minimum
the uniqueness of the optimal solution, which must then coincide with $\bar{\boldsymbol x}$
the convexity of $F$ and of $f$, the point $\lambda {\boldsymbol x} + (1-\lambda)\bar{{\boldsymbol x}}$ close to $\bar{{\boldsymbol x}}$ for small $\lambda$, and the division by $\lambda > 0$
the differentiability of $f$ and the vanishing of the derivative at $\bar{\boldsymbol x}$, which locates the minimum
Explanation. With $\hat{\boldsymbol x} = \lambda {\boldsymbol x} + (1-\lambda)\bar{\boldsymbol x} \in F$ in the neighborhood, from the two inequalities $f(\bar{\boldsymbol x}) \le f(\hat{\boldsymbol x}) \le \lambda f({\boldsymbol x}) + (1-\lambda) f(\bar{\boldsymbol x})$ we get $\lambda f(\bar{\boldsymbol x}) \le \lambda f({\boldsymbol x})$ and divide by $\lambda > 0$. No derivatives are needed.
To prove that in a concave maximization problem ($F$ convex, $f$ concave over $F$) every point of local maximum is optimal, what is used?
the fact that $f \ge 0$ over $F$, so that maximizing $f$ is the same as maximizing $|f|$
$-f$ convex, a local maximum of $f$ is a local minimum of $-f$, and in convex problems local minima are optimal
the differentiability of $f$ and the negative sign of the second derivative at the local maximum
the boundedness of $F$ and the continuity of $f$, which guarantee the existence of a maximum
Explanation. $f$ concave is equivalent to $-f$ convex and $\max\{f\} = -\min\{-f\}$: we apply the result on local minima of convex minimization problems. Neither derivatives nor boundedness are needed.
We want to prove that $f(x) = (x-2)^3 - 3(x-2) + 4$ is convex over $[2,4]$ with the inequality of cubes $\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$, setting $a = p - 2$, $b = w - 2$ with $p, w \in [2,4]$ and $\lambda \in [0,1]$. What is needed?
that $a, b \ge 0$, the condition under which the inequality of cubes holds
that $a, b \le 0$, the condition under which the inequality of cubes holds
nothing on the sign: the inequality of cubes holds for every $a, b \in \R$
the single case $\lambda = \frac{1}{2}$, which then extends by symmetry
Explanation. The inequality of cubes with $\le$ holds for $a, b \ge 0$, and over $[2,4]$ we have $p - 2, w - 2 \ge 0$; for $a, b \le 0$ it holds with $\ge$ (concavity over $[0,2]$). The part $-3(x-2) + 4$ is linear and does not change convexity.
What are the optimal solution and the optimal value of the convex minimization problem $P$: $\min\{\, (x-5)^2 \ \text{subject to}\ 0 \le x \le 3 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (5)$, $z(P) = 0$
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 25$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 2$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 4$
Explanation. The derivative $2(x-5)$ vanishes at $5$, which is not feasible; over $[0,3]$ the derivative is negative, so $f$ decreases and the minimum is at the endpoint $3$, with $(3-5)^2 = 4$. $(5)$ is not feasible, $(0)$ is the maximum.
The proof that a local minimum $\bar{\boldsymbol x}$ of a convex problem is global considers points $\lambda{\boldsymbol x} + (1-\lambda)\bar{\boldsymbol x}$ near $\bar{\boldsymbol x}$. Which assumptions are needed?
Bounded $F$
Quadratic $f$
Convex $F$ and $f$
Only continuous $f$
Explanation. Without convexity of $F$ the points of the segment might leave $F$.
We want to conclude that the local minimum found for $\min\{f({\boldsymbol x}) : {\boldsymbol x} \in F\}$ is global. Which assumption is essential, besides convex $f$?
That $F$ contains the origin
That $F$ is convex
That $F$ is bounded
That $f$ is positive
Explanation. With nonconvex $F$ (e.g. two disjoint intervals) a local minimum may not be global.
An optimization problem with a convex feasible region is called convex if the objective function is convex on the region, concave if it is concave. Can a <em>concave</em> problem be written in minimization form?
no: in minimization form it is called a convex problem
yes, but only if the feasible region is bounded
yes: the definition concerns $F$ and $f$, not the form
no: a concave problem is by definition a maximization problem
Explanation. Convex and concave describe $F$ and $f$; the form (minimization or maximization) is another choice. For example $\min\{-x^2 \text{ subject to } x \in [-1,2]\}$ is a concave problem in minimization form.
Why do the definitions of convex and concave optimization problems require a convex feasible region $F$?
because a convex $F$ makes every objective function convex
because convex and concave functions are defined on a convex domain
because otherwise the feasible region would be empty
because problems with nonconvex $F$ have no solutions
Explanation. The convexity inequality uses the points $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$, which must lie in the domain: to speak of $f$ convex on $F$ we need $F$ convex.
A feasible region is often described as $F = \{ {\boldsymbol x} \in \R^2 : g({\boldsymbol x}) \le 0 \}$. Which function $g$ guarantees that $F$ is convex?
$g({\boldsymbol x}) = x_1^2 + x_2^2 - 1$
$g({\boldsymbol x}) = 1 - x_1^2 - x_2^2$
$g({\boldsymbol x}) = x_1 x_2 - 1$
$g({\boldsymbol x}) = x_2 - x_1^2$
Explanation. If $g$ is convex, $\{g \le 0\}$ is convex: here it is the unit disk. The second gives the outside of the disk, the third the region between two branches of a hyperbola, the fourth the region below a parabola: none is convex.
An optimization problem with a convex feasible region is called convex if the objective function is convex on the region, concave if it is concave. What can be said of the problem $\min\{\, |x_1| + |x_2| \ \text{subject to}\ x_1 + 2x_2 = 3 \,\}$?
it is not convex, because $|x_1| + |x_2|$ is not differentiable
it is not convex, because the feasible region is unbounded
it is concave, because the constraint is an equality
it is convex: the norm $1$ is convex and the line is a convex set
Explanation. $|x_1| + |x_2| = \|{\boldsymbol x}\|_1$ is a norm, hence convex; the line $x_1 + 2x_2 = 3$ is convex. Differentiability and boundedness are not part of the definition.
An optimization problem with a convex feasible region is called convex if the objective function is convex on the region, concave if it is concave. What can be said of the problem $\min\{\, (x-1)^3 \ \text{subject to}\ 1 \le x \le 4 \,\}$?
it is concave, because the function is a cube
it is not convex, because the function is increasing
it is convex: $(x-1)^3$ is convex where $x \ge 1$
it is not convex, because $x^3$ is not convex on $\R$
Explanation. With $a = p - 1 \ge 0$ and $b = w - 1 \ge 0$, the inequality of cubes gives $(\lambda a + (1-\lambda)b)^3 \le \lambda a^3 + (1-\lambda) b^3$: only the behavior on the feasible region matters.
In a convex minimization problem, with objective function $f$ convex on the convex feasible region $F$, the point $\bar{\boldsymbol x} \in F$ is a local minimum point with $f(\bar{\boldsymbol x}) = 3$. What holds for every ${\boldsymbol x} \in F$?
$f({\boldsymbol x}) \le 3$
$f({\boldsymbol x}) \ge 3$
$f({\boldsymbol x}) \ge 3$ only near $\bar{\boldsymbol x}$
$f({\boldsymbol x}) > 3$ for ${\boldsymbol x} \ne \bar{\boldsymbol x}$
Explanation. By the proposition on convex minimization problems, $\bar{\boldsymbol x}$ is a minimum point over all of $F$. It need not be the only one: other points can have value $3$.
In a convex minimization problem, with objective function $f$ and convex feasible region $F$, the points $\bar{\boldsymbol x}^{(1)} \ne \bar{\boldsymbol x}^{(2)}$ are both local minimum points. What can be said of their values?
$f(\bar{\boldsymbol x}^{(1)}) = f(\bar{\boldsymbol x}^{(2)})$, because both are optimal
they can be different, as in every problem
it is impossible: a convex problem has only one local minimum
$f(\bar{\boldsymbol x}^{(1)}) < f(\bar{\boldsymbol x}^{(2)})$ if $\bar{\boldsymbol x}^{(1)}$ is more interior
Explanation. Every local minimum of a convex minimization problem is an optimal solution, and all optimal solutions have value $z(P)$. Several local minima can exist (for example with $f$ constant).
In a concave maximization problem $P$ (objective function $f$ concave on the convex feasible region $F$), the point $\bar{\boldsymbol x}$ is a local maximum point with $f(\bar{\boldsymbol x}) = 7$. What is the optimal value $z(P)$?
$z(P) \ge 7$, but it could be larger
$z(P) \le 7$, but it could be smaller
it cannot be said without comparing all points
$z(P) = 7$
Explanation. By the corollary on concave maximization problems, a local maximum is a maximum over all of $F$: $\bar{\boldsymbol x}$ is optimal and $z(P) = f(\bar{\boldsymbol x}) = 7$.
In a <em>maximization</em> problem with a <em>convex</em> objective function on a convex feasible region, is a local maximum point always an optimal solution?
yes, if the feasible region is bounded
no: such a problem never has local maxima
no: it can be a local maximum that is not global
yes, because the objective function is convex
Explanation. For example $\max\{x^2 \text{ subject to } -1 \le x \le 2\}$: $x = -1$ is a local maximum with value $1$, but the optimal solution is $x = 2$, with value $4$.
In the proof that, in a convex minimization problem ($F$ convex, $f$ convex on $F$), a local minimum $\bar{\boldsymbol x}$ with neighborhood $N(\bar{\boldsymbol x}, \delta)$ is optimal, one considers the points $\hat{\boldsymbol x} = \lambda{\boldsymbol x} + (1-\lambda)\bar{\boldsymbol x}$ with ${\boldsymbol x} \in F$. Where is $\hat{\boldsymbol x}$ for $\lambda > 0$ small enough?
on the boundary of the feasible region $F$
in $N(\bar{\boldsymbol x}, \delta) \cap F$
outside the feasible region $F$
in $N({\boldsymbol x}, \delta)$, close to ${\boldsymbol x}$
Explanation. $\hat{\boldsymbol x}$ lies in $F$ because $F$ is convex, and for small $\lambda$ it is close to $\bar{\boldsymbol x}$: there $f(\bar{\boldsymbol x}) \le f(\hat{\boldsymbol x})$, which with the convexity of $f$ gives $f(\bar{\boldsymbol x}) \le f({\boldsymbol x})$.
In the convex minimization problem $\min\{\, (x-2)^2 + 1 \ \text{subject to}\ 0 \le x \le 5 \,\}$, which spherical neighborhood $N(\bar x, \delta)$ allows us to check with the definition that $x = 2$ is a local minimum point?
$N\big((2), 1\big) = (1, 3)$, whose points are all feasible
$N\big((2), 3\big) = (-1, 5)$, whose points are all feasible
none: it is enough that the derivative vanishes at $x = 2$
$N\big((0), 2\big) = (-2, 2)$, centered at the endpoint $0$
Explanation. On $(1,3) \subseteq [0,5]$ we have $f(x) = (x-2)^2 + 1 \ge 1 = f(2)$. The interval $(-1,5)$ contains infeasible points; a zero derivative only suggests the candidate.
In the concave maximization problem $\max\{\, -(x-3)^2 + 10 \ \text{subject to}\ 0 \le x \le 5 \,\}$, what is the derivative of the objective function and where does it vanish?
$-2x - 6$, zero at $x = -3$
$2x - 6$, zero at $x = 3$, which is a minimum
$-x + 3$, zero at $x = 3$
$-2x + 6$, zero at $x = 3$
Explanation. $\frac{d}{dx}\big(-(x-3)^2 + 10\big) = -2(x-3) = -2x + 6$: it vanishes at $x = 3$, which is feasible and is the candidate maximum point.
For $a, b \ge 0$ and $\lambda \in [0,1]$ we have $\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$. What are the two sides for $a = 1$, $b = 3$, $\lambda = \frac{1}{2}$?
$8 \le 8$
$4 \le 14$
$8 \le 14$
$14 \le 8$
Explanation. $\big(\frac{1}{2} + \frac{3}{2}\big)^3 = 2^3 = 8$ and $\frac{1}{2} \cdot 1 + \frac{1}{2} \cdot 27 = 14$: with $a, b \ge 0$ the cube of the average does not exceed the average of the cubes.
the derivative $f'(x) = 3(x-1)(x-3)$ vanishes at two points
Explanation. One pair of points where the graph lies above the chord is enough: it violates the convexity inequality. The point below the chord at $x = 3$ rules out concavity instead; the zeros of the derivative or monotonicity prove nothing.
In the convex minimization problem $\min\{\, 2 + 9x - 6x^2 + x^3 \ \text{subject to}\ 2 \le x \le 4 \,\}$, the derivative $3(x-1)(x-3)$ vanishes at $x = 1$ and $x = 3$. Which point is the candidate?
$x = 3$, because $x = 1$ is not feasible
$x = 1$, because it vanishes there first
both, because the derivative vanishes there
the endpoint $x = 2$, because $f$ is convex
Explanation. Only $x = 3$ lies in $[2, 4]$; then the definition confirms that it is a local minimum (on $(2,4)$ we have $f(x) - 2 = x(x-3)^2 \ge 0$), hence optimal.
For $f(x) = 2 + 9x - 6x^2 + x^3$ we have $f(x) - 2 = x(x-3)^2$. Why, on the neighborhood $N\big((3), 1\big) = (2, 4)$, do we have $f(x) \ge f(3) = 2$?
because the derivative of $f$ vanishes at $x = 3$
because $(x-3)^2 \ge 0$ is enough whatever the sign of $x$
because $f$ is increasing on $(2, 4)$
because on $(2, 4)$ we have $x > 0$, hence $x(x-3)^2 \ge 0$
Explanation. The product of $x > 0$ and $(x-3)^2 \ge 0$ is nonnegative: this is the direct comparison of the definition of local minimum. $f$ is not increasing on $(2,3)$, and for $x < 0$ the sign would change.
To prove that $f(x) = (x-2)^3 - 3(x-2) + 4$ is concave on $[0, 2]$ one sets $a = p - 2$ and $b = w - 2$, with $p, w \in [0,2]$. What allows the conclusion?
the derivative of $f$ vanishes at $x = 1$, inside $[0, 2]$
$a, b \le 0$: the inequality of cubes holds with $\ge$
$a, b \ge 0$: the inequality of cubes holds with $\le$
Explanation. For $p, w \le 2$ the numbers $a, b$ are nonpositive, and the inequality of cubes holds with $\ge$; the term $-3(x-2) + 4$ is linear, so $f$ satisfies the concavity inequality.
Explanation. With $a = p - 2$ and $b = w - 2$ one applies the inequality of squares of the chapter «Convex and concave functions», valid for all $a, b$; the constant $1 = \lambda + (1-\lambda)$ is distributed.
What are the optimal solution and the optimal value of the convex minimization problem $P$: $\min\{\, (x-3)^2 + 1 \ \text{subject to}\ x^2 - 4 \le 0 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 2$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = 26$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 1$
Explanation. $x^2 - 4 \le 0$ gives $F = [-2, 2]$; the point $x = 3$, where the derivative vanishes, is not feasible, and $(x-3)^2$ decreases on all of $F$: the optimum is $x = 2$, with value $1 + 1 = 2$.
For $f(x) = 3 - (x-1)^2$ and $F = [-1, 4]$, what are the optimal solutions of $\min\{ f(x) \text{ subject to } x \in F \}$ and of $\max\{ f(x) \text{ subject to } x \in F \}$?
minimum at $x = -1$ (value $-1$), maximum at $x = 1$ (value $3$)
minimum at $x = 1$ (value $3$), maximum at $x = 4$ (value $-6$)
minimum at $x = 4$ (value $-6$), maximum at $x = -1$ (value $-1$)
minimum at $x = 4$ (value $-6$), maximum at $x = 1$ (value $3$)
Explanation. $f$ is concave: the maximum is at the vertex $x = 1$ (concave maximization problem). The minimum is at the endpoint farthest from $1$: $f(-1) = -1$, $f(4) = -6$; $x = -1$ is only a local minimum.
Knowing that $4x_1 + 2x_2 - x_1^2 - x_2^2 = 5 - (x_1-2)^2 - (x_2-1)^2$, what are the optimal solution and the optimal value of the problem $P$: $\max\{\, 4x_1 + 2x_2 - x_1^2 - x_2^2 \ \text{subject to}\ x_1 + 2x_2 \le 2,~ x_1 \ge 0,~ x_2 \ge 0 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. Maximizing is equivalent to finding the feasible point closest to $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$, which violates $x_1 + 2x_2 \le 2$. The closest point of the line $x_1 + 2x_2 = 2$ is $\begin{pmatrix} 2 \\ 1 \end{pmatrix} - \frac{2}{5}\begin{pmatrix} 1 \\ 2 \end{pmatrix} = \begin{pmatrix} \frac{8}{5} \\ \frac{1}{5} \end{pmatrix}$, which is feasible, with value $5 - \frac{4}{25} - \frac{16}{25} = \frac{21}{5}$.
On a convex minimization problem (convex feasible region $F$, objective function $f$ convex on $F$), which statement is correct?
every feasible point of it is a local minimum point
it may have no optimal solutions, as $\min\{x \text{ subject to } x > 0\}$
it always has at least one optimal solution
it has at most one local minimum point
Explanation. The proposition says that <em>if</em> there is a local minimum, it is optimal; it does not guarantee existence. In the example $F = (0, +\infty)$ is convex, $f(x) = x$ is convex and the infimum $0$ is not attained.
For $\lambda \in [0,1]$ we have $\lambda a^3 + (1-\lambda) b^3 - \big(\lambda a + (1-\lambda) b\big)^3 = \lambda(1-\lambda)(a-b)^2\big((1+\lambda)a + (2-\lambda)b\big)$. What sign does this difference have if $a \ge 0 \ge b$?
it can be positive, negative or zero
it is always $\ge 0$, as for $a, b \ge 0$
it is always $\le 0$, as for $a, b \le 0$
it is always $0$, because the signs cancel
Explanation. The factor $\lambda(1-\lambda)(a-b)^2$ is $\ge 0$, but $(1+\lambda)a + (2-\lambda)b$ changes sign: for example with $\lambda = \frac{1}{2}$ it equals $\frac{3}{2}(a + b)$. This is why the observation requires $a, b$ of the same sign.
Let $F = \{ {\boldsymbol x} \in \R^n : g_i({\boldsymbol x}) \le 0, ~ i = 1, \dots, m \}$ be the feasible region of an optimization problem. Which statement is correct?
if $F$ is convex, every function $g_i$ is convex
if every function $g_i$ is concave, $F$ is convex
$F$ is convex only if $m = 1$
if every function $g_i$ is convex, $F$ is convex
Explanation. This is the property of sets defined by convex functions. The converse is false: $\{x : -x^3 \le 0\} = [0, +\infty)$ is convex with $-x^3$ not convex; with concave $g_i$ the set $F$ may not be convex.
Let $f$ be convex on the convex feasible region $F$. Which statement is correct?
every local maximum of $f$ in $F$ is also a maximum of $f$ in $F$
$f$ has at most one local minimum point in the whole region $F$
$f$ has no local maximum point at all in the region $F$
local minima are minima, local maxima are not always maxima
Explanation. The proposition concerns the minima of convex problems. It fails for maxima: $\max\{x^2 \text{ subject to } -1 \le x \le 2\}$ has the local maximum $x = -1$, not global. There can be several local minima (with $f$ constant, all points).
An optimization problem with a convex feasible region is called convex if the objective function is convex on the region, concave if it is concave. Is the problem $\min\{\, (x-1)^2 \ \text{subject to}\ x \in \{0, 1, 2, 3\} \,\}$ a convex minimization problem?
yes: the feasible region is bounded
no: it is a concave problem
no: the feasible region is not convex
yes: the objective function is convex
Explanation. $\{0,1,2,3\}$ contains $0$ and $1$ but not $\frac{1}{2}$: it is not convex, so the problem is neither convex nor concave, even though $(x-1)^2$ is convex.
In the convex minimization problem $\min\{\, |x - 3| \ \text{subject to}\ 0 \le x \le 5 \,\}$, the point $x = 3$ is a local minimum point. What can be concluded?
the optimal solution is the endpoint $x = 0$
it is the optimal solution, with optimal value $0$
it is only a local minimum: other comparisons are needed
it cannot be a local minimum, because $|x - 3|$ is not differentiable at $3$
Explanation. $|x-3|$ is convex and $[0,5]$ is convex: by the proposition the local minimum is optimal. Differentiability is not needed, neither for the definition of local minimum nor for the proposition.
What are the optimal solution and the optimal value of the concave maximization problem $P$: $\max\{\, 2 - |x| \ \text{subject to}\ -1 \le x \le 3 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 2$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -1$
$\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 0$
Explanation. $2 - |x| \le 2 = f(0)$ for every $x$, and $0 \in [-1, 3]$: it is a local maximum and hence, by the corollary, the optimal solution. The endpoints give the smallest values.
A local search method stops at the first local minimum point it finds. What does it guarantee, if the problem is a convex minimization problem (with optimal value $z(P)$)?
that the point found is the only local minimum
nothing: it may stop at a local minimum that is not global
that the value found is only an upper bound on $z(P)$
that the point found is an optimal solution
Explanation. In convex minimization problems every local minimum is optimal: stopping at the first one is safe. In the nonconvex example of chapter 5, instead, a method looking near $x = 2$ finds the local minimum $1$ and not $z(P) = 0$.
What are the optimal solution and the optimal value of the concave maximization problem $P$: $\max\{\, -(x-3)^2 + 10 \ \text{subject to}\ 0 \le x \le 2 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 10$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 9$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 10$
Explanation. The vertex $x = 3$, where the derivative vanishes, is not feasible; on $[0,2]$ the function increases, so the optimum is the closest endpoint, $x = 2$, with $-1 + 10 = 9$.
Let $f({\boldsymbol x}) = (x_1-3)^2 + (x_2-3)^2$, with the problems $P_1$: $\min\{ f({\boldsymbol x}) \text{ subject to } x_1^2 + x_2^2 - 2 \le 0 \}$ and $P_2$: $\min\{ f({\boldsymbol x}) \text{ subject to } x_1^2 + x_2^2 - 2 \ge 0 \}$. Which of the two is a convex minimization problem?
neither, because the constraints are not linear
only $P_1$: its region is convex, that of $P_2$ is not
both, because $f$ is convex
only $P_2$, because its region is unbounded
Explanation. $x_1^2 + x_2^2 - 2$ is convex, so $\{\cdot \le 0\}$ (a disk) is convex; $\{\cdot \ge 0\}$ (the outside of the disk) contains $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} -2 \\ 0 \end{pmatrix}$ but not the origin.
What are the optimal solution and the optimal value of the problem $P$: $\min\{\, (x_1-3)^2 + (x_2-3)^2 \ \text{subject to}\ x_1^2 + x_2^2 - 2 \ge 0 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value), which is not convex?
Explanation. $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$ is feasible ($9 + 9 - 2 \ge 0$) and $f \ge 0 = f(3,3)$ everywhere: it is optimal. A nonconvex problem can have an optimal solution; $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ is the optimum with the constraint $\le 0$.
What are the optimal solution and the optimal value of the convex minimization problem $P$: $\min\{\, x_1^2 + x_2^2 \ \text{subject to}\ x_1 \ge 1 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. For $x_1 \ge 1$ we have $x_1^2 + x_2^2 \ge 1 + 0 = 1$, with equality only at $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$. The origin, the unconstrained minimum, is not feasible.
What are the optimal solution and the optimal value of the convex minimization problem $P$: $\min\{\, \max\{x,\; 2 - x\} \ \text{subject to}\ 0 \le x \le 3 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 3$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 0$
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 2$
Explanation. The maximum of two linear functions is convex. $\max\{x, 2-x\} \ge 1$ because the two terms sum to $2$, with equality only for $x = 2 - x$, that is, $x = 1$. At $x = 2$ it equals $\max\{2, 0\} = 2$, not $0$.
In the convex minimization problem $\min\{\, x^2 \ \text{subject to}\ 1 \le x \le 3 \,\}$, what are the local minimum points of $x^2$ in $[1, 3]$?
none, because the derivative does not vanish on $[1,3]$
only $x = 1$, which is also the optimal solution
$x = 0$, where the derivative vanishes
$x = 1$ and $x = 3$, the endpoints
Explanation. $x^2$ increases on $[1,3]$: near $1$ we have $x^2 \ge 1$, while near $3$ there are points with value less than $9$. The point $x = 0$ is not feasible; a local minimum does not require a zero derivative.
An optimization problem with a convex feasible region is called convex if the objective function is convex on the region, concave if it is concave. What can be said of the problem $\max\{\, -x_1^2 - x_2^2 \ \text{subject to}\ x_1 + x_2 \ge 1 \,\}$?
it is concave: concave objective, convex half-plane
it is convex, because the feasible region is convex
it is neither convex nor concave, because the region is unbounded
it is convex, because it is in maximization form
Explanation. $-x_1^2 - x_2^2$ is the opposite of a convex function, hence concave; $x_1 + x_2 \ge 1$ is a half-plane, which is convex. The form and boundedness do not matter.
An optimization problem with a convex feasible region is called convex if the objective function is convex on the region, concave if it is concave. What can be said of the problem $\min\{\, x_1^2 - x_2^2 \ \text{subject to}\ {\boldsymbol x} \in \R^2 \,\}$?
it is convex, because $\R^2$ is convex
it is concave, because it contains a negative term
it is convex, because it is a sum of squares
neither: $f$ is neither convex nor concave
Explanation. Along the $x_1$ axis the function is $x_1^2$ (convex), along the $x_2$ axis it is $-x_2^2$ (concave): the inequality fails in one direction or the other. ${\boldsymbol Q} = \mathrm{diag}(1, -1)$ is not positive semidefinite, and neither is $-{\boldsymbol Q}$.
What are the optimal solution and the optimal value of the concave maximization problem $P$: $\max\{\, 5 - (x_1-1)^2 - (x_2-2)^2 \ \text{subject to}\ x_1 + x_2 \le 3 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. $5 - (x_1-1)^2 - (x_2-2)^2 \le 5$ everywhere, with equality at $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$, which is feasible ($1 + 2 = 3 \le 3$, on the boundary): it is the optimal solution.
In the examples of chapter 6 one first checks that the feasible region is convex and the objective function convex (or concave), then looks for a local minimum (or maximum). Why this order?
to compute the optimal value without finding the optimal solution
because only then is a local optimum automatically an optimal solution
because the derivative exists only for convex functions
because without convexity there are no local minima
Explanation. The proposition and the corollary of the chapter turn a local optimum into a global one only in convex minimization and concave maximization problems; elsewhere local minima exist but may not be optimal.
In the convex minimization problem $\min\{\, |x_1| + |x_2| \ \text{subject to}\ x_1 + x_2 = 2 \,\}$, the point $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ has value $2$ and is a local minimum. What are the optimal solutions?
every ${\boldsymbol x} \ge {\boldsymbol 0}$ with $x_1 + x_2 = 2$, value $2$
only $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, because a convex problem has a single optimum
only $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} 0 \\ 2 \end{pmatrix}$
none: the problem is unbounded below
Explanation. On $x_1 + x_2 = 2$ we have $|x_1| + |x_2| \ge x_1 + x_2 = 2$, with equality when $x_1, x_2 \ge 0$: infinitely many optimal points. The proposition guarantees that every local minimum is optimal, not that the optimum is unique.
Generated questions (47)
Each generator builds a new instance, with different numbers, at every start: a few examples here.
Explanation. The point is $\sum_{k=1}^{3} \lambda_k {\boldsymbol p}^{(k)} = \begin{pmatrix} \frac{25}{6} \\ \frac{35}{6} \end{pmatrix}$: each scalar multiplies <em>its own</em> point. The other options pair the scalars with the wrong points or use the centroid (all scalars equal to $\frac{1}{3}$).
Explanation. The point is $\sum_{k=1}^{3} \lambda_k {\boldsymbol p}^{(k)} = \begin{pmatrix} \frac{25}{4} \\ \frac{15}{2} \end{pmatrix}$: each scalar multiplies <em>its own</em> point. The other options pair the scalars with the wrong points or use the centroid (all scalars equal to $\frac{1}{3}$).
Which point belongs to the convex set $\{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - \begin{pmatrix} 2 \\ 3 \end{pmatrix}\|_{2} \le 4 \}$, that is, to the ball of the norm $2$ with center $\begin{pmatrix} 2 \\ 3 \end{pmatrix}$ and radius $4$?
$\begin{pmatrix} 2 \\ -1 \end{pmatrix}$
$\begin{pmatrix} -2 \\ 6 \end{pmatrix}$
$\begin{pmatrix} 6 \\ 0 \end{pmatrix}$
$\begin{pmatrix} -2 \\ 1 \end{pmatrix}$
Explanation. For the correct point ${\boldsymbol x}$, the difference from the center is ${\boldsymbol x} - \begin{pmatrix} 2 \\ 3 \end{pmatrix} = \begin{pmatrix} 0 \\ -4 \end{pmatrix}$ and $(0)^2 + (-4)^2 = 16 \le 16$. The other points exceed the radius in the norm $2$ (but would be inside with another norm: typical mistake).
Which point belongs to the convex set $\{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - \begin{pmatrix} 3 \\ 0 \end{pmatrix}\|_{2} \le 2 \}$, that is, to the ball of the norm $2$ with center $\begin{pmatrix} 3 \\ 0 \end{pmatrix}$ and radius $2$?
$\begin{pmatrix} 4 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 5 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 4 \\ 2 \end{pmatrix}$
Explanation. For the correct point ${\boldsymbol x}$, the difference from the center is ${\boldsymbol x} - \begin{pmatrix} 3 \\ 0 \end{pmatrix} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$ and $(1)^2 + (1)^2 = 2 \le 4$. The other points exceed the radius in the norm $2$ (but would be inside with another norm: typical mistake).
Let $A = \{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - \begin{pmatrix} 1 \\ 1 \end{pmatrix}\|_1 \le 4 \}$ (ball of the norm $1$) and $B = \{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - \begin{pmatrix} 3 \\ -1 \end{pmatrix}\|_\infty \le 3 \}$ (ball of the norm $\infty$). Which point belongs to the convex set $A \cap B$?
$\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 0 \\ 4 \end{pmatrix}$
$\begin{pmatrix} 6 \\ 0 \end{pmatrix}$
$\begin{pmatrix} -3 \\ 1 \end{pmatrix}$
Explanation. For $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$: distance in the norm $1$ from $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ equal to $1 \le 4$ and distance in the norm $\infty$ from $\begin{pmatrix} 3 \\ -1 \end{pmatrix}$ equal to $2 \le 3$: it belongs to both sets. Each of the other points belongs to only one of the two (typical mistake: confusing intersection and union).
Let $A = \{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - \begin{pmatrix} 0 \\ 3 \end{pmatrix}\|_1 \le 2 \}$ (ball of the norm $1$) and $B = \{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - \begin{pmatrix} -2 \\ 2 \end{pmatrix}\|_\infty \le 3 \}$ (ball of the norm $\infty$). Which point belongs to the convex set $A \cap B$?
$\begin{pmatrix} 1 \\ 2 \end{pmatrix}$
$\begin{pmatrix} 2 \\ 3 \end{pmatrix}$
$\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
$\begin{pmatrix} -1 \\ 1 \end{pmatrix}$
Explanation. For $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$: distance in the norm $1$ from $\begin{pmatrix} 0 \\ 3 \end{pmatrix}$ equal to $2 \le 2$ and distance in the norm $\infty$ from $\begin{pmatrix} -2 \\ 2 \end{pmatrix}$ equal to $3 \le 3$: it belongs to both sets. Each of the other points belongs to only one of the two (typical mistake: confusing intersection and union).
Let ${\boldsymbol p}^{(1)} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$, ${\boldsymbol p}^{(2)} = \begin{pmatrix} 6 \\ 1 \end{pmatrix}$, ${\boldsymbol p}^{(3)} = \begin{pmatrix} 0 \\ 5 \end{pmatrix}$. The point ${\boldsymbol q} = \begin{pmatrix} 3 \\ 2 \end{pmatrix}$ can be written in exactly one way as $\lambda_1 {\boldsymbol p}^{(1)} + \lambda_2 {\boldsymbol p}^{(2)} + \lambda_3 {\boldsymbol p}^{(3)}$ with $\lambda_1 + \lambda_2 + \lambda_3 = 1$. What are the scalars, and is ${\boldsymbol q}$ a convex combination of the three points?
$(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{4}, \frac{1}{2}, \frac{1}{4})$: it is a convex combination
$(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{4}, \frac{1}{2}, \frac{1}{4})$: it is not a convex combination
$(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{2}, \frac{1}{4}, \frac{1}{4})$: it is a convex combination
$(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{4}, \frac{1}{4}, \frac{1}{2})$: it is a convex combination
Explanation. The two coordinate equations and $\lambda_1 + \lambda_2 + \lambda_3 = 1$ give $(\frac{1}{4}, \frac{1}{2}, \frac{1}{4})$. A convex combination requires nonnegative scalars summing to $1$: here they are all $\ge 0$, and ${\boldsymbol q}$ lies in the triangle.
Let ${\boldsymbol p}^{(1)} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$, ${\boldsymbol p}^{(2)} = \begin{pmatrix} 5 \\ -1 \end{pmatrix}$, ${\boldsymbol p}^{(3)} = \begin{pmatrix} 1 \\ 7 \end{pmatrix}$. The point ${\boldsymbol q} = \begin{pmatrix} 4 \\ -3 \end{pmatrix}$ can be written in exactly one way as $\lambda_1 {\boldsymbol p}^{(1)} + \lambda_2 {\boldsymbol p}^{(2)} + \lambda_3 {\boldsymbol p}^{(3)}$ with $\lambda_1 + \lambda_2 + \lambda_3 = 1$. What are the scalars, and is ${\boldsymbol q}$ a convex combination of the three points?
$(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{2}, \frac{3}{4}, -\frac{1}{4})$: it is not a convex combination
$(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{2}, \frac{3}{4}, -\frac{1}{4})$: it is a convex combination
$(\lambda_1, \lambda_2, \lambda_3) = (\frac{3}{4}, -\frac{1}{4}, \frac{1}{2})$: it is not a convex combination
$(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{2}, -\frac{1}{4}, \frac{3}{4})$: it is not a convex combination
Explanation. The two coordinate equations and $\lambda_1 + \lambda_2 + \lambda_3 = 1$ give $(\frac{1}{2}, \frac{3}{4}, -\frac{1}{4})$. A convex combination requires nonnegative scalars summing to $1$: here one scalar is negative, and ${\boldsymbol q}$ lies outside the triangle.
Given $f: \R^2 \to \R$, $f({\boldsymbol x}) = x_1^2 x_2 + x_2^2 + 4x_1$, what is the gradient $\nabla f$ at the point $\begin{pmatrix} 3 \\ -2 \end{pmatrix}$?
$\begin{pmatrix} -8 \\ 5 \end{pmatrix}$
$\begin{pmatrix} -2 \\ 5 \end{pmatrix}$
$\begin{pmatrix} 5 \\ -8 \end{pmatrix}$
$\begin{pmatrix} -8 \\ 7 \end{pmatrix}$
Explanation. $\nabla f({\boldsymbol x}) = \begin{pmatrix} 2x_1 x_2 + 4 \\ x_1^2 + 2x_2 \end{pmatrix}$, which at $\begin{pmatrix} 3 \\ -2 \end{pmatrix}$ equals $\begin{pmatrix} -8 \\ 5 \end{pmatrix}$. Typical mistakes: forgetting the factor $2$ of the powers or swapping the components.
Given $f: \R^2 \to \R$, $f({\boldsymbol x}) = -x_1^2 x_2 + 3x_2^2 - 2x_1$, what is the gradient $\nabla f$ at the point $\begin{pmatrix} -2 \\ -1 \end{pmatrix}$?
$\begin{pmatrix} -6 \\ -10 \end{pmatrix}$
$\begin{pmatrix} -4 \\ -10 \end{pmatrix}$
$\begin{pmatrix} -10 \\ -6 \end{pmatrix}$
$\begin{pmatrix} -6 \\ -7 \end{pmatrix}$
Explanation. $\nabla f({\boldsymbol x}) = \begin{pmatrix} -2x_1 x_2 - 2 \\ -x_1^2 + 6x_2 \end{pmatrix}$, which at $\begin{pmatrix} -2 \\ -1 \end{pmatrix}$ equals $\begin{pmatrix} -6 \\ -10 \end{pmatrix}$. Typical mistakes: forgetting the factor $2$ of the powers or swapping the components.
Given $f: \R^2 \to \R$, $f({\boldsymbol x}) = x_1^2 x_2 + x_1 x_2 + 2x_2^3$, what is the Hessian $\nabla^2 f$ at the point $\begin{pmatrix} 3 \\ -2 \end{pmatrix}$?
$\begin{pmatrix} -4 & 7 \\ 7 & -24 \end{pmatrix}$
$\begin{pmatrix} -4 & 4 \\ 4 & -24 \end{pmatrix}$
$\begin{pmatrix} -4 & 7 \\ 7 & 24 \end{pmatrix}$
$\begin{pmatrix} -24 & 7 \\ 7 & -4 \end{pmatrix}$
Explanation. $\nabla^2 f({\boldsymbol x}) = \begin{pmatrix} 2x_2 & 2x_1 + 1 \\ 2x_1 + 1 & 12x_2 \end{pmatrix}$, which at $\begin{pmatrix} 3 \\ -2 \end{pmatrix}$ equals $\begin{pmatrix} -4 & 7 \\ 7 & -24 \end{pmatrix}$ (symmetric). Typical mistakes: factor $2$ forgotten in the mixed derivative, first derivative instead of the second, swapped diagonal.
Given $f: \R^2 \to \R$, $f({\boldsymbol x}) = -x_1^2 x_2 + 3x_1 x_2 - x_2^3$, what is the Hessian $\nabla^2 f$ at the point $\begin{pmatrix} -2 \\ -1 \end{pmatrix}$?
$\begin{pmatrix} 2 & 7 \\ 7 & 6 \end{pmatrix}$
$\begin{pmatrix} 2 & 5 \\ 5 & 6 \end{pmatrix}$
$\begin{pmatrix} 2 & 7 \\ 7 & -3 \end{pmatrix}$
$\begin{pmatrix} 6 & 7 \\ 7 & 2 \end{pmatrix}$
Explanation. $\nabla^2 f({\boldsymbol x}) = \begin{pmatrix} -2x_2 & -2x_1 + 3 \\ -2x_1 + 3 & -6x_2 \end{pmatrix}$, which at $\begin{pmatrix} -2 \\ -1 \end{pmatrix}$ equals $\begin{pmatrix} 2 & 7 \\ 7 & 6 \end{pmatrix}$ (symmetric). Typical mistakes: factor $2$ forgotten in the mixed derivative, first derivative instead of the second, swapped diagonal.
Given $f: \R^2 \to \R$, $f({\boldsymbol x}) = 2(x_1 - 3)^2 + 2(x_2 + 3)^2$, starting from $\bar{\boldsymbol x} = \begin{pmatrix} 4 \\ -2 \end{pmatrix}$ we move by a step $\alpha = \frac{1}{2}$ along the direction of steepest descent, that is, to the point $\bar{\boldsymbol x} - \alpha\, \nabla f(\bar{\boldsymbol x})$. What is the new point?
$\begin{pmatrix} 2 \\ -4 \end{pmatrix}$
$\begin{pmatrix} 6 \\ 0 \end{pmatrix}$
$\begin{pmatrix} 0 \\ -6 \end{pmatrix}$
$\begin{pmatrix} 3 \\ -3 \end{pmatrix}$
Explanation. $\nabla f(\bar{\boldsymbol x}) = \begin{pmatrix} 4 \\ 4 \end{pmatrix}$, hence $\bar{\boldsymbol x} - \frac{1}{2}\,\nabla f(\bar{\boldsymbol x}) = \begin{pmatrix} 2 \\ -4 \end{pmatrix}$. Typical mistakes: the sign $+$ (direction of steepest ascent), the step $\alpha$ forgotten, the factor $2$ of the gradient forgotten.
Given $f: \R^2 \to \R$, $f({\boldsymbol x}) = (x_1 + 1)^2 + 3(x_2 + 3)^2$, starting from $\bar{\boldsymbol x} = \begin{pmatrix} 0 \\ 3 \end{pmatrix}$ we move by a step $\alpha = \frac{1}{3}$ along the direction of steepest descent, that is, to the point $\bar{\boldsymbol x} - \alpha\, \nabla f(\bar{\boldsymbol x})$. What is the new point?
For $f({\boldsymbol x}) = x_1^2 + 3x_2^2$, the point $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ lies on the level set $\{\, {\boldsymbol x} \in \R^2 : f({\boldsymbol x}) = 4 \,\}$. Which direction is tangent to the level set at that point?
$\begin{pmatrix} -3 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ 3 \end{pmatrix}$
$\begin{pmatrix} 3 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ -3 \end{pmatrix}$
Explanation. The gradient $\nabla f = \begin{pmatrix} 2x_1 \\ 6x_2 \end{pmatrix}$ equals $\begin{pmatrix} 2 \\ 6 \end{pmatrix}$, parallel to $\begin{pmatrix} 1 \\ 3 \end{pmatrix}$, and is perpendicular to the level set: the tangent is perpendicular to the gradient, that is, $\begin{pmatrix} -3 \\ 1 \end{pmatrix}$ (zero dot product). The other directions have a nonzero dot product with the gradient.
For $f({\boldsymbol x}) = 2x_1^2 + 3x_2^2$, the point $\begin{pmatrix} -1 \\ -2 \end{pmatrix}$ lies on the level set $\{\, {\boldsymbol x} \in \R^2 : f({\boldsymbol x}) = 14 \,\}$. Which direction is tangent to the level set at that point?
$\begin{pmatrix} 3 \\ -1 \end{pmatrix}$
$\begin{pmatrix} -1 \\ -3 \end{pmatrix}$
$\begin{pmatrix} -3 \\ -1 \end{pmatrix}$
$\begin{pmatrix} -1 \\ 3 \end{pmatrix}$
Explanation. The gradient $\nabla f = \begin{pmatrix} 4x_1 \\ 6x_2 \end{pmatrix}$ equals $\begin{pmatrix} -4 \\ -12 \end{pmatrix}$, parallel to $\begin{pmatrix} -1 \\ -3 \end{pmatrix}$, and is perpendicular to the level set: the tangent is perpendicular to the gradient, that is, $\begin{pmatrix} 3 \\ -1 \end{pmatrix}$ (zero dot product). The other directions have a nonzero dot product with the gradient.
For the vector ${\boldsymbol x} = \begin{pmatrix} -9 \\ 6 \\ 2 \end{pmatrix}$, what are the norms $\|{\boldsymbol x}\|_1$, $\|{\boldsymbol x}\|_2$ and $\|{\boldsymbol x}\|_\infty$?
For the vector ${\boldsymbol x} = \begin{pmatrix} 1 \\ -2 \\ -2 \end{pmatrix}$, what are the norms $\|{\boldsymbol x}\|_1$, $\|{\boldsymbol x}\|_2$ and $\|{\boldsymbol x}\|_\infty$?
For the convex function $f(x) = (x + 2)^2$, with $p = 2$, $w = -3$ and $\lambda = \frac{3}{4}$, what are the two sides $f(\lambda p + (1-\lambda) w)$ and $\lambda f(p) + (1-\lambda) f(w)$ of the convexity inequality?
Explanation. $\lambda p + (1-\lambda) w = \frac{3}{4}$ and $f(\frac{3}{4}) = \frac{121}{16}$; $\lambda f(p) + (1-\lambda) f(w) = \frac{3}{4}\cdot 16 + \frac{1}{4}\cdot 1 = \frac{49}{4}$. As it must be, $\frac{121}{16} \le \frac{49}{4}$.
For the convex function $f(x) = (x - 1)^2$, with $p = 2$, $w = 5$ and $\lambda = \frac{1}{4}$, what are the two sides $f(\lambda p + (1-\lambda) w)$ and $\lambda f(p) + (1-\lambda) f(w)$ of the convexity inequality?
Explanation. $\lambda p + (1-\lambda) w = \frac{17}{4}$ and $f(\frac{17}{4}) = \frac{169}{16}$; $\lambda f(p) + (1-\lambda) f(w) = \frac{1}{4}\cdot 1 + \frac{3}{4}\cdot 16 = \frac{49}{4}$. As it must be, $\frac{169}{16} \le \frac{49}{4}$.
For the convex function $f({\boldsymbol x}) = \|{\boldsymbol x} - \begin{pmatrix} 1 \\ 2 \end{pmatrix}\|_{\infty} + 3$ in $\R^2$, with ${\boldsymbol p} = \begin{pmatrix} -3 \\ 4 \end{pmatrix}$, ${\boldsymbol w} = \begin{pmatrix} 2 \\ 2 \end{pmatrix}$ and $\lambda = \frac{3}{4}$, what are (in this order) the two sides $f(\lambda {\boldsymbol p} + (1-\lambda){\boldsymbol w})$ and $\lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ of the convexity inequality?
$\frac{23}{4}$ and $\frac{25}{4}$
$\frac{25}{4}$ and $\frac{23}{4}$
$\frac{11}{4}$ and $\frac{25}{4}$
$\frac{23}{4}$ and $\frac{19}{4}$
Explanation. $\lambda {\boldsymbol p} + (1-\lambda){\boldsymbol w} = \begin{pmatrix} -\frac{7}{4} \\ \frac{7}{2} \end{pmatrix}$ and $f(\begin{pmatrix} -\frac{7}{4} \\ \frac{7}{2} \end{pmatrix}) = \frac{23}{4}$; $f({\boldsymbol p}) = 7$, $f({\boldsymbol w}) = 4$ and $\frac{3}{4}\cdot 7 + \frac{1}{4}\cdot 4 = \frac{25}{4}$. As it must be, $\frac{23}{4} \le \frac{25}{4}$. Typical mistakes: forgetting the constant $3$, swapping the weights $\lambda$ and $1-\lambda$.
For the convex function $f({\boldsymbol x}) = \|{\boldsymbol x} - \begin{pmatrix} 3 \\ -1 \end{pmatrix}\|_{1} - 2$ in $\R^2$, with ${\boldsymbol p} = \begin{pmatrix} 0 \\ 4 \end{pmatrix}$, ${\boldsymbol w} = \begin{pmatrix} 4 \\ 2 \end{pmatrix}$ and $\lambda = \frac{3}{4}$, what are (in this order) the two sides $f(\lambda {\boldsymbol p} + (1-\lambda){\boldsymbol w})$ and $\lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ of the convexity inequality?
$\frac{9}{2}$ and $5$
$5$ and $\frac{9}{2}$
$\frac{13}{2}$ and $5$
$\frac{9}{2}$ and $3$
Explanation. $\lambda {\boldsymbol p} + (1-\lambda){\boldsymbol w} = \begin{pmatrix} 1 \\ \frac{7}{2} \end{pmatrix}$ and $f(\begin{pmatrix} 1 \\ \frac{7}{2} \end{pmatrix}) = \frac{9}{2}$; $f({\boldsymbol p}) = 6$, $f({\boldsymbol w}) = 2$ and $\frac{3}{4}\cdot 6 + \frac{1}{4}\cdot 2 = 5$. As it must be, $\frac{9}{2} \le 5$. Typical mistakes: forgetting the constant $-2$, swapping the weights $\lambda$ and $1-\lambda$.
Example 1 · co-g-levelvert · level complessa · notes
The set $\{\, {\boldsymbol x} \in \R^2 : \max\{|x_1|, |x_2|\} - 3 \le 0,~ -x_1 - x_2 - 2 \le 0 \,\}$ is convex, because it is defined by constraints $g_i({\boldsymbol x}) \le 0$ with convex functions $g_i$ (a norm and a linear function). It is a polygon: what are its vertices?
Explanation. The ball of norm $\infty$ is the square with vertices $\begin{pmatrix} -3 \\ -3 \end{pmatrix},\ \begin{pmatrix} -3 \\ 3 \end{pmatrix},\ \begin{pmatrix} 3 \\ -3 \end{pmatrix},\ \begin{pmatrix} 3 \\ 3 \end{pmatrix}$; the line $-x_1 - x_2 = 2$ cuts off the vertex $\begin{pmatrix} -3 \\ -3 \end{pmatrix}$ and meets two sides at two new vertices. The vertices are $\begin{pmatrix} -3 \\ 1 \end{pmatrix},\ \begin{pmatrix} -3 \\ 3 \end{pmatrix},\ \begin{pmatrix} 1 \\ -3 \end{pmatrix},\ \begin{pmatrix} 3 \\ -3 \end{pmatrix},\ \begin{pmatrix} 3 \\ 3 \end{pmatrix}$.
Example 2 · co-g-levelvert · level complessa · notes
The set $\{\, {\boldsymbol x} \in \R^2 : \max\{|x_1|, |x_2|\} - 4 \le 0,~ -x_1 - x_2 - 2 \le 0 \,\}$ is convex, because it is defined by constraints $g_i({\boldsymbol x}) \le 0$ with convex functions $g_i$ (a norm and a linear function). It is a polygon: what are its vertices?
For $f(x) = x^3 + 2x$, with $p = -2$, $w = 2$ and $\lambda = \frac{3}{4}$, what are $f\big(\lambda p + (1-\lambda) w\big)$ and $\lambda f(p) + (1-\lambda) f(w)$, and what can be concluded?
$-3$ and $-6$: $f$ is not convex on $[p, w]$
$-3$ and $-6$: $f$ is concave on $[p, w]$
$-3$ and $-6$: $f$ is not concave on $[p, w]$
$3$ and $6$: $f$ is not concave on $[p, w]$
Explanation. $\lambda p + (1-\lambda) w = -1$, $f(-1) = -3$, while $\frac{3}{4} \cdot (-12) + \frac{1}{4} \cdot 12 = -6$. The point of the graph lies above the chord: the convexity inequality is violated. A single pair of points can rule out a property, not prove it.
For $f(x) = x^3 + 2x$, with $p = -2$, $w = 3$ and $\lambda = \frac{1}{4}$, what are $f\big(\lambda p + (1-\lambda) w\big)$ and $\lambda f(p) + (1-\lambda) f(w)$, and what can be concluded?
$\frac{567}{64}$ and $\frac{87}{4}$: $f$ is not concave on $[p, w]$
$\frac{567}{64}$ and $\frac{87}{4}$: $f$ is convex on $[p, w]$
$\frac{567}{64}$ and $\frac{87}{4}$: $f$ is not convex on $[p, w]$
$-\frac{123}{64}$ and $-\frac{3}{4}$: $f$ is not concave on $[p, w]$
Explanation. $\lambda p + (1-\lambda) w = \frac{7}{4}$, $f(\frac{7}{4}) = \frac{567}{64}$, while $\frac{1}{4} \cdot (-12) + \frac{3}{4} \cdot 33 = \frac{87}{4}$. The point of the graph lies below the chord: the concavity inequality is violated. A single pair of points can rule out a property, not prove it.
The non-symmetric matrix ${\boldsymbol Q} = \begin{pmatrix} 1 & -6 \\ 2 & -1 \end{pmatrix}$ defines the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ of ${\boldsymbol x} \in \R^2$. Which symmetric matrix defines the same function?
$\begin{pmatrix} 1 & -2 \\ -2 & -1 \end{pmatrix}$
$\begin{pmatrix} 1 & -6 \\ -6 & -1 \end{pmatrix}$
$\begin{pmatrix} 1 & 2 \\ 2 & -1 \end{pmatrix}$
$\begin{pmatrix} 1 & -4 \\ -4 & -1 \end{pmatrix}$
Explanation. Each off-diagonal pair is replaced by its average: $\frac{-6 + (2)}{2} = -2$, that is, we use $\tfrac{1}{2}({\boldsymbol Q} + {\boldsymbol Q}')$. With $-4$ off the diagonal the coefficient of $x_1 x_2$ would double.
The non-symmetric matrix ${\boldsymbol Q} = \begin{pmatrix} -1 & 4 \\ 2 & 5 \end{pmatrix}$ defines the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ of ${\boldsymbol x} \in \R^2$. Which symmetric matrix defines the same function?
$\begin{pmatrix} -1 & 3 \\ 3 & 5 \end{pmatrix}$
$\begin{pmatrix} -1 & 4 \\ 4 & 5 \end{pmatrix}$
$\begin{pmatrix} -1 & 2 \\ 2 & 5 \end{pmatrix}$
$\begin{pmatrix} -1 & 6 \\ 6 & 5 \end{pmatrix}$
Explanation. Each off-diagonal pair is replaced by its average: $\frac{4 + (2)}{2} = 3$, that is, we use $\tfrac{1}{2}({\boldsymbol Q} + {\boldsymbol Q}')$. With $6$ off the diagonal the coefficient of $x_1 x_2$ would double.
Which of the following quadratic functions $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$, with $\,{\boldsymbol x} \in \R^2$, is convex in $\R^2$?
$f({\boldsymbol x}) = 3x_1^2 + 2x_1 x_2 + 3x_2^2$
$f({\boldsymbol x}) = x_1^2 + 6x_1 x_2 + 3x_2^2$
$f({\boldsymbol x}) = 2x_1^2 + 6x_1 x_2 + x_2^2$
$f({\boldsymbol x}) = 3x_1^2 - 2x_1 x_2 - x_2^2$
Explanation. The correct function can be written as $3\left(x_1 + \frac{1}{3}\, x_2\right)^2 + \frac{8}{3}\, x_2^2 \ge 0$: ${\boldsymbol Q}$ is positive semidefinite and hence the function is convex (a quadratic function is convex if and only if ${\boldsymbol Q}$ is positive semidefinite). The others do not have ${\boldsymbol Q}$ positive semidefinite: for $x_1^2 + 6x_1 x_2 + 3x_2^2$ the vector $\begin{pmatrix} -3 \\ 1 \end{pmatrix}$ gives $-6 < 0$; for $2x_1^2 + 6x_1 x_2 + x_2^2$ the vector $\begin{pmatrix} -3 \\ 2 \end{pmatrix}$ gives $-14 < 0$; for $3x_1^2 - 2x_1 x_2 - x_2^2$ the vector $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$ gives $-1 < 0$. A positive diagonal is not enough.
Which of the following quadratic functions $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$, with $\,{\boldsymbol x} \in \R^2$, is convex in $\R^2$?
Explanation. The correct function can be written as $4\left(x_1 + \frac{1}{4}\, x_2\right)^2 + \frac{3}{4}\, x_2^2 \ge 0$: ${\boldsymbol Q}$ is positive semidefinite and hence the function is convex (a quadratic function is convex if and only if ${\boldsymbol Q}$ is positive semidefinite). The others do not have ${\boldsymbol Q}$ positive semidefinite: for $2x_1^2 - 6x_1 x_2 + 2x_2^2$ the vector $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$ gives $-10 < 0$; for $x_1^2 + 4x_1 x_2 + x_2^2$ the vector $\begin{pmatrix} -2 \\ 1 \end{pmatrix}$ gives $-3 < 0$; for $-3x_1^2 - 2x_1 x_2 + 4x_2^2$ the vector $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$ gives $-3 < 0$. A positive diagonal is not enough.
Example 1 · co-g-stationary · level complessa · notes
Let $g({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} + {\boldsymbol c}' {\boldsymbol x} + d = 3x_1^2 + 4x_1 x_2 - 2x_2^2 - 10x_1 + 5$, with ${\boldsymbol Q} = \begin{pmatrix} 3 & 2 \\ 2 & -2 \end{pmatrix}$, ${\boldsymbol c} = \begin{pmatrix} -10 \\ 0 \end{pmatrix}$ and $d = 5$. Which statement on convexity and on the point where the gradient vanishes is correct?
$g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, where $g = 0$
$g$ is convex; $\nabla g$ vanishes at $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, where $g = 0$
$g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$, where $g = 5$
$g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} -1 \\ -1 \end{pmatrix}$, where $g = 20$
Explanation. ${\boldsymbol Q}$ is not positive semidefinite (it has a negative diagonal entry), hence $g$ is not convex. $\nabla g({\boldsymbol x}) = 2{\boldsymbol Q}{\boldsymbol x} + {\boldsymbol c} = {\boldsymbol 0}$ gives ${\boldsymbol Q}{\boldsymbol x} = \begin{pmatrix} 5 \\ 0 \end{pmatrix}$, that is, ${\boldsymbol x} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$, with $g = 0$. Typical mistakes: factor $2$ forgotten ($\begin{pmatrix} 2 \\ 2 \end{pmatrix}$), wrong sign of ${\boldsymbol c}$ ($\begin{pmatrix} -1 \\ -1 \end{pmatrix}$).
Example 2 · co-g-stationary · level complessa · notes
Let $g({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} + {\boldsymbol c}' {\boldsymbol x} + d = -2x_1 x_2 + 3x_2^2 - 2x_1 + 2x_2 + 5$, with ${\boldsymbol Q} = \begin{pmatrix} 0 & -1 \\ -1 & 3 \end{pmatrix}$, ${\boldsymbol c} = \begin{pmatrix} -2 \\ 2 \end{pmatrix}$ and $d = 5$. Which statement on convexity and on the point where the gradient vanishes is correct?
$g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} -2 \\ -1 \end{pmatrix}$, where $g = 6$
$g$ is convex; $\nabla g$ vanishes at $\begin{pmatrix} -2 \\ -1 \end{pmatrix}$, where $g = 6$
$g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} -4 \\ -2 \end{pmatrix}$, where $g = 5$
$g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$, where $g = 2$
Explanation. ${\boldsymbol Q}$ is not positive semidefinite ($\det {\boldsymbol Q} = -1 < 0$), hence $g$ is not convex. $\nabla g({\boldsymbol x}) = 2{\boldsymbol Q}{\boldsymbol x} + {\boldsymbol c} = {\boldsymbol 0}$ gives ${\boldsymbol Q}{\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$, that is, ${\boldsymbol x} = \begin{pmatrix} -2 \\ -1 \end{pmatrix}$, with $g = 6$. Typical mistakes: factor $2$ forgotten ($\begin{pmatrix} -4 \\ -2 \end{pmatrix}$), wrong sign of ${\boldsymbol c}$ ($\begin{pmatrix} 2 \\ 1 \end{pmatrix}$).
A symmetric matrix ${\boldsymbol Q}$ is positive semidefinite if ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} \ge 0$ for every ${\boldsymbol x} \in \R^2$. For ${\boldsymbol Q} = \begin{pmatrix} 3 & 2 \\ 2 & 0 \end{pmatrix}$, which vector shows that ${\boldsymbol Q}$ is <em>not</em> positive semidefinite?
$\begin{pmatrix} -1 \\ 2 \end{pmatrix}$
$\begin{pmatrix} -1 \\ 0 \end{pmatrix}$
$\begin{pmatrix} -2 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$
Explanation. ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = 3x_1^2 + 4x_1 x_2$: at the four vectors it equals $-5$, $3$, $4$, $0$. One vector with a negative value is enough, $\begin{pmatrix} -1 \\ 2 \end{pmatrix}$; a nonnegative value at some vectors proves nothing.
A symmetric matrix ${\boldsymbol Q}$ is positive semidefinite if ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} \ge 0$ for every ${\boldsymbol x} \in \R^2$. For ${\boldsymbol Q} = \begin{pmatrix} 1 & -2 \\ -2 & 3 \end{pmatrix}$, which vector shows that ${\boldsymbol Q}$ is <em>not</em> positive semidefinite?
$\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ -2 \end{pmatrix}$
$\begin{pmatrix} -1 \\ -2 \end{pmatrix}$
$\begin{pmatrix} -1 \\ -1 \end{pmatrix}$
Explanation. ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = x_1^2 - 4x_1 x_2 + 3x_2^2$: at the four vectors it equals $-1$, $21$, $5$, $0$. One vector with a negative value is enough, $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$; a nonnegative value at some vectors proves nothing.
For the problem $P$: $\min\{\, (x - 1)^2 + 1 \ \text{subject to}\ -3 \le x \le 5 \,\}$ the feasible solutions $\bar{\boldsymbol x}^{(1)} = (4)$, $\bar{\boldsymbol x}^{(2)} = (2)$, $\bar{\boldsymbol x}^{(3)} = (-3)$ are known. What is the best bound on the optimal value $z(P)$ that they provide?
$z(P) \le 2$
$z(P) \le 17$
$2 \le z(P)$
$17 \le z(P)$
Explanation. The values are $10$, $2$, $17$. In minimization form every feasible solution gives an upper bound and the best one is the smallest.
For the problem $P$: $\min\{\, (x - 3)^2 + 3 \ \text{subject to}\ -1 \le x \le 7 \,\}$ the feasible solutions $\bar{\boldsymbol x}^{(1)} = (4)$, $\bar{\boldsymbol x}^{(2)} = (3)$, $\bar{\boldsymbol x}^{(3)} = (-1)$ are known. What is the best bound on the optimal value $z(P)$ that they provide?
$z(P) \le 3$
$z(P) \le 19$
$3 \le z(P)$
$19 \le z(P)$
Explanation. The values are $4$, $3$, $19$. In minimization form every feasible solution gives an upper bound and the best one is the smallest.
Over a feasible region $F$ the objective function $f$ has minimum $0$ and maximum $5$ (both attained). What is the optimal value $\min\{\, 3\, f({\boldsymbol x}) + 5 \ \text{subject to}\ {\boldsymbol x} \in F \,\}$?
$5$
$20$
$0$
$-5$
Explanation. The constant is added outside and, with $a = 3 > 0$, $\min\{a f\} = a \min\{f\}$: $3\cdot(0) + 5 = 5$.
Over a feasible region $F$ the objective function $f$ has minimum $-1$ and maximum $6$ (both attained). What is the optimal value $\min\{\, -2\, f({\boldsymbol x}) - 5 \ \text{subject to}\ {\boldsymbol x} \in F \,\}$?
$-17$
$-3$
$-12$
$17$
Explanation. The constant is added outside and, with $a = -2 < 0$, $\min\{a f\} = a \max\{f\}$: $-2\cdot 6 - 5 = -17$. Typical mistake: using the minimum of $f$.
Which point belongs to the spherical neighborhood $N\left(\begin{pmatrix} 2 \\ 2 \end{pmatrix}, 5\right)$ with center $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$ and radius $5$, that is, the set of the points at Euclidean distance <em>less</em> than $5$ from the center?
$\begin{pmatrix} -2 \\ 3 \end{pmatrix}$
$\begin{pmatrix} 7 \\ 2 \end{pmatrix}$
$\begin{pmatrix} -3 \\ 0 \end{pmatrix}$
$\begin{pmatrix} 0 \\ -3 \end{pmatrix}$
Explanation. The correct point has squared distance $17 < 25$ from the center. The point $\begin{pmatrix} 7 \\ 2 \end{pmatrix}$ has distance exactly $5$: it lies on the circle, which does not belong to the neighborhood (strict inequality). The others have distance greater than $5$.
Which point belongs to the spherical neighborhood $N\left(\begin{pmatrix} 1 \\ 4 \end{pmatrix}, 2\right)$ with center $\begin{pmatrix} 1 \\ 4 \end{pmatrix}$ and radius $2$, that is, the set of the points at Euclidean distance <em>less</em> than $2$ from the center?
$\begin{pmatrix} 2 \\ 4 \end{pmatrix}$
$\begin{pmatrix} -1 \\ 4 \end{pmatrix}$
$\begin{pmatrix} 3 \\ 5 \end{pmatrix}$
$\begin{pmatrix} 2 \\ 2 \end{pmatrix}$
Explanation. The correct point has squared distance $1 < 4$ from the center. The point $\begin{pmatrix} -1 \\ 4 \end{pmatrix}$ has distance exactly $2$: it lies on the circle, which does not belong to the neighborhood (strict inequality). The others have distance greater than $2$.
What are the optimal solution and the optimal value of the problem $P$: $\min\{\, (x - 1)^2 + 1 \ \text{subject to}\ 2 \le x \le 8 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 2$
$\tilde{\boldsymbol x}(P) = (8)$, $z(P) = 50$
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 10$
Explanation. The point $1$ is not feasible; over the feasible region $(x-1)^2$ is smallest at the endpoint closest to $1$, that is, $2$, with $z(P) = 2$.
What are the optimal solution and the optimal value of the problem $P$: $\max\{\, (x - 3)^2 + 3 \ \text{subject to}\ 1 \le x \le 7 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (7)$, $z(P) = 19$
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 7$
$\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 3$
$\tilde{\boldsymbol x}(P) = (7)$, $z(P) = 103$
Explanation. In maximization form the endpoint farthest from $3$ matters: $f(1) = 7$ and $f(7) = 19$, hence $\tilde{\boldsymbol x}(P) = (7)$ and $z(P) = 19$.
Example 1 · co-g-classify · level complessa · notes
Consider the problem $P$: $\max\{\, -(x - 1)^2 + 3 \ \text{subject to}\ x \in [1, 5] \,\}$, with $\tilde{\boldsymbol x}(P)$ the optimal solution (if any) and $z(P)$ the optimal value. Which statement on $P$ is correct?
it has optimal solution $\tilde{\boldsymbol x}(P) = (1)$, with $z(P) = 3$
it has optimal solution $\tilde{\boldsymbol x}(P) = (5)$, with $z(P) = -13$
it has an unattainable supremum $3$: there is no optimal solution
it is unbounded, with $z(P) = +\infty$
Explanation. The parabola has vertex at $x = 1$ (value $3$) and opens downward: in maximization form what matters is the point of $F$ closest to the vertex. Here the best point of the closure of $F$ is $x = 1$, which belongs to $F$: it is the optimal solution, with $z(P) = 3$. Typical mistakes: ignoring whether the endpoints belong to $F$, or using the vertex in the wrong form.
Example 2 · co-g-classify · level complessa · notes
Consider the problem $P$: $\min\{\, (x - 3)^2 - 1 \ \text{subject to}\ x \in [2, 7) \,\}$, with $\tilde{\boldsymbol x}(P)$ the optimal solution (if any) and $z(P)$ the optimal value. Which statement on $P$ is correct?
it has optimal solution $\tilde{\boldsymbol x}(P) = (3)$, with $z(P) = -1$
it has optimal solution $\tilde{\boldsymbol x}(P) = (2)$, with $z(P) = 0$
it has optimal solution $\tilde{\boldsymbol x}(P) = (7)$, with $z(P) = 15$
it has an unattainable infimum $0$: there is no optimal solution
Explanation. The parabola has vertex at $x = 3$ (value $-1$) and opens upward: in minimization form what matters is the point of $F$ closest to the vertex. Here the best point of the closure of $F$ is $x = 3$, which belongs to $F$: it is the optimal solution, with $z(P) = -1$. Typical mistakes: ignoring whether the endpoints belong to $F$, or using the vertex in the wrong form.
An optimization problem has feasible region $F = \{\, {\boldsymbol x} \in \R^2 : x_1 + 2x_2 \le 1,~ x_2 \ge 0,~ (x_1 - 1)^2 + (x_2 - 2)^2 \le 9 \,\}$. Which point is a feasible solution, that is, a point of $F$?
$\begin{pmatrix} -1 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ 4 \end{pmatrix}$
$\begin{pmatrix} 1 \\ -1 \end{pmatrix}$
$\begin{pmatrix} -2 \\ 1 \end{pmatrix}$
Explanation. A point is feasible if it satisfies <em>all</em> the constraints: $\begin{pmatrix} -1 \\ 1 \end{pmatrix}$ satisfies them; $\begin{pmatrix} 1 \\ 4 \end{pmatrix}$ violates the first constraint, $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$ violates the second constraint and $\begin{pmatrix} -2 \\ 1 \end{pmatrix}$ violates the third constraint.
An optimization problem has feasible region $F = \{\, {\boldsymbol x} \in \R^2 : x_1 + x_2 \le 2,~ x_2 \ge 0,~ (x_1 - 2)^2 + x_2^2 \le 4 \,\}$. Which point is a feasible solution, that is, a point of $F$?
$\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
$\begin{pmatrix} 1 \\ -1 \end{pmatrix}$
$\begin{pmatrix} -1 \\ 1 \end{pmatrix}$
Explanation. A point is feasible if it satisfies <em>all</em> the constraints: $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ satisfies them; $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$ violates the first constraint, $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$ violates the second constraint and $\begin{pmatrix} -1 \\ 1 \end{pmatrix}$ violates the third constraint.
Consider the problem $P$: $\max\{\, x + 1 \ \text{subject to}\ x \in F \,\}$, with feasible region $F = \{\, x \in \R : x \ge 1,~ x \le -3 \,\}$, optimal solution $\tilde{\boldsymbol x}(P)$ (if any) and optimal value $z(P)$. Which statement is correct?
it is infeasible: $F = \emptyset$ and no optimal solution
it has optimal solution $\tilde{\boldsymbol x}(P) = (-3)$ and optimal value $z(P) = -2$
it has an unattainable supremum $2$: no optimal solution
it is unbounded: $z(P) = +\infty$ and no optimal solution
Explanation. The objective function is linear and increasing; in maximization form it pays to move to the right. Here no $x$ satisfies both $x \ge 1$ and $x \le -3$: $F$ is empty.
Consider the problem $P$: $\min\{\, -x + 3 \ \text{subject to}\ x \in F \,\}$, with feasible region $F = [-1, 3]$, optimal solution $\tilde{\boldsymbol x}(P)$ (if any) and optimal value $z(P)$. Which statement is correct?
it has optimal solution $\tilde{\boldsymbol x}(P) = (3)$ and optimal value $z(P) = 0$
it has an unattainable infimum $0$: no optimal solution
it is unbounded: $z(P) = -\infty$ and no optimal solution
it is infeasible: $F = \emptyset$ and no optimal solution
Explanation. The objective function is linear and decreasing; in minimization form it pays to move to the right. Here the endpoint $3$ matters, and it belongs to $F$.
The problem $P$: $\max\{\, x_1 + x_2 + 2 \ \text{subject to}\ {\boldsymbol x} \in F \,\}$ has the finite feasible region $F = \left\{ \begin{pmatrix} -2 \\ 3 \end{pmatrix}, \begin{pmatrix} 2 \\ 2 \end{pmatrix}, \begin{pmatrix} 4 \\ -2 \end{pmatrix}, \begin{pmatrix} 4 \\ -1 \end{pmatrix} \right\}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. We compare the value of the objective function at every feasible solution: $3$, $6$, $4$, $5$. In maximization form the largest wins, $6$, attained at $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$.
The problem $P$: $\min\{\, -x_1 + 3x_2 - 1 \ \text{subject to}\ {\boldsymbol x} \in F \,\}$ has the finite feasible region $F = \left\{ \begin{pmatrix} 0 \\ 4 \end{pmatrix}, \begin{pmatrix} 3 \\ 2 \end{pmatrix}, \begin{pmatrix} 4 \\ 3 \end{pmatrix}, \begin{pmatrix} 2 \\ 4 \end{pmatrix} \right\}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. We compare the value of the objective function at every feasible solution: $11$, $2$, $4$, $9$. In minimization form the smallest wins, $2$, attained at $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$.
The definition of a local minimum point uses the spherical neighborhood $N(\bar{\boldsymbol x}, \delta)$, the set of the points at distance less than $\delta$ from $\bar{\boldsymbol x}$. In $\R$, with feasible region $F = [0, 5]$, $\bar x = 5$ and $\delta = 3$, which set is $N\big((5), 3\big) \cap F$?
$(2, 5]$
$[2, 5)$
$(2, 8)$
$[2, 8]$
Explanation. In $\R$ the neighborhood is the open interval $(2, 8)$; intersecting it with $F = [0, 5]$ gives $(2, 5]$: an endpoint of $F$ falling inside the neighborhood stays included, an endpoint of the neighborhood stays excluded.
The definition of a local minimum point uses the spherical neighborhood $N(\bar{\boldsymbol x}, \delta)$, the set of the points at distance less than $\delta$ from $\bar{\boldsymbol x}$. In $\R$, with feasible region $F = [-1, 6]$, $\bar x = -1$ and $\delta = 1$, which set is $N\big((-1), 1\big) \cap F$?
$[-1, 0)$
$(-1, 0]$
$(-2, 0)$
$[-2, 0]$
Explanation. In $\R$ the neighborhood is the open interval $(-2, 0)$; intersecting it with $F = [-1, 6]$ gives $[-1, 0)$: an endpoint of $F$ falling inside the neighborhood stays included, an endpoint of the neighborhood stays excluded.
Let $f(x) = (x - 1)^2 + 1$. What are the optimal solution and the optimal value of the problem $P$: $\min\{\, -3\,f(x) + 4 \ \text{subject to}\ 0 \le x \le 5 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (5)$, $z(P) = -47$
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (5)$, $z(P) = -51$
$\tilde{\boldsymbol x}(P) = (5)$, $z(P) = 47$
Explanation. The constant $4$ is added outside and, with $a = -3 < 0$, $\min\{a f\} = a \max\{f\}$: the maximum of $f$ over $[0, 5]$ is $17$, at the endpoint $x = 5$ farthest from $1$, hence $z(P) = -3\cdot 17 + 4 = -47$. Typical mistake: using the minimum of $f$.
Let $f(x) = x^2 + 2$. What are the optimal solution and the optimal value of the problem $P$: $\min\{\, -2\,f(x) + 5 \ \text{subject to}\ -2 \le x \le 1 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = -7$
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 1$
$\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = -12$
$\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = 7$
Explanation. The constant $5$ is added outside and, with $a = -2 < 0$, $\min\{a f\} = a \max\{f\}$: the maximum of $f$ over $[-2, 1]$ is $6$, at the endpoint $x = -2$ farthest from $0$, hence $z(P) = -2\cdot 6 + 5 = -7$. Typical mistake: using the minimum of $f$.
Consider the problem $P$: $\min\{\, x^3 - 3x + 4 \ \text{subject to}\ -4 \le x \le 3 \,\}$, with objective function $f(x) = x^3 - 3\,x + 4$ and zero derivative at $x = -1$ and $x = 1$. What are the local minimum points of $f$ in $F = [-4, 3]$ and the optimal solution $\tilde{\boldsymbol x}(P)$?
Explanation. $f$ increases on $[-4, -1]$, decreases on $[-1, 1]$ and increases on $[1, 3]$: the local minimum points are $x = 1$ and also the endpoint $x = -4$ (near it, in $F$, $f$ does not go below $f(-4)$). Comparing $f(-4) = -48$ and $f(1) = 2$, the optimal solution is $x = -4$. Typical mistake: forgetting the endpoints of the feasible region.
Consider the problem $P$: $\min\{\, x^3 - 6x^2 + 16 \ \text{subject to}\ -3 \le x \le 5 \,\}$, with objective function $f(x) = (x - 2)^3 - 12\,(x - 2) $ and zero derivative at $x = 0$ and $x = 4$. What are the local minimum points of $f$ in $F = [-3, 5]$ and the optimal solution $\tilde{\boldsymbol x}(P)$?
Explanation. $f$ increases on $[-3, 0]$, decreases on $[0, 4]$ and increases on $[4, 5]$: the local minimum points are $x = 4$ and also the endpoint $x = -3$ (near it, in $F$, $f$ does not go below $f(-3)$). Comparing $f(-3) = -65$ and $f(4) = -16$, the optimal solution is $x = -3$. Typical mistake: forgetting the endpoints of the feasible region.
For the objective function $f(x) = \max\{\, 0,\; |x| - 2 \,\}$ over the feasible region $F = [-4, 5]$, what are the sets of optimal solutions $\arg\min\{ f(x) \text{ subject to } x \in F \}$ and $\arg\max\{ f(x) \text{ subject to } x \in F \}$?
$\arg\min = [-2, 2]$, $\arg\max = \{5\}$
$\arg\min = \{0\}$, $\arg\max = \{5\}$
$\arg\min = [-2, 2]$, $\arg\max = \{-4\}$
$\arg\min = [-2, 2]$, $\arg\max = \{-4, 5\}$
Explanation. $f(x) = 0$ for $-2 \le x \le 2$ and $f(x) = |x| - 2$ elsewhere: in $F$ the minimum value $0$ is attained on all of $[-2, 2]$ (infinitely many optimal solutions). The maximum is at the endpoints: $f(-4) = 2$, $f(5) = 3$.
For the objective function $f(x) = \max\{\, 0,\; |x + 1| - 2 \,\}$ over the feasible region $F = [-3, 2]$, what are the sets of optimal solutions $\arg\min\{ f(x) \text{ subject to } x \in F \}$ and $\arg\max\{ f(x) \text{ subject to } x \in F \}$?
$\arg\min = [-3, 1]$, $\arg\max = \{2\}$
$\arg\min = \{-1\}$, $\arg\max = \{2\}$
$\arg\min = [-3, 1]$, $\arg\max = \{-3\}$
$\arg\min = [-3, 1]$, $\arg\max = \{-3, 2\}$
Explanation. $f(x) = 0$ for $-3 \le x \le 1$ and $f(x) = |x + 1| - 2$ elsewhere: in $F$ the minimum value $0$ is attained on all of $[-3, 1]$ (infinitely many optimal solutions). The maximum is at the endpoints: $f(-3) = 0$, $f(2) = 1$.
Example 1 · co-g-localglobal · level complessa · notes
Consider the problem $P$: $\min\{\, f(x) \ \text{subject to}\ -2 \le x \le 4 \,\}$ with $f(x) = \min\{\, (x + 1)^2 + 3,\; (x - 3)^2 \,\}$ and optimal value $z(P)$. Which point is a local minimum point of $f$ in $[-2, 4]$ that is <em>not</em> an optimal solution, and what is $z(P)$?
$x = -1$; optimal value $z(P) = 0$
$x = 3$; optimal value $z(P) = 0$
$x = -1$; optimal value $z(P) = 3$
$x = 3$; optimal value $z(P) = 3$
Explanation. Near $x = -1$ we have $f(x) = (x + 1)^2 + 3 \ge 3$ and near $x = 3$ we have $f(x) = (x - 3)^2 \ge 0$: both are local minimum points, with local minima $3$ and $0$. Since $f(x) \ge 0$ everywhere, the optimal solution is $x = 3$ with $z(P) = 0$, and $x = -1$ is a local minimum that is not global (the endpoints $-2$ and $4$ are local maximum points).
Example 2 · co-g-localglobal · level complessa · notes
Consider the problem $P$: $\min\{\, f(x) \ \text{subject to}\ -4 \le x \le 5 \,\}$ with $f(x) = \min\{\, (x + 3)^2 + 1,\; (x - 3)^2 \,\}$ and optimal value $z(P)$. Which point is a local minimum point of $f$ in $[-4, 5]$ that is <em>not</em> an optimal solution, and what is $z(P)$?
$x = -3$; optimal value $z(P) = 0$
$x = 3$; optimal value $z(P) = 0$
$x = -3$; optimal value $z(P) = 1$
$x = 3$; optimal value $z(P) = 1$
Explanation. Near $x = -3$ we have $f(x) = (x + 3)^2 + 1 \ge 1$ and near $x = 3$ we have $f(x) = (x - 3)^2 \ge 0$: both are local minimum points, with local minima $1$ and $0$. Since $f(x) \ge 0$ everywhere, the optimal solution is $x = 3$ with $z(P) = 0$, and $x = -3$ is a local minimum that is not global (the endpoints $-4$ and $5$ are local maximum points).
For the problem $P$: $\min\{\, -2\,(x + 1)^2 - 1 \ \text{subject to}\ -4 \le x \le 0 \,\}$, with optimal value $z(P)$, the feasible solutions $\bar{\boldsymbol x}^{(1)} = (-2)$, $\bar{\boldsymbol x}^{(2)} = (-1)$, $\bar{\boldsymbol x}^{(3)} = (-3)$ are known. What is the best bound on $z(P)$ that they provide, and what is $z(P)$?
best bound $z(P) \le -9$; optimal value $z(P) = -19$
best bound $z(P) \le -1$; optimal value $z(P) = -19$
best bound $z(P) \le -9$; optimal value $z(P) = -1$
best bound $-9 \le z(P)$; optimal value $z(P) = -19$
Explanation. The objective values are $-3$, $-1$, $-9$; in minimization form they give upper bounds and the best one is the smallest, $-9$. The parabola has vertex at $x = -1$ and opens downward: the optimum is at $x = -4$, with $z(P) = -19$.
For the problem $P$: $\max\{\, -2\,(x - 3)^2 + 2 \ \text{subject to}\ -3 \le x \le 2 \,\}$, with optimal value $z(P)$, the feasible solutions $\bar{\boldsymbol x}^{(1)} = (0)$, $\bar{\boldsymbol x}^{(2)} = (-3)$, $\bar{\boldsymbol x}^{(3)} = (-2)$ are known. What is the best bound on $z(P)$ that they provide, and what is $z(P)$?
best bound $-16 \le z(P)$; optimal value $z(P) = 0$
best bound $-70 \le z(P)$; optimal value $z(P) = 0$
best bound $-16 \le z(P)$; optimal value $z(P) = 2$
best bound $z(P) \le -16$; optimal value $z(P) = 0$
Explanation. The objective values are $-16$, $-70$, $-48$; in maximization form they give lower bounds and the best one is the largest, $-16$. The parabola has vertex at $x = 3$ and opens downward: the optimum is at $x = 2$, with $z(P) = 0$.
The problem $P$: $\min\{\, (x_1 - 6)^2 + (x_2 - 3)^2 \ \text{subject to}\ 0 \le x_1 \le 4,~ 0 \le x_2 \le 4 \,\}$ looks for the point of the rectangle closest to $\begin{pmatrix} 6 \\ 3 \end{pmatrix}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. The objective function is the sum of two terms in different variables, and each is smallest when the coordinate of $\begin{pmatrix} 6 \\ 3 \end{pmatrix}$ is brought back into its interval: $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ 3 \end{pmatrix}$, $z(P) = 4$. The point $\begin{pmatrix} 6 \\ 3 \end{pmatrix}$ is not feasible, and the closest vertex is not optimal.
The problem $P$: $\min\{\, (x_1 - 3)^2 + (x_2 - 3)^2 \ \text{subject to}\ -1 \le x_1 \le 1,~ 2 \le x_2 \le 4 \,\}$ looks for the point of the rectangle closest to $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. The objective function is the sum of two terms in different variables, and each is smallest when the coordinate of $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$ is brought back into its interval: $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 3 \end{pmatrix}$, $z(P) = 4$. The point $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$ is not feasible, and the closest vertex is not optimal.
Example 1 · co-g-1dproblem · level complessa · notes
Consider the problem $P$: $\max\{\, -x^2 + 2x + 5 \ \text{subject to}\ -2 \le x \le 2 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value). Which statement is correct?
It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 6$
It is a convex maximization problem; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 6$
It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 5$
It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = -3$
Explanation. $f(x) = -(x - 1)^2 + 6$ is concave and $F = [-2, 2]$ is convex: it is a concave maximization problem. The derivative $-2x + 2$ vanishes at $x = 1$, which is feasible; $x = 1$ is a point of local maximum and hence optimal, because in a concave maximization problem every local maximum is optimal: $z(P) = 6$.
Example 2 · co-g-1dproblem · level complessa · notes
Consider the problem $P$: $\min\{\, 3x^2 - 18x + 26 \ \text{subject to}\ 2 \le x \le 5 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value). Which statement is correct?
It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -1$
It is a concave minimization problem; $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -1$
It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (6)$, $z(P) = 26$
It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (5)$, $z(P) = 11$
Explanation. $f(x) = 3\,(x - 3)^2 - 1$ is convex and $F = [2, 5]$ is convex: it is a convex minimization problem. The derivative $6x - 18$ vanishes at $x = 3$, which is feasible; $x = 3$ is a point of local minimum and hence optimal, because in a convex minimization problem every local minimum is optimal: $z(P) = -1$.
Consider the problem $P$: $\max\{\, x^3 - 3x^2 - 9x + 15 \ \text{subject to}\ -3 \le x \le 1 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value), whose objective function can also be written as $(x - 1)^3 - 12\,(x - 1) + 4$. Which statement is correct?
It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 20$
It is a convex maximization problem; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 20$
It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -12$
It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 4$
Explanation. With $a = p - 1$ and $b = w - 1$ nonpositive, the inequality of cubes $\big(\lambda a + (1-\lambda) b\big)^3 \ge \lambda a^3 + (1-\lambda) b^3$ (the rest is linear) shows that $f$ is concave over $[-3, 1]$: it is a concave maximization problem. The derivative $3(x - 1)^2 - 12$ vanishes at $-1$ and $3$; only $-1$ is feasible, it is a local optimum and hence optimal (in problems of this kind local optima are global), with $z(P) = 20$.
Consider the problem $P$: $\min\{\, x^3 + 3x^2 - 9x - 12 \ \text{subject to}\ -1 \le x \le 3 \,\}$ (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value), whose objective function can also be written as $(x + 1)^3 - 12\,(x + 1) - 1$. Which statement is correct?
It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = -17$
It is a concave minimization problem; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = -17$
It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (-3)$, $z(P) = 15$
It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = -1$
Explanation. With $a = p + 1$ and $b = w + 1$ nonnegative, the inequality of cubes $\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$ (the rest is linear) shows that $f$ is convex over $[-1, 3]$: it is a convex minimization problem. The derivative $3(x + 1)^2 - 12$ vanishes at $-3$ and $1$; only $1$ is feasible, it is a local optimum and hence optimal (in problems of this kind local optima are global), with $z(P) = -17$.
Consider the convex minimization problem $P$: $\min\{\, 2x_1^2 + 2x_2^2 - 12x_1 - 12x_2 \ \text{subject to}\ -2 \le x_1 \le 0,~ 2 \le x_2 \le 4 \,\}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. Completing the squares, $f({\boldsymbol x}) = 2(x_1 - 3)^2 + 2(x_2 - 3)^2 - 36$. The point $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$ is not feasible; each term depends on a single variable and is smallest when $3$ is brought back into $[-2, 0]$ and $3$ into $[2, 4]$: $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 3 \end{pmatrix}$, $z(P) = -18$.
Consider the convex minimization problem $P$: $\min\{\, 2x_1^2 + 3x_2^2 - 8x_1 - 18x_2 \ \text{subject to}\ 1 \le x_1 \le 4,~ -2 \le x_2 \le 1 \,\}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. Completing the squares, $f({\boldsymbol x}) = 2(x_1 - 2)^2 + 3(x_2 - 3)^2 - 35$. The point $\begin{pmatrix} 2 \\ 3 \end{pmatrix}$ is not feasible; each term depends on a single variable and is smallest when $2$ is brought back into $[1, 4]$ and $3$ into $[-2, 1]$: $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 1 \end{pmatrix}$, $z(P) = -23$.
An optimization problem with a convex feasible region is convex if the objective function is convex on the region, concave if it is concave. What can be said of the problem $P$: $\max\{\, f(x) = x^3 + 3 \ \text{subject to}\ x \in F \,\}$, with $F = \{\, x \in \R : x^2 \ge 4 \,\}$?
it is neither convex nor concave, because $F$ is not convex
it is a convex problem: $F$ is convex and $f$ is convex on $F$
it is a concave problem: $F$ is convex and $f$ is concave on $F$
it is neither convex nor concave, because $f$ is neither on $F$
Explanation. $F = \{\, x \in \R : x^2 \ge 4 \,\}$ is not convex (it contains two points but not the segment between them); $x^3$ is convex where $x \ge 0$ and concave where $x \le 0$ (inequality of cubes). The form (minimization or maximization) does not matter in the definition.
An optimization problem with a convex feasible region is convex if the objective function is convex on the region, concave if it is concave. What can be said of the problem $P$: $\max\{\, f(x) = 2(x + 1)^2 + 3 \ \text{subject to}\ x \in F \,\}$, with $F = [0, 4]$?
it is a convex problem: $F$ is convex and $f$ is convex on $F$
it is a concave problem: $F$ is convex and $f$ is concave on $F$
it is neither convex nor concave, because $F$ is not convex
it is neither convex nor concave, because $f$ is neither on $F$
Explanation. $F = [0, 4]$ is an interval, hence convex; $2(x + 1)^2 + 3$ is convex (coefficient of $x^2$ positive). The form (minimization or maximization) does not matter in the definition.
For every $\lambda \in [0,1]$ and $a, b \in \R$ we have $\lambda a^3 + (1-\lambda) b^3 - \big(\lambda a + (1-\lambda) b\big)^3 = \lambda(1-\lambda)(a-b)^2\big((1+\lambda)a + (2-\lambda)b\big)$. What is this difference for $a = -2$, $b = -3$ and $\lambda = \frac{3}{4}$?
$-\frac{87}{64}$
$\frac{87}{64}$
$-\frac{93}{64}$
$-\frac{29}{4}$
Explanation. $\lambda(1-\lambda) = \frac{3}{16}$, $(a-b)^2 = 1$ and $(1+\lambda)a + (2-\lambda)b = -\frac{29}{4}$: the product is $-\frac{87}{64}$. With $a, b \le 0$ the difference is nonpositive, as the observation on cubes states.
For every $\lambda \in [0,1]$ and $a, b \in \R$ we have $\lambda a^3 + (1-\lambda) b^3 - \big(\lambda a + (1-\lambda) b\big)^3 = \lambda(1-\lambda)(a-b)^2\big((1+\lambda)a + (2-\lambda)b\big)$. What is this difference for $a = 3$, $b = 1$ and $\lambda = \frac{1}{3}$?
$\frac{136}{27}$
$-\frac{136}{27}$
$\frac{152}{27}$
$\frac{68}{3}$
Explanation. $\lambda(1-\lambda) = \frac{2}{9}$, $(a-b)^2 = 4$ and $(1+\lambda)a + (2-\lambda)b = \frac{17}{3}$: the product is $\frac{136}{27}$. With $a, b \ge 0$ the difference is nonnegative, as the observation on cubes states.
In the problem $P$: $\min\{\, -2 - (x - 2)^2 \ \text{subject to}\ -1 \le x \le 3 \,\}$ the objective function is concave: it is not a convex minimization problem. What are the local minimum points, the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
local minima at $x = -1$ and $x = 3$; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = -11$
local minima at $x = 2$; $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = -2$
local minima at $x = -1$ and $x = 3$; $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -3$
local minima at $x = -1$; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = -11$
Explanation. The function increases up to $x = 2$ (maximum point, value $-2$) and then decreases: both endpoints are local minimum points, with values $f(-1) = -11$ and $f(3) = -3$. The optimal solution is the endpoint farthest from $2$, $x = -1$; the other is a local minimum that is not global, which is impossible in a convex minimization problem.
In the problem $P$: $\min\{\, 8 - (x + 1)^2 \ \text{subject to}\ -4 \le x \le 1 \,\}$ the objective function is concave: it is not a convex minimization problem. What are the local minimum points, the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
local minima at $x = -4$ and $x = 1$; $\tilde{\boldsymbol x}(P) = (-4)$, $z(P) = -1$
local minima at $x = -1$; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 8$
local minima at $x = -4$ and $x = 1$; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 4$
local minima at $x = -4$; $\tilde{\boldsymbol x}(P) = (-4)$, $z(P) = -1$
Explanation. The function increases up to $x = -1$ (maximum point, value $8$) and then decreases: both endpoints are local minimum points, with values $f(-4) = -1$ and $f(1) = 4$. The optimal solution is the endpoint farthest from $-1$, $x = -4$; the other is a local minimum that is not global, which is impossible in a convex minimization problem.
The linear objective function of the problem $P$: $\max\{\, x_1 + x_2 \ \text{subject to}\ 1 \le x_1 \le 4,~ -2 \le x_2 \le 0 \,\}$ is both convex and concave, and the rectangle is convex. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. Each term depends on a single variable: in maximization form, $x_i$ goes to its lower bound if its coefficient is negative, to its upper bound otherwise. Hence $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ 0 \end{pmatrix}$ and $z(P) = 4$. Typical mistake: getting the direction wrong for a negative coefficient.
The linear objective function of the problem $P$: $\min\{\, -x_1 + 3x_2 \ \text{subject to}\ -2 \le x_1 \le 1,~ -1 \le x_2 \le 2 \,\}$ is both convex and concave, and the rectangle is convex. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. Each term depends on a single variable: in minimization form, $x_i$ goes to its lower bound if its coefficient is positive, to its upper bound otherwise. Hence $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$ and $z(P) = -4$. Typical mistake: getting the direction wrong for a negative coefficient.
Example 1 · co-g-cubicregion · level facile · notes
Let $f(x) = (x - 1)^3 - 12\,(x - 1) + 4$. For which feasible region $F$ is the problem $\max\{\, f(x) \ \text{subject to}\ x \in F \,\}$ a concave maximization problem?
$F = [-3, 1]$
$F = [1, 5]$
$F = [0, 4]$
$F = [2, 6]$
Explanation. With $a = p - 1$ and $b = w - 1$, the inequality of cubes gives $\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$ if $a, b \ge 0$ and $\ge$ if $a, b \le 0$; the term $-12\,(x - 1)$ is linear. Hence $f$ is convex on intervals with $x \ge 1$ and concave on intervals with $x \le 1$: we need $F = [-3, 1]$. An interval containing $1$ in its interior does not work.
Example 2 · co-g-cubicregion · level facile · notes
Let $f(x) = x^3 - 12\,x - 1$. For which feasible region $F$ is the problem $\max\{\, f(x) \ \text{subject to}\ x \in F \,\}$ a concave maximization problem?
$F = [-2, 0]$
$F = [0, 2]$
$F = [-1, 1]$
$F = [1, 3]$
Explanation. With $a = p - 0$ and $b = w - 0$, the inequality of cubes gives $\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$ if $a, b \ge 0$ and $\ge$ if $a, b \le 0$; the term $-12\,x$ is linear. Hence $f$ is convex on intervals with $x \ge 0$ and concave on intervals with $x \le 0$: we need $F = [-2, 0]$. An interval containing $0$ in its interior does not work.
The convex problem $P$: $\min\{\, (x_1 + 12)^2 + (x_2 + 9)^2 \ \text{subject to}\ x_1^2 + x_2^2 \le 100 \,\}$ looks for the point of the disk with center $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$ and radius $10$ closest to $\begin{pmatrix} -12 \\ -9 \end{pmatrix}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. The point $\begin{pmatrix} -12 \\ -9 \end{pmatrix}$ has norm $15 > 10$, so it is not feasible; the closest point of the disk lies on the segment towards the center, at distance $10$ from the origin: $\tilde{\boldsymbol x}(P) = \frac{10}{15}\begin{pmatrix} -12 \\ -9 \end{pmatrix} = \begin{pmatrix} -8 \\ -6 \end{pmatrix}$. The objective function is the <em>squared</em> distance: $z(P) = 5^2 = 25$. Typical mistake: bringing each coordinate back into $[-10, 10]$, as for a square.
The convex problem $P$: $\min\{\, (x_1 + 6)^2 + (x_2 - 8)^2 \ \text{subject to}\ x_1^2 + x_2^2 \le 25 \,\}$ looks for the point of the disk with center $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$ and radius $5$ closest to $\begin{pmatrix} -6 \\ 8 \end{pmatrix}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. The point $\begin{pmatrix} -6 \\ 8 \end{pmatrix}$ has norm $10 > 5$, so it is not feasible; the closest point of the disk lies on the segment towards the center, at distance $5$ from the origin: $\tilde{\boldsymbol x}(P) = \frac{5}{10}\begin{pmatrix} -6 \\ 8 \end{pmatrix} = \begin{pmatrix} -3 \\ 4 \end{pmatrix}$. The objective function is the <em>squared</em> distance: $z(P) = 5^2 = 25$. Typical mistake: bringing each coordinate back into $[-5, 5]$, as for a square.
The convex problem $P$: $\min\{\, (x_1 - 3)^2 + (x_2 - 3)^2 \ \text{subject to}\ x_1 + x_2 \le 4,~ x_1 \ge 0,~ x_2 \ge 0 \,\}$ looks for the feasible point closest to $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$ violates $x_1 + x_2 \le 4$ ($6 > 4$). The closest point of the line $x_1 + x_2 = 4$ is obtained by subtracting the same amount $\frac{6 - 4}{2} = 1$ from both coordinates: $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 2 \end{pmatrix}$, which is feasible, and $z(P) = 1^2 + 1^2 = 2$. Moving a single coordinate gives a feasible but farther point.
The convex problem $P$: $\min\{\, (x_1 - 4)^2 + (x_2 - 4)^2 \ \text{subject to}\ x_1 + x_2 \le 4,~ x_1 \ge 0,~ x_2 \ge 0 \,\}$ looks for the feasible point closest to $\begin{pmatrix} 4 \\ 4 \end{pmatrix}$. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. $\begin{pmatrix} 4 \\ 4 \end{pmatrix}$ violates $x_1 + x_2 \le 4$ ($8 > 4$). The closest point of the line $x_1 + x_2 = 4$ is obtained by subtracting the same amount $\frac{8 - 4}{2} = 2$ from both coordinates: $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 2 \end{pmatrix}$, which is feasible, and $z(P) = 2^2 + 2^2 = 8$. Moving a single coordinate gives a feasible but farther point.
The problem $P$: $\min\{\, (x + 2)^2 + (x + 1)^2 + (x - 4)^2 \ \text{subject to}\ -3 \le x \le -1 \,\}$ is a convex minimization problem (sum of convex functions over an interval). What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. The derivative $2\big(3x - (-2) - (-1) - (4)\big)$ vanishes at the mean $x = \frac{1}{3}$, which is not feasible: the function is convex and decreases up to the mean, so the optimum is the closest endpoint, $x = -1$; $z(P) = 26$. Typical mistake: using the median $-1$, which minimizes the sum of absolute values, not of squares.
The problem $P$: $\min\{\, (x + 1)^2 + x^2 + (x - 4)^2 \ \text{subject to}\ -3 \le x \le 0 \,\}$ is a convex minimization problem (sum of convex functions over an interval). What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
$\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 17$
$\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 14$
$\tilde{\boldsymbol x}(P) = (-3)$, $z(P) = 62$
$\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 26$
Explanation. The derivative $2\big(3x - (-1) - (0) - (4)\big)$ vanishes at the mean $x = 1$, which is not feasible: the function is convex and decreases up to the mean, so the optimum is the closest endpoint, $x = 0$; $z(P) = 17$. Typical mistake: using the median $0$, which minimizes the sum of absolute values, not of squares.
Example 1 · co-g-eqconstr · level complessa · notes
The problem $P$: $\min\{\, 3x_1^2 + 2x_2^2 + 2x_1 + 5x_2 \ \text{subject to}\ x_1 + x_2 = -2 \,\}$ is convex (convex objective function, linear constraint). Substituting $x_2 = -2 - x_1$ it becomes a problem in one variable. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. With $g(x_1) = f(x_1, -2 - x_1)$, $g'(x_1) = 6x_1 - 4(-2 - x_1) - 3 = 0$ gives $x_1 = -\frac{1}{2}$, hence $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -\frac{1}{2} \\ -\frac{3}{2} \end{pmatrix}$ and $z(P) = -\frac{13}{4}$; $g$ is convex, and the local minimum is the optimal solution. The point $\begin{pmatrix} -\frac{1}{3} \\ -\frac{5}{4} \end{pmatrix}$, where the gradient of $f$ vanishes, does not satisfy the constraint.
Example 2 · co-g-eqconstr · level complessa · notes
The problem $P$: $\min\{\, 2x_1^2 + x_2^2 - 5x_1 - 3x_2 \ \text{subject to}\ x_1 + x_2 = -1 \,\}$ is convex (convex objective function, linear constraint). Substituting $x_2 = -1 - x_1$ it becomes a problem in one variable. What are the optimal solution and the optimal value (with $\tilde{\boldsymbol x}(P)$ the optimal solution and $z(P)$ the optimal value)?
Explanation. With $g(x_1) = f(x_1, -1 - x_1)$, $g'(x_1) = 4x_1 - 2(-1 - x_1) - 2 = 0$ gives $x_1 = 0$, hence $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ -1 \end{pmatrix}$ and $z(P) = 4$; $g$ is convex, and the local minimum is the optimal solution. The point $\begin{pmatrix} \frac{5}{4} \\ \frac{3}{2} \end{pmatrix}$, where the gradient of $f$ vanishes, does not satisfy the constraint.