← Back to the site

Question bank

393 fixed questions · 47 generated questions

Fixed questions (393)

Part: Preliminaries (222)

1. Convex sets (54)

co-f-001 · level facile · notes
Which condition defines a convex set $A \subseteq \R^n$?
  1. $\forall {\boldsymbol p}, {\boldsymbol w} \in A$ there exists $\lambda \in [0,1]$ with $\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w} \in A$
  2. $\forall {\boldsymbol p}, {\boldsymbol w} \in A$ and $\forall \lambda \in \R$ we have $\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w} \in A$
  3. $\forall {\boldsymbol p}, {\boldsymbol w} \in A$ and $\forall \lambda \in [0,1]$ we have $\lambda {\boldsymbol p} + \lambda {\boldsymbol w} \in A$
  4. $\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.
co-f-002 · level facile · notes
Let ${\boldsymbol p} = \begin{pmatrix} 1 \\ 4 \end{pmatrix}$ and ${\boldsymbol w} = \begin{pmatrix} 7 \\ 1 \end{pmatrix}$. What is their convex combination $\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w}$ with $\lambda = \frac{1}{3}$?
  1. $\begin{pmatrix} 4 \\ \frac{5}{2} \end{pmatrix}$
  2. $\begin{pmatrix} \frac{8}{3} \\ \frac{5}{3} \end{pmatrix}$
  3. $\begin{pmatrix} 5 \\ 2 \end{pmatrix}$
  4. $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$
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.
co-f-003 · level facile · notes
Let ${\boldsymbol p}^{(1)} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$, ${\boldsymbol p}^{(2)} = \begin{pmatrix} 4 \\ 0 \end{pmatrix}$, ${\boldsymbol p}^{(3)} = \begin{pmatrix} 0 \\ 8 \end{pmatrix}$. What is the convex combination $\lambda_1 {\boldsymbol p}^{(1)} + \lambda_2 {\boldsymbol p}^{(2)} + \lambda_3 {\boldsymbol p}^{(3)}$ with $\lambda_1 = \frac{1}{2}$, $\lambda_2 = \frac{1}{4}$, $\lambda_3 = \frac{1}{4}$?
  1. $\begin{pmatrix} 1 \\ 4 \end{pmatrix}$
  2. $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$
  3. $\begin{pmatrix} \frac{4}{3} \\ \frac{8}{3} \end{pmatrix}$
  4. $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$
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})$.
co-f-004 · level facile · notes
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?
  1. $(\frac{1}{2}, \frac{1}{3}, \frac{1}{6})$
  2. $(\frac{1}{2}, \frac{1}{2}, \frac{1}{2})$
  3. $(1, -\frac{1}{2}, \frac{1}{2})$
  4. $(\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}$.
co-f-005 · level facile · notes
In $\R^2$, the set of all convex combinations of three non-collinear points (their convex hull) is:
  1. the boundary (the three sides only) of the triangle with vertices at the three points
  2. the set made of the three given points only
  3. the disk bounded by the circle through the three points
  4. 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.
co-f-006 · level facile · notes
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 \}$?
  1. a square centered at ${\boldsymbol c}$, with axis-aligned sides of length $2r$
  2. a square centered at ${\boldsymbol c}$, with axis-aligned sides of length $r$
  3. a diamond centered at ${\boldsymbol c}$, with vertices at distance $r$ along the axes
  4. 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$.
co-f-007 · level facile · notes
In $\R^2$, what is the set $\{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - \begin{pmatrix} 2 \\ 1 \end{pmatrix}\|_\infty \le 2 \}$?
  1. the disk with center $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$ and radius $2$
  2. the axis-aligned square with vertices $\begin{pmatrix} 0 \\ -1 \end{pmatrix}$, $\begin{pmatrix} 4 \\ -1 \end{pmatrix}$, $\begin{pmatrix} 4 \\ 3 \end{pmatrix}$, $\begin{pmatrix} 0 \\ 3 \end{pmatrix}$
  3. the diamond with vertices $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$, $\begin{pmatrix} 2 \\ -1 \end{pmatrix}$, $\begin{pmatrix} 4 \\ 1 \end{pmatrix}$, $\begin{pmatrix} 2 \\ 3 \end{pmatrix}$
  4. the axis-aligned square with vertices $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 3 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$, $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$
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$.
co-f-008 · level facile · notes
What are the vertices of the set $\{ {\boldsymbol x} \in \R^2 : |x_1 - 1| + |x_2 - 2| \le 2 \}$?
  1. $\begin{pmatrix} -1 \\ 2 \end{pmatrix}$, $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$, $\begin{pmatrix} 1 \\ 4 \end{pmatrix}$
  2. $\begin{pmatrix} -1 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 3 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 3 \\ 4 \end{pmatrix}$, $\begin{pmatrix} -1 \\ 4 \end{pmatrix}$
  3. $\begin{pmatrix} 0 \\ 2 \end{pmatrix}$, $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$, $\begin{pmatrix} 1 \\ 3 \end{pmatrix}$
  4. $\begin{pmatrix} -3 \\ 2 \end{pmatrix}$, $\begin{pmatrix} 1 \\ -2 \end{pmatrix}$, $\begin{pmatrix} 5 \\ 2 \end{pmatrix}$, $\begin{pmatrix} 1 \\ 6 \end{pmatrix}$
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$.
co-f-009 · level facile · notes
Which point belongs to the set $\{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - \begin{pmatrix} 3 \\ 3 \end{pmatrix}\|_2 \le 3 \}$?
  1. $\begin{pmatrix} 6 \\ 6 \end{pmatrix}$
  2. $\begin{pmatrix} 6 \\ 5 \end{pmatrix}$
  3. $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$
  4. $\begin{pmatrix} 5 \\ 5 \end{pmatrix}$
Explanation. $(5-3)^2 + (5-3)^2 = 8 \le 9$. For the others: $18 > 9$, $13 > 9$, $18 > 9$.
co-f-010 · level facile · notes
Which statement on convex sets is true?
  1. the intersection of convex sets is convex only if the sets are bounded
  2. the intersection of two convex sets is convex only if one contains the other
  3. the intersection of finitely many convex sets is convex
  4. 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.
co-f-011 · level facile · notes
Which of the following subsets of $\R^2$ is <strong>not</strong> convex?
  1. $\{ {\boldsymbol x} : |x_1| + |x_2| \le 1,~ x_1 \ge 0 \}$
  2. $\{ {\boldsymbol x} : \|{\boldsymbol x}\|_2 \ge 1 \}$
  3. $\{ {\boldsymbol x} : \|{\boldsymbol x}\|_2 \le 1 \}$
  4. $\{ {\boldsymbol x} : x_1 + x_2 \le 1 \}$
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.
co-f-012 · level facile · notes
To prove that a set $A \subseteq \R^n$ is <strong>not</strong> convex it is enough to:
  1. find ${\boldsymbol p}, {\boldsymbol w} \in A$ and $\lambda \in [0,1]$ with $\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w} \notin A$
  2. find a point of $\R^n$ that does not belong to $A$
  3. find ${\boldsymbol p}, {\boldsymbol w} \in A$ such that $\lambda {\boldsymbol p} + (1-\lambda) {\boldsymbol w} \notin A$ for every $\lambda \in [0,1]$
  4. 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$).
co-f-013 · level facile · notes
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}$?
  1. $\lambda = 1$
  2. $\lambda = \frac{1}{2}$
  3. for no value of $\lambda \in [0,1]$
  4. $\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.
co-f-014 · level media · notes
The point $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$ is a convex combination of the points ${\boldsymbol p}^{(1)} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$, ${\boldsymbol p}^{(2)} = \begin{pmatrix} 5 \\ 1 \end{pmatrix}$, ${\boldsymbol p}^{(3)} = \begin{pmatrix} 3 \\ 5 \end{pmatrix}$, that is, $\begin{pmatrix} 3 \\ 2 \end{pmatrix} = \sum_{k=1}^{3} \lambda_k {\boldsymbol p}^{(k)}$ with $\lambda_k \ge 0$ and $\lambda_1 + \lambda_2 + \lambda_3 = 1$. What are the scalars $(\lambda_1, \lambda_2, \lambda_3)$?
  1. $(\frac{1}{4}, \frac{1}{4}, \frac{1}{2})$
  2. $(\frac{1}{2}, \frac{1}{4}, \frac{1}{4})$
  3. $(\frac{3}{8}, \frac{3}{8}, \frac{1}{4})$
  4. $(\frac{1}{3}, \frac{1}{3}, \frac{1}{3})$
Explanation. Second component: $\lambda_1 + \lambda_2 + 5\lambda_3 = 2$ and, with sum $1$, $4\lambda_3 = 1$. First component: $\lambda_1 + 5\lambda_2 = \frac{9}{4}$ with $\lambda_1 + \lambda_2 = \frac{3}{4}$, hence $\lambda_2 = \lambda_1 = \frac{3}{8}$. The other triples give $(3, \frac{7}{3})$, $(3,3)$ and $(\frac{5}{2}, 2)$.
co-f-015 · level media · notes
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?
  1. $\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$
  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} 2 \\ 0 \end{pmatrix}$, which belongs neither to $A_1$ nor to $A_2$
  3. $\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$
  4. 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.
co-f-016 · level media · notes
Let $S = \{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x}\|_2 = 1 \}$ (the circle only). Which reasoning is correct?
  1. $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$
  2. $S$ is convex, because it is the boundary of the closed ball of radius $1$, which is convex
  3. $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$
  4. $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.
co-f-017 · level teorema · notes
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$)?
  1. the set $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 \ge r \}$ is convex
  2. the set $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 = r \}$ is convex
  3. the set $\{ {\boldsymbol x} \in \R^n : \|{\boldsymbol x} - {\boldsymbol c}\|_2 \le r \}$ is convex only if ${\boldsymbol c} = {\boldsymbol 0}$
  4. 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.
co-f-018 · level teorema · notes
On operations among convex sets $A_1, \dots, A_m \subseteq \R^n$, which statement is correct?
  1. for every $m$ sets $A_i \subseteq \R^n$, if $\bigcap_{i=1}^m A_i$ is convex then every $A_i$ is convex
  2. 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
  3. for every $m$ convex sets $A_i \subseteq \R^n$, the set $\bigcap_{i=1}^m A_i$ is convex
  4. 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).
co-f-019 · level teorema · notes
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$)?
  1. $\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_\infty \le r \}$ is not convex, because it has corners
  2. $\{ {\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$
  3. $\{ {\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$
  4. $\{ {\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$.
co-f-020 · level ipotesi · notes
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?
  1. triangle inequality and absolute homogeneity of the norm, with $\lambda \ge 0$ and $1 - \lambda \ge 0$
  2. Cauchy–Schwarz inequality and differentiability of the norm, with $\lambda \in [0,1]$
  3. positivity ($\|{\boldsymbol y}\| \ge 0$) and absolute homogeneity of the norm, with $\lambda \in [0,1]$
  4. 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]$.
co-f-021 · level ipotesi · notes
What is needed to prove that the intersection of $m$ convex sets $A_1, \dots, A_m$ is convex?
  1. the definition of intersection and the boundedness of each $A_i$
  2. the definition of intersection and the convexity of at least one $A_i$
  3. the definition of intersection and that the $A_i$ are balls
  4. 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.
co-f-022 · level ipotesi · notes
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?
  1. the hypotheses $\|{\boldsymbol p}-{\boldsymbol c}\|_1 \le r$ and $\|{\boldsymbol w}-{\boldsymbol c}\|_1 \le r$
  2. the absolute homogeneity of the norm $1$
  3. $\lambda \ge 0$ and $1 - \lambda \ge 0$, because $\lambda \in [0,1]$
  4. 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.
co-f-023 · level facile · notes
In $\R^2$, what are the vertices of the convex set $\{ {\boldsymbol x} \in \R^2 : \max\{|x_1 - 3|,\, |x_2 - 3|\} \le 3 \}$?
  1. $\begin{pmatrix} -3 \\ -3 \end{pmatrix}$, $\begin{pmatrix} 9 \\ -3 \end{pmatrix}$, $\begin{pmatrix} 9 \\ 9 \end{pmatrix}$, $\begin{pmatrix} -3 \\ 9 \end{pmatrix}$
  2. $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 6 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 6 \\ 6 \end{pmatrix}$, $\begin{pmatrix} 0 \\ 6 \end{pmatrix}$
  3. $\begin{pmatrix} 3 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 6 \\ 3 \end{pmatrix}$, $\begin{pmatrix} 3 \\ 6 \end{pmatrix}$, $\begin{pmatrix} 0 \\ 3 \end{pmatrix}$
  4. $\begin{pmatrix} \frac{3}{2} \\ \frac{3}{2} \end{pmatrix}$, $\begin{pmatrix} \frac{9}{2} \\ \frac{3}{2} \end{pmatrix}$, $\begin{pmatrix} \frac{9}{2} \\ \frac{9}{2} \end{pmatrix}$, $\begin{pmatrix} \frac{3}{2} \\ \frac{9}{2} \end{pmatrix}$
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$.
co-f-024 · level facile · notes
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$?
  1. it is convex, because it is the intersection of two convex sets
  2. it is not convex, because its boundary joins an arc and a segment
  3. it is convex only because it is bounded, since it lies inside $A$
  4. 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.
co-f-146 · level facile · notes
Which point is a convex combination of ${\boldsymbol p} = (0, 0)'$ and ${\boldsymbol w} = (4, 2)'$?
  1. $(-1, -\frac12)'$
  2. $(4, 0)'$
  3. $(1, \frac12)'$
  4. $(5, \frac52)'$
Explanation. $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$ with $\lambda = \frac34$: points of the segment.
co-f-147 · level ipotesi · notes
For $\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}$ to be a convex combination of ${\boldsymbol p}$ and ${\boldsymbol w}$, what must hold?
  1. $\lambda = \frac12$
  2. $\lambda \in [0, 1]$
  3. $\lambda \in \R$
  4. $\lambda > 1$
Explanation. With $\lambda$ outside $[0,1]$ we get points of the line outside the segment.
co-f-148 · level teorema · notes
Which statement about convex sets is correct?
  1. The intersection of two convex sets is convex
  2. The union of two convex sets is convex
  3. The complement of a convex set is convex
  4. Every bounded set is convex
Explanation. A segment with endpoints in both sets lies in both.
co-f-149 · level ipotesi · notes
To prove that a set $C \subseteq \R^n$ is convex, what is it enough to check?
  1. That $C$ is bounded
  2. That $C$ contains the origin
  3. That $C$ is closed
  4. That segments stay in $C$
Explanation. It is the definition of a convex set.
co-f-262 · level facile · notes
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?
  1. the ray starting at ${\boldsymbol p}$ towards ${\boldsymbol w}$
  2. only the midpoint of ${\boldsymbol p}$ and ${\boldsymbol w}$
  3. the segment with endpoints ${\boldsymbol p}$ and ${\boldsymbol w}$
  4. 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.
co-f-263 · level facile · notes
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}$?
  1. no, because it is not the midpoint
  2. yes, with $\lambda = \frac{1}{3}$
  3. yes, with $\lambda = \frac{2}{3}$
  4. 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.
co-f-264 · level facile · notes
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?
  1. $\lambda_i \ge 0$ for every $i$ and $\sum_{i=1}^m \lambda_i = 1$
  2. $\lambda_i \ge 0$ for every $i$, with no other condition
  3. $\sum_{i=1}^m \lambda_i = 1$, with arbitrary signs
  4. $\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.
co-f-265 · level facile · notes
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}$?
  1. $\begin{pmatrix} 3 \\ \frac{3}{2} \end{pmatrix}$
  2. $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$
  3. $\begin{pmatrix} 6 \\ 3 \end{pmatrix}$
  4. $\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.
co-f-266 · level facile · notes
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}$?
  1. $\lambda = 0$
  2. $\lambda = 2$
  3. $\lambda = \frac{1}{2}$
  4. $\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]$.
co-f-267 · level facile · notes
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?
  1. only the empty set
  2. yes, both
  3. no, neither
  4. 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.
co-f-268 · level facile · notes
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?
  1. $\{ {\boldsymbol x} : x_1 \ge 0,~ x_2 \ge 0 \}$
  2. $\{ {\boldsymbol x} : x_1 x_2 \ge 0 \}$
  3. $\{ {\boldsymbol x} : x_1^2 + x_2^2 = 4 \}$
  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».
co-f-269 · level facile · notes
Does the point $\begin{pmatrix} 4 \\ 6 \end{pmatrix}$ belong to the Euclidean ball $\{ {\boldsymbol x} \in \R^2 : \|{\boldsymbol x} - \begin{pmatrix} 1 \\ 2 \end{pmatrix}\|_2 \le 5 \}$?
  1. no: it lies on the boundary, which is excluded
  2. no: its distance from the center is $7$
  3. yes: its distance from the center is $4$
  4. yes: its distance from the center is exactly $5$
Explanation. $\sqrt{3^2 + 4^2} = 5 \le 5$: the ball (with $\le$) contains its bounding circle. The distance $7$ is $3 + 4$, the norm $1$.
co-f-270 · level facile · notes
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|\}$?
  1. no: $\sqrt{1 + 1} = \sqrt{2} > 1$
  2. yes: $1 + (-1) = 0 \le 1$
  3. yes: $\max\{|1|, |-1|\} = 1 \le 1$
  4. 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.
co-f-271 · level facile · notes
In $\R$ let $A = [0, 1]$ and $B = [2, 3]$, both convex. What can be said of $A \cap B$ and of $A \cup B$?
  1. $A \cap B$ is not defined, because it is empty
  2. $A \cap B = \emptyset$ is convex, $A \cup B$ is not convex
  3. $A \cap B$ is not convex, $A \cup B$ is convex
  4. $A \cup B$ is convex, as a union of convex sets
Explanation. The intersection of convex sets is convex, even when it is empty. The union is not: it contains $1$ and $2$ but not $\frac{3}{2}$.
co-f-272 · level facile · notes
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?
  1. $4$
  2. $2$
  3. $2\sqrt{2}$
  4. $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.
co-f-273 · level ipotesi · notes
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?
  1. that $A$ is certainly convex
  2. that $A$ is certainly not convex
  3. that $A$ is convex, provided it is bounded
  4. 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.
co-f-274 · level ipotesi · notes
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$?
  1. it is never convex
  2. it is convex only if $A_1 \subseteq A_2$
  3. it may or may not be convex
  4. 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}]$).
co-f-275 · level ipotesi · notes
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 \}$?
  1. it becomes the empty set
  2. it stays convex
  3. it is no longer convex
  4. 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.
co-f-276 · level ipotesi · notes
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?
  1. not always: the sum must be $1$
  2. yes, because the scalars are nonnegative
  3. yes, if every $\lambda_i$ is at most $1$
  4. 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.
co-f-277 · level ipotesi · notes
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 \}$?
  1. it is convex, like every ball of a norm
  2. it is convex, because $g$ is a continuous function
  3. it is empty, because $g$ can take negative values
  4. 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.
co-f-324 · level teorema · notes
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$)?
  1. they are convex sets
  2. they are convex only if ${\boldsymbol c} = {\boldsymbol 0}$
  3. they are convex only in $\R^2$
  4. 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.
co-f-325 · level teorema · notes
On a set $A \subseteq \R^n$, which statement is correct?
  1. $A$ is convex if and only if it is both bounded and closed
  2. $A$ is convex if and only if it contains the origin
  3. $A$ is convex if and only if its complement is convex
  4. $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.
co-f-326 · level teorema · notes
Which set is convex for every center ${\boldsymbol c} \in \R^2$ and every radius $r > 0$?
  1. $\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_1 \ge r \}$
  2. $\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_2 \le r \} \cup \{ {\boldsymbol x} : \|{\boldsymbol x} + {\boldsymbol c}\|_2 \le r \}$
  3. $\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_\infty \le r \}$
  4. $\{ {\boldsymbol x} : \|{\boldsymbol x} - {\boldsymbol c}\|_2 = r \}$
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).
co-f-327 · level ipotesi · notes
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}]$?
  1. only the midpoint of the segment
  2. the half of the segment on the side of ${\boldsymbol w}$
  3. the whole segment between ${\boldsymbol p}$ and ${\boldsymbol w}$
  4. 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}$.
co-f-328 · level ipotesi · notes
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}$)?
  1. no: the rational numbers are a counterexample
  2. yes: repeating midpoints gives the whole segment
  3. yes, at least for subsets of $\R$
  4. 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.
co-f-329 · level ipotesi · notes
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$?
  1. the empty set, convex
  2. a nonconvex subset of $\R^n$
  3. the whole space $\R^n$, convex
  4. 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.
co-f-377 · level ipotesi · notes
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 \}$?
  1. it is convex, like every set defined by a norm
  2. it is convex, because it is unbounded
  3. it is empty
  4. 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$.
co-f-378 · level ipotesi · notes
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}$?
  1. only the three points
  2. the segment between $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
  3. the segment between $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} 3 \\ 3 \end{pmatrix}$
  4. 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.
co-f-379 · level ipotesi · notes
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]$?
  1. $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$, that is, the point ${\boldsymbol w}$ itself
  2. $\begin{pmatrix} 4 \\ 0 \end{pmatrix}$, on the line through ${\boldsymbol p}$ and ${\boldsymbol w}$, beyond ${\boldsymbol w}$
  3. $\begin{pmatrix} -2 \\ 0 \end{pmatrix}$, on the line through ${\boldsymbol p}$ and ${\boldsymbol w}$, beyond ${\boldsymbol p}$
  4. $\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]$.
co-f-380 · level facile · notes
A polygon in $\R^2$ has a «reflex» corner (a vertex where the boundary bends inwards). Is it a convex set?
  1. no: one of its segments can leave it
  2. yes: every polygon in $\R^2$ is convex
  3. yes, because its sides are straight
  4. 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.

2. Functions of several variables (48)

co-f-025 · level facile · notes
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}$?
  1. $6$
  2. $-6$
  3. $0$
  4. $2$
Explanation. $1\cdot(-2) + 2^2 = -2 + 4 = 2$. Typical mistakes: sign of $x_2$ ignored ($6$) or a signed square ($-6$).
co-f-026 · level facile · notes
What is the gradient $\nabla f({\boldsymbol x})$ of $f : D \subseteq \R^n \to \R$?
  1. the sum of the first-order partial derivatives of $f$
  2. the row vector of the second-order partial derivatives of $f$
  3. the column vector of the first-order partial derivatives of $f$
  4. 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.
co-f-027 · level facile · notes
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = x_1^2 x_2$, what is the gradient $\nabla f$ at the point $\begin{pmatrix} 1 \\ 3 \end{pmatrix}$?
  1. $\begin{pmatrix} 6 \\ 2 \end{pmatrix}$
  2. $\begin{pmatrix} 6 \\ 1 \end{pmatrix}$
  3. $\begin{pmatrix} 1 \\ 6 \end{pmatrix}$
  4. $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
Explanation. $\nabla f({\boldsymbol x}) = (2 x_1 x_2,\; x_1^2)$, which at $(1,3)$ equals $(6, 1)$. The vector $(1,6)$ swaps the components.
co-f-028 · level facile · notes
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = x_1^2 x_2$, what is the Hessian $\nabla^2 f$ at the point $\begin{pmatrix} 1 \\ 3 \end{pmatrix}$?
  1. $\begin{pmatrix} 6 & 2 \\ 2 & 0 \end{pmatrix}$
  2. $\begin{pmatrix} 6 & 1 \\ 1 & 0 \end{pmatrix}$
  3. $\begin{pmatrix} 0 & 2 \\ 2 & 6 \end{pmatrix}$
  4. $\begin{pmatrix} 2 & 6 \\ 6 & 0 \end{pmatrix}$
Explanation. $\nabla^2 f({\boldsymbol x}) = \begin{pmatrix} 2x_2 & 2x_1 \\ 2x_1 & 0 \end{pmatrix}$, which at $(1,3)$ equals $\begin{pmatrix} 6 & 2 \\ 2 & 0 \end{pmatrix}$. The mixed derivative is $2x_1$, not $x_1$.
co-f-029 · level facile · notes
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = e^{x_1} + x_2^2$, what is the Hessian $\nabla^2 f$ at the point $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$?
  1. $\begin{pmatrix} 0 & 0 \\ 0 & 2 \end{pmatrix}$
  2. $\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$
  3. $\begin{pmatrix} e & 0 \\ 0 & 2 \end{pmatrix}$
  4. $\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}$
Explanation. $\nabla^2 f({\boldsymbol x}) = \begin{pmatrix} e^{x_1} & 0 \\ 0 & 2 \end{pmatrix}$ and $e^0 = 1$. Typical mistakes: differentiating $e^{x_1}$ into $0$, evaluating $e^1$.
co-f-030 · level facile · notes
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}$?
  1. a direction perpendicular to $\nabla f({\boldsymbol x})$
  2. the first column of $\nabla^2 f({\boldsymbol x})$
  3. $-\nabla f({\boldsymbol x})$
  4. $\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.
co-f-031 · level facile · notes
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}$?
  1. it is always parallel to one of the axes
  2. it is perpendicular to the level set and points toward increasing values of $f$
  3. it is tangent to the level set
  4. 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.
co-f-032 · level facile · notes
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = (x_1-2)^2 + (x_2-2)^2 + 1$, what is the level set $L(10) = \{ {\boldsymbol x} \in \R^2 : f({\boldsymbol x}) = 10 \}$?
  1. the circle with center $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$ and radius $3$
  2. the circle with center $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$ and radius $\sqrt{10}$
  3. the circle with center $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$ and radius $9$
  4. the circle with center $\begin{pmatrix} -2 \\ -2 \end{pmatrix}$ and radius $3$
Explanation. $(x_1-2)^2 + (x_2-2)^2 = 10 - 1 = 9$: radius $\sqrt{9} = 3$. Typical mistakes: forgetting the constant $1$, forgetting the square root, wrong sign of the center.
co-f-033 · level facile · notes
For $f : \R^2 \to \R$, $f({\boldsymbol x}) = x_1^2 + x_2^2 + 5$, what is the level set $L(4) = \{ {\boldsymbol x} \in \R^2 : f({\boldsymbol x}) = 4 \}$?
  1. the single point $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$
  2. the circle centered at the origin with radius $2$
  3. the circle centered at the origin with radius $3$
  4. the empty set
Explanation. We would need $x_1^2 + x_2^2 = -1$, impossible: $f({\boldsymbol x}) \ge 5$ everywhere. The single point $(0,0)$ is $L(5)$.
co-f-034 · level facile · notes
For a twice differentiable function $f : D \subseteq \R^n \to \R$, when is the Hessian $\nabla^2 f({\boldsymbol x})$ symmetric?
  1. only when $f$ is a quadratic function
  2. only at the points where the gradient of $f$ is zero
  3. when the second-order partial derivatives of $f$ are continuous
  4. 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.
co-f-035 · level facile · notes
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?
  1. by differentiating $f$ twice with respect to $x_i$, for every $j$
  2. by differentiating $\frac{\partial f}{\partial x_j}$ with respect to $x_i$
  3. by multiplying $\frac{\partial f}{\partial x_i}$ by $\frac{\partial f}{\partial x_j}$
  4. 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$.
co-f-036 · level facile · notes
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$?
  1. $\nabla f = \begin{pmatrix} 3 \\ -1 \end{pmatrix}$ at every point and $\nabla^2 f$ is the zero matrix
  2. $\nabla f = \begin{pmatrix} 3 \\ -1 \\ 4 \end{pmatrix}$ and $\nabla^2 f$ is the zero matrix
  3. $\nabla f = \begin{pmatrix} 3 \\ -1 \end{pmatrix}$ and $\nabla^2 f$ is the identity matrix
  4. $\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.
co-f-037 · level media · notes
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}$?
  1. $\nabla f = \begin{pmatrix} -2 \\ 4 \end{pmatrix}$, $\nabla^2 f = \begin{pmatrix} -2 & 2 \\ 2 & 6 \end{pmatrix}$
  2. $\nabla f = \begin{pmatrix} -2 \\ -2 \end{pmatrix}$, $\nabla^2 f = \begin{pmatrix} -2 & 2 \\ 2 & -6 \end{pmatrix}$
  3. $\nabla f = \begin{pmatrix} 2 \\ 4 \end{pmatrix}$, $\nabla^2 f = \begin{pmatrix} 2 & 2 \\ 2 & -6 \end{pmatrix}$
  4. $\nabla f = \begin{pmatrix} -2 \\ 4 \end{pmatrix}$, $\nabla^2 f = \begin{pmatrix} -2 & 2 \\ 2 & -6 \end{pmatrix}$
Explanation. $\nabla f = (2x_1x_2,\; x_1^2 + 3x_2^2) = (-2, 4)$; $\nabla^2 f = \begin{pmatrix} 2x_2 & 2x_1 \\ 2x_1 & 6x_2 \end{pmatrix} = \begin{pmatrix} -2 & 2 \\ 2 & -6 \end{pmatrix}$. Typical mistakes: sign of $6x_2$, sign of $3x_2^2$.
co-f-038 · level media · notes
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)$?
  1. $\begin{pmatrix} 4 \\ 4 \end{pmatrix}$
  2. $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
  3. $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$
  4. $\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.
co-f-039 · level media · notes
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?
  1. $\begin{pmatrix} \ln 2 \\ 0 \end{pmatrix}$ and $\nabla f = \begin{pmatrix} \ln 2 \\ 0 \end{pmatrix}$
  2. $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$ and $\nabla f = \begin{pmatrix} 1 \\ 2 \end{pmatrix}$
  3. $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$ and $\nabla f = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$
  4. $\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)$.
co-f-040 · level teorema · notes
On the Hessian $\nabla^2 f$ of a function $f : D \subseteq \R^n \to \R$, which statement is correct?
  1. if the second-order partial derivatives of $f$ are continuous, the Hessian is symmetric
  2. the Hessian of every function is constant
  3. the Hessian is symmetric only if $f$ is a quadratic function
  4. 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.
co-f-041 · level teorema · notes
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?
  1. among unit directions, $\nabla f({\boldsymbol x})$ gives the minimum directional derivative (steepest descent)
  2. $\nabla f({\boldsymbol x})$ is tangent to the level set through ${\boldsymbol x}$
  3. the directional derivative of $f$ along $\nabla f({\boldsymbol x})$ is zero
  4. 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.
co-f-042 · level teorema · notes
On the Hessian $\nabla^2 f({\boldsymbol x})$ of a function $f : \R^n \to \R$, which statement is correct?
  1. for $f({\boldsymbol x}) = x_1^2 x_2$ it is constant and equal to $\begin{pmatrix} 2 & 2 \\ 2 & 0 \end{pmatrix}$
  2. for a quadratic function it depends on the point, while the gradient is constant
  3. for a quadratic function it is constant; in general it depends on the point, as for $x_1^2 x_2$
  4. 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.
co-f-043 · level ipotesi · notes
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?
  1. that $\nabla f({\boldsymbol x}) = {\boldsymbol 0}$
  2. the continuity of the second-order partial derivatives of $f$
  3. the convexity of $f$
  4. 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.
co-f-044 · level ipotesi · notes
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?
  1. that the gradient at ${\boldsymbol x}$ is nonzero
  2. that the function $f$ is convex
  3. that the Hessian at ${\boldsymbol x}$ is positive semidefinite
  4. 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.
co-f-045 · level ipotesi · notes
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?
  1. the scalar product between $(1,2)$ and the point $(0,1)$, which should be zero
  2. the Hessian at $(0,1)$, which is diagonal and hence has perpendicular columns
  3. the convexity of $f$, which makes $L(2)$ the boundary of a convex set
  4. 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.
co-f-046 · level facile · notes
For a function $f : D \subseteq \R^n \to \R$ of $n$ real variables, what are $D$ and $f({\boldsymbol x})$?
  1. $D$ is the set of the values taken, and $f({\boldsymbol x})$ is a real number
  2. $D$ is a subset of $\R$, and $f({\boldsymbol x})$ is a vector of $\R^n$
  3. $D$ is the domain, a subset of $\R^n$, and $f({\boldsymbol x})$ is a real number
  4. $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).
co-f-047 · level media · notes
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)$?
  1. $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$, perpendicular to $L(2)$ and pointing out of the circle
  2. $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$, perpendicular to $L(2)$ and pointing out of the circle
  3. $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$, tangent to $L(2)$ and hence directed along the circle
  4. $\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$.
co-f-150 · level facile · notes
For $f(x_1, x_2) = \frac{1}{x_1 - x_2}$, which set is the natural domain $D \subseteq \R^2$?
  1. $\{(x_1, x_2) : x_1 > 0\}$
  2. $\{(x_1, x_2) : x_1 = x_2\}$
  3. $\{(x_1, x_2) : x_1 \neq x_2\}$
  4. $\R^2$
Explanation. The denominator cannot vanish.
co-f-151 · level facile · notes
What is $f(x_1, x_2) = x_1^2 x_2 - 3x_2$ at the point $(2, -1)'$?
  1. $-7$
  2. $-1$
  3. $7$
  4. $1$
Explanation. $4 \cdot (-1) - 3 \cdot (-1) = -1$.
co-f-152 · level teorema · notes
For a function with continuous second derivatives, which statement about the Hessian matrix is correct?
  1. It is symmetric
  2. It is diagonal
  3. It is always invertible
  4. It coincides with the gradient
Explanation. Mixed derivatives coincide (Schwarz's theorem).
co-f-153 · level ipotesi · notes
The gradient $\nabla f(\bar{\boldsymbol x})$ is the vector of partial derivatives. What is needed for it to be defined at $\bar{\boldsymbol x}$?
  1. That $f$ is convex
  2. That $f$ is bounded
  3. That $\bar{\boldsymbol x} = {\boldsymbol 0}$
  4. Partial derivatives at $\bar{\boldsymbol x}$
Explanation. Each component is a partial derivative.
co-f-278 · level facile · notes
For $f(x_1, x_2) = \ln(x_1 + x_2)$, which set is the natural domain $D \subseteq \R^2$?
  1. $\{ {\boldsymbol x} : x_1 > 0,~ x_2 > 0 \}$
  2. $\R^2$
  3. $\{ {\boldsymbol x} : x_1 + x_2 > 0 \}$
  4. $\{ {\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.
co-f-279 · level facile · notes
What is the function $f : \R^3 \to \R$, $f({\boldsymbol x}) = x_1 - 2x_2 x_3$, at the point $\begin{pmatrix} 1 \\ 1 \\ 2 \end{pmatrix}$?
  1. $-4$
  2. $-3$
  3. $-1$
  4. $5$
Explanation. $1 - 2 \cdot 1 \cdot 2 = -3$. With $-1$ the factor $2$ is forgotten, with $5$ the sign is wrong.
co-f-280 · level facile · notes
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?
  1. $3x_1$
  2. $3x_2$
  3. $2x_1 + 3x_2$
  4. $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$.
co-f-281 · level facile · notes
For $f({\boldsymbol x}) = 4x_1 - x_2^2$, what is the gradient $\nabla f$ at the point $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$?
  1. $\begin{pmatrix} 4 \\ -2 \end{pmatrix}$
  2. $\begin{pmatrix} -4 \\ 4 \end{pmatrix}$
  3. $\begin{pmatrix} 4 \\ 4 \end{pmatrix}$
  4. $\begin{pmatrix} 4 \\ -4 \end{pmatrix}$
Explanation. $\nabla f({\boldsymbol x}) = \begin{pmatrix} 4 \\ -2x_2 \end{pmatrix}$, which at $x_2 = 2$ equals $\begin{pmatrix} 4 \\ -4 \end{pmatrix}$. With $-2$ one forgets to substitute $x_2$.
co-f-282 · level facile · notes
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})$?
  1. vector with $9$ components and $3 \times 3$ matrix
  2. vector with $3$ components and $9 \times 9$ matrix
  3. vector with $3$ components and $3 \times 3$ matrix
  4. 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$.
co-f-283 · level facile · notes
What is the Hessian matrix $\nabla^2 f({\boldsymbol x})$ of $f({\boldsymbol x}) = x_1 x_2$?
  1. $\begin{pmatrix} x_2 & 0 \\ 0 & x_1 \end{pmatrix}$
  2. $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$
  3. $\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$
  4. $\begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}$
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.
co-f-284 · level facile · notes
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 \}$?
  1. the line $x_1 + x_2 = 3$
  2. the half-plane $x_1 + x_2 \le 3$
  3. only the point $\begin{pmatrix} \frac{3}{2} \\ \frac{3}{2} \end{pmatrix}$
  4. 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$.
co-f-285 · level facile · notes
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?
  1. it increases as fast as possible
  2. it decreases as fast as possible
  3. it doubles
  4. 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})$.
co-f-286 · level facile · notes
For $f({\boldsymbol x}) = e^{2x_1} + x_2$, what is the gradient $\nabla f$ at the point $\begin{pmatrix} 0 \\ 3 \end{pmatrix}$?
  1. $\begin{pmatrix} 2 \\ 3 \end{pmatrix}$
  2. $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$
  3. $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
  4. $\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.
co-f-287 · level facile · notes
For $f({\boldsymbol x}) = x_1^3 + x_2^2$, what can be said of the Hessian matrix $\nabla^2 f({\boldsymbol x})$?
  1. it depends on the point: it is $\begin{pmatrix} 3x_1^2 & 0 \\ 0 & 2x_2 \end{pmatrix}$
  2. it depends on the point: it is $\begin{pmatrix} 6x_1 & 0 \\ 0 & 2 \end{pmatrix}$
  3. it is constant: $\begin{pmatrix} 6 & 0 \\ 0 & 2 \end{pmatrix}$
  4. 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.
co-f-288 · level ipotesi · notes
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$?
  1. no: it is the zero vector, not a direction
  2. yes, as at every point of the domain of $f$
  3. yes, provided the function $f$ is convex
  4. 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.
co-f-289 · level ipotesi · notes
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$?
  1. yes, for every step $\alpha > 0$
  2. yes, because the derivative $f'(\bar x)$ is not zero
  3. no: it holds for no step $\alpha > 0$
  4. 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.
co-f-290 · level ipotesi · notes
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?
  1. it equals $\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}$ there
  2. it is the zero matrix there
  3. it is not defined at that point
  4. 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}$.
co-f-291 · level ipotesi · notes
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}$?
  1. yes: the gradient equals $\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}$
  2. no: the partial derivatives do not exist
  3. yes: the gradient equals $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
  4. 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$.
co-f-292 · level ipotesi · notes
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}$?
  1. the second partial derivatives of $f$ at $\bar{\boldsymbol x}$
  2. only the gradient of $f$ at $\bar{\boldsymbol x}$
  3. the convexity of the function $f$ on its domain $D$
  4. 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.
co-f-330 · level teorema · notes
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?
  1. $\nabla f = {\boldsymbol c}$, parallel to the level sets ${\boldsymbol c}'{\boldsymbol x} = k$
  2. $\nabla f = {\boldsymbol 0}$ at every point, because $f$ is linear
  3. $\nabla f = {\boldsymbol c}$, perpendicular to the level sets ${\boldsymbol c}'{\boldsymbol x} = k$
  4. $\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$).
co-f-331 · level teorema · notes
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?
  1. it does not exist, because $f$ is linear
  2. it is the zero matrix at every point
  3. it is the diagonal matrix with ${\boldsymbol c}$ on the diagonal
  4. 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}$.
co-f-332 · level ipotesi · notes
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 \}$?
  1. only the point ${\boldsymbol 0}$, where the gradient is zero
  2. a circle of radius $0$ with a perpendicular gradient
  3. the empty set: no point gives $0$
  4. 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}}$.
co-f-333 · level ipotesi · notes
For $f({\boldsymbol x}) = e^{x_1} + x_2^2$, the level set $\{ {\boldsymbol x} : f({\boldsymbol x}) = 2 \}$ is the curve $x_1 = \ln(2 - x_2^2)$. Why is $|x_2| < \sqrt{2}$ required?
  1. because $e^{x_1}$ must be greater than $2$
  2. because the level set is a circle of radius $\sqrt{2}$
  3. because otherwise the gradient would be zero
  4. because the logarithm requires $2 - x_2^2 > 0$
Explanation. From $e^{x_1} = 2 - x_2^2$ we need $2 - x_2^2 > 0$, since $e^{x_1} > 0$: for $|x_2| \ge \sqrt{2}$ no $x_1$ gives the level $2$.
co-f-381 · level ipotesi · notes
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}$?
  1. yes: the gradient equals $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$
  2. yes: the gradient equals $\begin{pmatrix} \frac{1}{2} \\ 1 \end{pmatrix}$
  3. yes: the gradient equals $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
  4. 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.
co-f-382 · level ipotesi · notes
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}$?
  1. yes, because the Hessian matrix is symmetric
  2. no, because the Hessian matrix is not symmetric
  3. no: for example $f\big((t, t)'\big) = t^3 \ne 0$ for every $t \ne 0$
  4. 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.

3. Convex and concave functions (64)

co-f-048 · level facile · notes
When is a function $f : D \subseteq \R^n \to \R$ convex in its domain?
  1. 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]$
  2. 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]$
  3. 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
  4. 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.
co-f-049 · level facile · notes
A function $f : D \subseteq \R^n \to \R$, with convex domain $D$, is concave in $D$ if and only if:
  1. $f$ is not convex in $D$
  2. $f({\boldsymbol x}) \ge 0$ for every ${\boldsymbol x} \in D$
  3. $f$ is convex in $D$ and $D$ is bounded
  4. $-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.
co-f-050 · level facile · notes
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)?
  1. $8$, $40$, $6$
  2. $8$, $2\sqrt{10}$, $2$
  3. $8$, $2\sqrt{10}$, $6$
  4. $-4$, $2\sqrt{10}$, $6$
Explanation. $|2| + |-6| = 8$, $\sqrt{4 + 36} = \sqrt{40} = 2\sqrt{10}$, $\max\{2, 6\} = 6$. Typical mistakes: absolute values forgotten, square root forgotten, minimum instead of maximum.
co-f-051 · level facile · notes
What is the norm $q = 3$, $\|{\boldsymbol x}\|_3$, of the vector ${\boldsymbol x} = \begin{pmatrix} 3 \\ -4 \end{pmatrix} \in \R^2$?
  1. $5$
  2. $\sqrt[3]{91}$
  3. $\sqrt[3]{-37}$
  4. $\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$.
co-f-052 · level facile · notes
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$)?
  1. $\|\alpha\, {\boldsymbol p}\| = |\alpha|\, \|{\boldsymbol p}\|$
  2. $\|\alpha\, {\boldsymbol p}\| = \alpha\, \|{\boldsymbol p}\|$
  3. $\|\alpha\, {\boldsymbol p}\| = \alpha^2\, \|{\boldsymbol p}\|$
  4. $\|\alpha + {\boldsymbol p}\| \le |\alpha| + \|{\boldsymbol p}\|$
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.
co-f-053 · level facile · notes
What can be said about the function $f(x) = |x|$ in $\R$?
  1. it is concave, because its graph is made of two segments
  2. it is neither convex nor concave, because it is not differentiable at $0$
  3. it is convex only in $[0, +\infty)$
  4. 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.
co-f-054 · level facile · notes
The function $f(x) = \min\{\, x + 2,\; 4 - \frac{1}{2}x \,\}$ in $[-2, 4]$ is:
  1. neither convex nor concave
  2. both convex and concave
  3. concave
  4. 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}$.
co-f-055 · level facile · notes
If $f_1$ and $f_2$ are convex in $\R^n$, the function $\max\{f_1({\boldsymbol x}), f_2({\boldsymbol x})\}$ is:
  1. neither convex nor concave in general
  2. convex
  3. concave
  4. 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.
co-f-056 · level facile · notes
If $f$ and $g$ are convex in $D$, for which scalars $\alpha, \beta$ is the function $\alpha f + \beta g$ certainly convex in $D$?
  1. for every $\alpha \ge 0$ and $\beta \ge 0$
  2. for every $\alpha, \beta \in \R$
  3. only for $\alpha + \beta = 1$
  4. 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.
co-f-057 · level facile · notes
$f(x) = x^2$ and $g(x) = 2x^2$ are convex in $\R$. What can be said about $f - g$?
  1. $f - g$ is convex, because it is a difference of convex functions
  2. $f - g$ is neither convex nor concave
  3. $f - g$ is both convex and concave
  4. $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$).
co-f-058 · level facile · notes
The function $f({\boldsymbol x}) = x_1 + x_2 - 1$ in $\R^2$ is:
  1. concave but not convex
  2. neither convex nor concave
  3. both convex and concave
  4. convex but not concave
Explanation. Example 3.3: the inequality of the definition holds with equality, so both $\le$ and $\ge$ hold.
co-f-059 · level facile · notes
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?
  1. it is not convex, because its boundary contains an arc of a circle
  2. because it is described by constraints $f_i({\boldsymbol x}) \le 0$ with convex functions $f_i$
  3. because it is bounded, since it lies entirely in the disk of radius $3$
  4. 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.
co-f-060 · level facile · notes
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. $1$ and $3$
  2. $-1$ and $-1$
  3. $1$ and $1$
  4. $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$.
co-f-061 · level media · notes
What are the vertices of the convex set $\{ {\boldsymbol x} \in \R^2 : |x_1| + |x_2| - 2 \le 0,~ x_1 + x_2 - 1 \le 0 \}$?
  1. $\begin{pmatrix} -2 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 0 \\ -2 \end{pmatrix}$, $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$
  2. $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 0 \\ 2 \end{pmatrix}$, $\begin{pmatrix} -2 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 0 \\ -2 \end{pmatrix}$
  3. $\begin{pmatrix} -2 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 0 \\ -2 \end{pmatrix}$, $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$, $\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}$
  4. $\begin{pmatrix} -2 \\ 0 \end{pmatrix}$, $\begin{pmatrix} 0 \\ -2 \end{pmatrix}$, $\begin{pmatrix} \frac{3}{2} \\ -\frac{1}{2} \end{pmatrix}$, $\begin{pmatrix} -\frac{1}{2} \\ \frac{3}{2} \end{pmatrix}$
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).
co-f-062 · level media · notes
Which computation proves that $f(x) = x^3$ is not convex in $\R$?
  1. with $p = -2$, $w = 0$, $\lambda = \frac{1}{2}$: $f(-1) = -1 < 0 = f(0)$
  2. $f(-1) = -1 < 0$, and a convex function takes no negative values
  3. with $p = -2$, $w = 0$, $\lambda = \frac{1}{2}$: $f(-1) = -1 > -4 = \frac{1}{2} f(-2) + \frac{1}{2} f(0)$
  4. with $p = 0$, $w = 2$, $\lambda = \frac{1}{2}$: $f(1) = 1 \le 4 = \frac{1}{2} f(0) + \frac{1}{2} f(2)$
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.
co-f-063 · level media · notes
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$?
  1. $\|{\boldsymbol x}\|_\infty = 2 < \|{\boldsymbol x}\|_1 = 5 < \|{\boldsymbol x}\|_2 = 9$
  2. $\|{\boldsymbol x}\|_\infty = 2 < \|{\boldsymbol x}\|_2 = 3 < \|{\boldsymbol x}\|_1 = 5$
  3. $\|{\boldsymbol x}\|_1 = 1 < \|{\boldsymbol x}\|_\infty = 2 < \|{\boldsymbol x}\|_2 = 3$
  4. $\|{\boldsymbol x}\|_2 = 3 < \|{\boldsymbol x}\|_\infty = 4 < \|{\boldsymbol x}\|_1 = 5$
Explanation. $\|{\boldsymbol x}\|_1 = 1 + 2 + 2 = 5$, $\|{\boldsymbol x}\|_2 = \sqrt{9} = 3$, $\|{\boldsymbol x}\|_\infty = 2$. Typical mistakes: signed sum ($1$), square root forgotten ($9$).
co-f-064 · level teorema · notes
On the convexity of norms as functions from $\R^n$ to $\R$, which statement is correct?
  1. for every norm $\|\cdot\|$ on $\R^n$, the function ${\boldsymbol x} \mapsto \|{\boldsymbol x}\|$ is convex in $\R^n$
  2. for every norm $\|\cdot\|$ on $\R^n$, the function ${\boldsymbol x} \mapsto \|{\boldsymbol x}\|$ is concave in $\R^n$
  3. among the norms, only the Euclidean norm is a convex function
  4. 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$).
co-f-065 · level teorema · notes
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?
  1. $\{ {\boldsymbol x} \in \bigcap_i D_i : f_i({\boldsymbol x}) \ge 0,~ \forall i \}$ is convex
  2. $\{ {\boldsymbol x} \in \bigcap_i D_i : f_i({\boldsymbol x}) = 0,~ \forall i \}$ is convex
  3. $\{ {\boldsymbol x} \in \bigcap_i D_i : f_i({\boldsymbol x}) \le 0,~ \forall i \}$ is convex only if the $f_i$ are linear
  4. $\{ {\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.
co-f-066 · level teorema · notes
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?
  1. the maximum of $m$ convex functions is concave
  2. the maximum of $m$ convex functions is convex only if $m = 2$
  3. the maximum of $m$ convex functions is convex, and the minimum of $m$ concave functions is concave
  4. 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$.
co-f-067 · level ipotesi · notes
Which results are needed to prove that ${\boldsymbol x} \mapsto \|{\boldsymbol x}\|_2$ is convex in $\R^n$?
  1. the inequality $2ab \le a^2 + b^2$, applied component by component
  2. triangle inequality and absolute homogeneity, with $\lambda, 1 - \lambda \ge 0$, and the convexity of $\R^n$
  3. the Cauchy–Schwarz inequality, applied to ${\boldsymbol p}$ and ${\boldsymbol w}$, and the convexity of $\R^n$
  4. 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}$.
co-f-068 · level ipotesi · notes
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]$?
  1. the expansion: the difference between the two sides equals $\lambda(1-\lambda)(a-b)^2 \ge 0$
  2. the triangle inequality $|a + b| \le |a| + |b|$ with $\lambda \in [0,1]$
  3. the hypothesis $a, b \ge 0$, without which the inequality is false
  4. 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.
co-f-069 · level ipotesi · notes
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?
  1. $f$ and $g$ convex in $D$ (hence $D$ convex), with $\alpha + \beta = 1$
  2. $f$ and $g$ twice differentiable, with positive semidefinite Hessian
  3. $f$ and $g$ convex in $D$ (hence $D$ convex), with arbitrary $\alpha, \beta \in \R$
  4. $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.
co-f-070 · level teorema · notes
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?
  1. it is convex only in $\{ {\boldsymbol x} : {\boldsymbol x} \ge {\boldsymbol 0} \}$
  2. it is not convex, because the square of a convex function never is
  3. it is convex in the whole $\R^n$
  4. 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.
co-f-071 · level facile · notes
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?
  1. $\frac{7}{2}$ and $\frac{7}{2}$
  2. $\frac{7}{2}$ and $\frac{9}{2}$
  3. $\frac{9}{2}$ and $\frac{7}{2}$
  4. $\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$.
co-f-072 · level facile · notes
The function $f : \R \to \R$, $f(x) = \max\{\, \frac{1}{10}(x-10)^2,\; \frac{1}{10}x^2 \,\}$, is:
  1. convex, as the maximum of two convex functions
  2. concave, because the graph has a corner at $x = 5$
  3. neither convex nor concave, because it is not differentiable at $x = 5$
  4. 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.
co-f-073 · level facile · notes
When is a function $f : D \subseteq \R^n \to \R$ concave in its domain $D$?
  1. 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]$
  2. 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]$
  3. 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
  4. 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.
co-f-074 · level facile · notes
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))$?
  1. above the chord only if $f(p) = f(w)$
  2. below the chord only if $f$ is differentiable
  3. above the chord or on it
  4. 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.
co-f-154 · level facile · notes
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$?
  1. $f(x) = x^3$
  2. $f(x) = \sin x$
  3. $f(x) = |x|$
  4. $f(x) = -x^2$
Explanation. The absolute value is a norm: it is convex.
co-f-155 · level facile · notes
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?
  1. $4 \le 2$
  2. $1 \le 2$
  3. $2 \le 1$
  4. $1 \le 1$
Explanation. $f(1) = 1$ and $\frac12 f(0) + \frac12 f(2) = 2$.
co-f-156 · level facile · notes
When is $f: D \to \R$ ($D$ convex) concave?
  1. $f(\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}) \ge \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for all ${\boldsymbol p}, {\boldsymbol w}$ and $\lambda \in [0,1]$
  2. $f(\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}) \le \lambda f({\boldsymbol p}) + (1-\lambda) f({\boldsymbol w})$ for all ${\boldsymbol p}, {\boldsymbol w}$ and $\lambda$
  3. $f({\boldsymbol p}) \le f({\boldsymbol w})$ for all ${\boldsymbol p}, {\boldsymbol w}$
  4. $f$ is decreasing in every variable
Explanation. The chord lies below the graph.
co-f-157 · level facile · notes
Which function is concave on $(0, +\infty)$?
  1. $f(x) = x^2$
  2. $f(x) = \frac1x$
  3. $f(x) = e^x$
  4. $f(x) = \sqrt{x}$
Explanation. The square root has chords below the graph.
co-f-158 · level teorema · notes
Which statement about a linear function $f({\boldsymbol x}) = {\boldsymbol c}'{\boldsymbol x}$ is correct?
  1. It is neither convex nor concave
  2. It is concave only if ${\boldsymbol c} \le {\boldsymbol 0}$
  3. It is both convex and concave
  4. It is convex but not concave
Explanation. The defining inequality holds with equality.
co-f-159 · level ipotesi · notes
To prove that $f$ is concave it suffices to show that $-f$ is convex. Which fact justifies it?
  1. That the domain is bounded
  2. The sign $-$ reverses the inequality
  3. That $f$ is positive
  4. That $f$ is quadratic
Explanation. It is the observation linking convex and concave functions.
co-f-160 · level facile · notes
The Euclidean norm $f({\boldsymbol x}) = \|{\boldsymbol x}\|_2$ on $\R^n$ is:
  1. convex
  2. concave
  3. neither convex nor concave
  4. convex only for $n = 1$
Explanation. Triangle inequality and homogeneity give convexity.
co-f-161 · level teorema · notes
Which statement about norms on $\R^n$ is correct?
  1. Only the Euclidean norm is convex
  2. Norms are concave
  3. The $\ell_\infty$ norm is not convex
  4. Every norm is a convex function
Explanation. $\|\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}\| \le \lambda\|{\boldsymbol p}\| + (1-\lambda)\|{\boldsymbol w}\|$.
co-f-162 · level ipotesi · notes
In the proof that a norm is convex, which norm properties are used?
  1. Differentiability
  2. That the domain is bounded
  3. Triangle inequality and homogeneity
  4. Only positivity
Explanation. $\|\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}\| \le \|\lambda{\boldsymbol p}\| + \|(1-\lambda){\boldsymbol w}\|$.
co-f-163 · level facile · notes
For a norm $\|\cdot\|$ and a radius $r > 0$, the set $\{{\boldsymbol x} : \|{\boldsymbol x}\| \le r\}$ is:
  1. unbounded
  2. convex
  3. not convex in general
  4. finite
Explanation. Sublevel set of a convex function.
co-f-164 · level facile · notes
The function $f({\boldsymbol x}) = \|{\boldsymbol x}\|_2^2 = {\boldsymbol x}'{\boldsymbol x}$ is:
  1. convex
  2. concave
  3. linear
  4. neither convex nor concave
Explanation. It is a quadratic with ${\boldsymbol Q} = {\boldsymbol I}$, positive semidefinite.
co-f-165 · level facile · notes
If $f$ and $g$ are convex on $D$, which function is certainly convex?
  1. $f - g$
  2. $f \cdot g$
  3. $f / g$
  4. $f + g$
Explanation. A sum of convex functions is convex; differences and products are not.
co-f-166 · level facile · notes
If $f_1, f_2$ are convex, the function $g({\boldsymbol x}) = \max\{f_1({\boldsymbol x}), f_2({\boldsymbol x})\}$ is:
  1. linear
  2. neither convex nor concave in general
  3. convex
  4. concave
Explanation. The pointwise maximum of convex functions is convex.
co-f-293 · level facile · notes
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?
  1. yes, because $x^2$ is a convex function
  2. yes: the inequality holds on the two intervals
  3. no: $x^2$ is not convex on $[1, 2]$
  4. 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.
co-f-294 · level facile · notes
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)$?
  1. $f(1) \le 5$
  2. $f(1) = 3$
  3. $f(1) \le 3$
  4. $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.
co-f-295 · level facile · notes
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)$?
  1. $f(1) = 2$
  2. $f(1) \ge 2$
  3. $f(1) \le 2$
  4. $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.
co-f-296 · level facile · notes
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}$?
  1. $9 \le 13$
  2. $13 \le 9$
  3. $9 \le 9$
  4. $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$.
co-f-297 · level facile · notes
Is the function $f(x) = x^2 + 10$ on $\R$ convex?
  1. no: the constant $10$ makes it nonconvex
  2. it is convex only for $x \ge 0$
  3. no: it is concave, because $f(x) \ge 10$ everywhere
  4. yes: the constant does not change the inequality
Explanation. $\lambda \cdot 10 + (1-\lambda) \cdot 10 = 10$: the constant appears equally on both sides and the inequality of $x^2$ remains valid.
co-f-298 · level facile · notes
The function $f({\boldsymbol x}) = x_1^2 + x_2^2$ on $\R^2$, whose graph is a paraboloid, is:
  1. neither convex nor concave
  2. convex only in the first quadrant
  3. convex, as a sum of two convex functions
  4. concave, because the graph is a curved surface
Explanation. $x_1^2$ and $x_2^2$ are convex (inequality of squares), and the sum of convex functions is convex; it is also $\|{\boldsymbol x}\|_2^2$.
co-f-299 · level facile · notes
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?
  1. $\sqrt{x_1^2 + x_2^2}$
  2. $x_1^2 + x_2^2$
  3. $|x_1| + |x_2|$
  4. $\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$.
co-f-300 · level facile · notes
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}$?
  1. $5$
  2. $\sqrt{5}$
  3. $3$
  4. $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$.
co-f-301 · level facile · notes
The function $f(x) = -|x|$ on $\R$ is:
  1. convex, because $|x|$ is convex
  2. neither convex nor concave
  3. both convex and concave
  4. concave, because $|x|$ is convex
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)$).
co-f-302 · level facile · notes
Why is $|x| = \max\{x, -x\}$ a convex function on $\R$?
  1. because it is the sum of two linear functions
  2. because it is differentiable at every point
  3. because it is the maximum of two linear functions
  4. 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$.
co-f-303 · level ipotesi · notes
The maximum of two convex functions is convex. Is the <em>minimum</em> of two convex functions convex?
  1. no: the minimum of convex functions is always concave
  2. not always: $\min\{(x-1)^2, (x+1)^2\}$ is not
  3. yes, always, like the maximum
  4. 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$).
co-f-304 · level ipotesi · notes
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 \}$?
  1. not always: it may not be
  2. yes, always, like $\{ g \le 0 \}$
  3. yes, if $g$ is also continuous
  4. 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.
co-f-305 · level ipotesi · notes
The function $f({\boldsymbol x}) = \|{\boldsymbol x}\|_2^2$ is convex. Is it also a norm (positive, absolutely homogeneous, with the triangle inequality)?
  1. yes: it is the square of a norm
  2. yes: it is convex and nonnegative
  3. no: it is not a convex function
  4. 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.
co-f-306 · level ipotesi · notes
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?
  1. that $f$ is convex, if it is continuous
  2. that $f$ is not concave on $[0, 2]$
  3. nothing: all pairs $p, w$ are needed
  4. 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.
co-f-307 · level ipotesi · notes
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$?
  1. no: the left side equals $2$, the right side $4$
  2. no: the left side equals $4$, the right side $2$
  3. yes: it holds for every $\lambda \in \R$
  4. 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]$.
co-f-334 · level teorema · notes
Let $f, g : D \subseteq \R^n \to \R$ be convex in $D$. Which statement is correct?
  1. the product $f \cdot g$ is convex in $D$
  2. the difference $f - g$ is convex in $D$
  3. $\alpha f + \beta g$ is convex in $D$ for all $\alpha, \beta \ge 0$
  4. $\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$).
co-f-335 · level teorema · notes
On a function $f : D \subseteq \R^n \to \R$, with $D$ convex, which statement is correct?
  1. $f$ is convex in $D$ if and only if $f$ is increasing in $D$
  2. $f$ is convex in $D$ if and only if $-f$ is concave in $D$
  3. $f$ is convex in $D$ if and only if $\frac{1}{f}$ is concave in $D$
  4. 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.
co-f-336 · level teorema · notes
For all ${\boldsymbol p}, {\boldsymbol w} \in \R^n$ and every $\lambda \in [0,1]$, which inequality on the Euclidean norm is correct?
  1. $\|\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}\|_2 \le \lambda\|{\boldsymbol p}\|_2 + (1-\lambda)\|{\boldsymbol w}\|_2$
  2. $\|\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}\|_2 \ge \lambda\|{\boldsymbol p}\|_2 + (1-\lambda)\|{\boldsymbol w}\|_2$
  3. $\|\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}\|_2 = \lambda\|{\boldsymbol p}\|_2 + (1-\lambda)\|{\boldsymbol w}\|_2$
  4. $\|\lambda{\boldsymbol p} + (1-\lambda){\boldsymbol w}\|_2 \le \|{\boldsymbol p}\|_2\, \|{\boldsymbol w}\|_2$
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$.
co-f-383 · level facile · notes
What is the convex function $f(x) = \max\{\, \frac{1}{10}(x-10)^2,\; \frac{1}{10}x^2 \,\}$ at the point $x = 5$?
  1. $10$
  2. $\frac{5}{2}$
  3. $5$
  4. $0$
Explanation. At $x = 5$ both parabolas equal $\frac{25}{10} = \frac{5}{2}$, hence so does their maximum; it is the point where $f$ is smallest.
co-f-384 · level facile · notes
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?
  1. $q = 2$
  2. $q = 1$
  3. $q = \infty$
  4. $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.
co-f-385 · level facile · notes
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}$?
  1. $5$
  2. $26$
  3. $8$
  4. $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$.
co-f-386 · level facile · notes
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 \}$?
  1. no: it violates the first constraint
  2. no: boundary points are excluded
  3. yes: $1 - 2 \le 0$ and $1 - 1 \le 0$
  4. 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).
co-f-387 · level facile · notes
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?
  1. never, because of the constant $3$
  2. for all ${\boldsymbol p}, {\boldsymbol w}$ and every $\lambda \in [0,1]$
  3. only for $\lambda = \frac{1}{2}$, at the midpoint
  4. 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.
co-f-388 · level facile · notes
What is the norm $\infty$, $\|{\boldsymbol x}\|_\infty = \max_j |x_j|$, of the vector ${\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \\ -3 \end{pmatrix}$?
  1. $3$
  2. $1$
  3. $5$
  4. $\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.

4. Quadratic functions (56)

co-f-075 · level facile · notes
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?
  1. $\begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix}$
  2. $\begin{pmatrix} 1 & 1 \\ 1 & 3 \end{pmatrix}$
  3. $\begin{pmatrix} 1 & 4 \\ 4 & 3 \end{pmatrix}$
  4. $\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$.
co-f-076 · level facile · notes
With ${\boldsymbol Q} = \begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix}$ and ${\boldsymbol x} = (x_1, x_2)'$, how is the quadratic function ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ written?
  1. $2x_1^2 + 2x_1x_2 + 3x_2^2$
  2. $2x_1^2 + x_1x_2 + 3x_2^2$
  3. $2x_1^2 + 4x_1x_2 + 3x_2^2$
  4. $4x_1^2 + 2x_1x_2 + 6x_2^2$
Explanation. $\sum_i \sum_j q_{ij} x_i x_j = 2x_1^2 + 1\cdot x_1x_2 + 1\cdot x_2x_1 + 3x_2^2$: both off-diagonal entries contribute to $x_1 x_2$.
co-f-077 · level facile · notes
What is the gradient of the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$, with ${\boldsymbol Q}$ symmetric?
  1. ${\boldsymbol Q}\,{\boldsymbol x}$
  2. $2\,{\boldsymbol Q}$
  3. ${\boldsymbol x}'{\boldsymbol Q}$
  4. $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.
co-f-078 · level facile · notes
What is the Hessian of $g({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} + {\boldsymbol c}'{\boldsymbol x} + d$, with ${\boldsymbol Q} \in \R^{n \times n}$ symmetric, ${\boldsymbol c} \in \R^n$ and $d \in \R$?
  1. $2\,{\boldsymbol Q}\,{\boldsymbol x} + {\boldsymbol c}$
  2. $2\,{\boldsymbol Q} + {\boldsymbol c}$
  3. $2\,{\boldsymbol Q}$
  4. ${\boldsymbol Q}$
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.
co-f-079 · level facile · notes
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}$?
  1. $\begin{pmatrix} 2 \\ -2 \end{pmatrix}$
  2. $\begin{pmatrix} 4 \\ -2 \end{pmatrix}$
  3. $\begin{pmatrix} 2 \\ -1 \end{pmatrix}$
  4. $\begin{pmatrix} 4 \\ 2 \end{pmatrix}$
Explanation. $\nabla f({\boldsymbol x}) = 2{\boldsymbol Q}{\boldsymbol x} = (4x_1 - 2x_2,\; -2x_1 + 4x_2)$, which at $(1,0)$ equals $(4,-2)$ (Example 4.5). $(2,-1) = {\boldsymbol Q}{\boldsymbol x}$ forgets the factor $2$.
co-f-080 · level facile · notes
When is a square symmetric matrix ${\boldsymbol Q} \in \R^{n \times n}$ positive semidefinite?
  1. when ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} \ge 0$ for every ${\boldsymbol x} \in \R^n$
  2. when all its entries are nonnegative
  3. when all its diagonal entries are nonnegative
  4. when ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} \ge 0$ for at least one ${\boldsymbol x} \ne {\boldsymbol 0}$
Explanation. Definition 4.5. Nonnegative entries or diagonal are not enough: ${\boldsymbol Q} = \begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix}$ gives $-2$ with ${\boldsymbol x} = (1,-1)$.
co-f-081 · level facile · notes
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$?
  1. yes: it is symmetric and its trace equals $0 \ge 0$
  2. yes: the first diagonal entry, $1$, is positive
  3. no: with ${\boldsymbol x} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$ we get ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = 0$, but $> 0$ is required
  4. 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.
co-f-082 · level facile · notes
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?
  1. the quadratic function is concave
  2. the quadratic function is convex only where $x_1 \ge x_2$
  3. ${\boldsymbol Q}$ is positive semidefinite and the quadratic function is convex
  4. ${\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.
co-f-083 · level facile · notes
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$?
  1. always, because the linear part is convex
  2. if and only if ${\boldsymbol Q}$ is positive semidefinite
  3. if and only if ${\boldsymbol c} = {\boldsymbol 0}$
  4. 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.
co-f-084 · level facile · notes
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$?
  1. circles for the first, hyperbolas for the second
  2. hyperbolas for the first, circles for the second
  3. circles for both
  4. 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.
co-f-085 · level facile · notes
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}$?
  1. $\begin{pmatrix} 3 & -4 \\ -4 & 1 \end{pmatrix}$
  2. $\begin{pmatrix} 3 & -4 \\ 0 & 1 \end{pmatrix}$
  3. $\begin{pmatrix} 3 & 2 \\ 2 & 1 \end{pmatrix}$
  4. $\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.
co-f-086 · level facile · notes
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$?
  1. yes: all the coefficients are positive, so the function is a sum of convex terms
  2. no: it is concave, because the mixed term $4x_1x_2$ dominates the two squares
  3. no: with ${\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$ it equals $-2 < 0$, so ${\boldsymbol Q}$ is not positive semidefinite
  4. 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$.
co-f-087 · level facile · notes
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}$?
  1. $2\,{\boldsymbol Q}$
  2. ${\boldsymbol c}$
  3. ${\boldsymbol 0}$
  4. $2\,{\boldsymbol c}$
Explanation. $\nabla g({\boldsymbol x}) = 2{\boldsymbol Q}{\boldsymbol x} + {\boldsymbol c}$, which at ${\boldsymbol 0}$ equals ${\boldsymbol c}$.
co-f-088 · level media · notes
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}$?
  1. ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = 6$, $\nabla f = \begin{pmatrix} 0 \\ 6 \end{pmatrix}$
  2. ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = 6$, $\nabla f = \begin{pmatrix} 0 \\ 3 \end{pmatrix}$
  3. ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = 3$, $\nabla f = \begin{pmatrix} 0 \\ 6 \end{pmatrix}$
  4. ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} = 10$, $\nabla f = \begin{pmatrix} 0 \\ 6 \end{pmatrix}$
Explanation. $2\cdot 1 - 2\cdot 1\cdot 2 + 2\cdot 4 = 6$; ${\boldsymbol Q}{\boldsymbol x} = (0, 3)$ and $\nabla f = 2{\boldsymbol Q}{\boldsymbol x} = (0, 6)$. Forgetting the mixed terms we would get $10$.
co-f-089 · level media · notes
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$?
  1. $\begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix}$
  2. $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$
  3. $\begin{pmatrix} 1 & 0 \\ 0 & -2 \end{pmatrix}$
  4. $\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$.
co-f-090 · level media · notes
At which point ${\boldsymbol x} \in \R^2$ does the gradient of the quadratic function $g({\boldsymbol x}) = x_1^2 + x_2^2 - 2x_1 + 4x_2 + 1$ vanish?
  1. $\begin{pmatrix} 2 \\ -4 \end{pmatrix}$
  2. $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$
  3. $\begin{pmatrix} 1 \\ -2 \end{pmatrix}$
  4. $\begin{pmatrix} -1 \\ 2 \end{pmatrix}$
Explanation. $\nabla g = 2{\boldsymbol Q}{\boldsymbol x} + {\boldsymbol c} = (2x_1 - 2,\; 2x_2 + 4) = {\boldsymbol 0}$ for $x_1 = 1$, $x_2 = -2$. Typical mistakes: sign of ${\boldsymbol c}$ ($(-1,2)$), factor $2$ forgotten ($(2,-4)$).
co-f-091 · level teorema · notes
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?
  1. if $f$ is convex, then ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} > 0$ for every ${\boldsymbol x} \ne {\boldsymbol 0}$
  2. $f$ is convex in $\R^n$ if and only if ${\boldsymbol Q}$ is positive semidefinite
  3. $f$ is convex in $\R^n$ if and only if all the entries of ${\boldsymbol Q}$ are nonnegative
  4. $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)$.
co-f-092 · level teorema · notes
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?
  1. $\nabla f({\boldsymbol x}) = 2\,{\boldsymbol Q}\,{\boldsymbol x}$ and $\nabla^2 f({\boldsymbol x}) = 2\,{\boldsymbol Q}$ at every point
  2. $\nabla f({\boldsymbol x}) = {\boldsymbol Q}\,{\boldsymbol x}$ and $\nabla^2 f({\boldsymbol x}) = {\boldsymbol Q}$ at every point
  3. $\nabla f({\boldsymbol x}) = 2\,{\boldsymbol Q}\,{\boldsymbol x}$ and $\nabla^2 f({\boldsymbol x}) = 2\,{\boldsymbol Q}\,{\boldsymbol x}$
  4. $\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.
co-f-093 · level teorema · notes
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?
  1. ${\boldsymbol Q}$ and ${\boldsymbol Q}'$ define different quadratic functions
  2. only symmetric matrices define quadratic functions
  3. $\tfrac{1}{2}({\boldsymbol Q} + {\boldsymbol Q}')$ defines the quadratic function of ${\boldsymbol Q}$ multiplied by $\frac{1}{2}$
  4. ${\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.
co-f-094 · level ipotesi · notes
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]$)?
  1. ${\boldsymbol Q}$ diagonal with nonnegative entries, so that $f$ is a sum of squares
  2. the triangle inequality for the Euclidean norm, with $\lambda \ge 0$ and $1 - \lambda \ge 0$
  3. 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$
  4. ${\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$.
co-f-095 · level ipotesi · notes
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?
  1. the hypothesis that ${\boldsymbol Q}$ has positive diagonal entries, with $\lambda = \frac{1}{2}$
  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}$
  3. the convexity inequality with $\lambda = 0$, without divisions, and the choice ${\boldsymbol p} = {\boldsymbol x}$, ${\boldsymbol w} = {\boldsymbol 0}$
  4. 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.
co-f-096 · level ipotesi · notes
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?
  1. ${\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
  2. the hypothesis ${\boldsymbol c} = {\boldsymbol 0}$ and $d = 0$, which reduces $g$ to ${\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x}$ without loss of generality
  3. the fact that the Hessian of $g$ is zero, because $g$ is quadratic
  4. 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.
co-f-097 · level facile · notes
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. $1$
  2. $\sqrt{2}$
  3. $4$
  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$.
co-f-098 · level facile · notes
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$?
  1. hyperbolas centered at the origin
  2. pairs of parallel lines
  3. ellipses centered at the origin
  4. 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.
co-f-167 · level facile · notes
Which function is a quadratic function $f({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}{\boldsymbol x}$ with symmetric ${\boldsymbol Q}$?
  1. $x_1^2 + 1$
  2. $3x_1^2 - 4x_1x_2 + x_2^2$
  3. $3x_1^2 + x_2$
  4. $x_1 x_2 x_3$
Explanation. Only degree-two terms: ${\boldsymbol Q} = \begin{pmatrix} 3 & -2 \\ -2 & 1 \end{pmatrix}$.
co-f-168 · level teorema · notes
Which statement about $f({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}{\boldsymbol x}$ is correct?
  1. $f({\boldsymbol 0}) = 0$ and $f(t{\boldsymbol x}) = t^2 f({\boldsymbol x})$
  2. $f$ is linear
  3. $f({\boldsymbol x}) \ge 0$ for every ${\boldsymbol Q}$
  4. $f(t{\boldsymbol x}) = t f({\boldsymbol x})$
Explanation. It is homogeneous of degree two.
co-f-169 · level facile · notes
The symmetric matrix ${\boldsymbol Q} = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$ is:
  1. positive definite
  2. negative definite
  3. indefinite
  4. positive semidefinite
Explanation. ${\boldsymbol x}'{\boldsymbol Q}{\boldsymbol x} = (x_1 + x_2)^2 \ge 0$, zero for $(1, -1)'$.
co-f-170 · level ipotesi · notes
To conclude that a symmetric ${\boldsymbol Q}$ is not positive semidefinite, what suffices?
  1. $\det({\boldsymbol Q}) = 0$
  2. A zero diagonal entry
  3. Some ${\boldsymbol x}$ with ${\boldsymbol x}'{\boldsymbol Q}{\boldsymbol x} < 0$
  4. A negative off-diagonal entry
Explanation. The definition asks ${\boldsymbol x}'{\boldsymbol Q}{\boldsymbol x} \ge 0$ for every ${\boldsymbol x}$.
co-f-171 · level facile · notes
The function $f({\boldsymbol x}) = 2x_1^2 + x_2^2$ is convex because:
  1. it is a sum of two variables
  2. ${\boldsymbol Q} = \mathrm{diag}(2, 1)$ is positive semidefinite
  3. the coefficients are integer
  4. $f({\boldsymbol 0}) = 0$
Explanation. Quadratic with positive semidefinite ${\boldsymbol Q}$ $\Rightarrow$ convex.
co-f-172 · level teorema · notes
What does the proposition on convexity of quadratic functions $f({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}{\boldsymbol x}$ state?
  1. If ${\boldsymbol Q}$ is positive semidefinite, $f$ is convex on $\R^n$
  2. If ${\boldsymbol Q}$ has positive entries, $f$ is convex
  3. $f$ is always convex
  4. $f$ is convex only if ${\boldsymbol Q}$ is diagonal
Explanation. The converse also holds (next proposition).
co-f-173 · level ipotesi · notes
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?
  1. ${\boldsymbol p} = {\boldsymbol w}$
  2. Invertible ${\boldsymbol Q}$
  3. $\lambda > 1$
  4. Positive semidefinite ${\boldsymbol Q}$
Explanation. The factor $\lambda(1-\lambda)$ is nonnegative and so is the quadratic form.
co-f-174 · level facile · notes
Which quadratic function is concave on $\R^2$?
  1. $x_1^2 + x_2^2$
  2. $x_1 x_2$
  3. $-x_1^2 - 3x_2^2$
  4. $x_1^2 - x_2^2$
Explanation. ${\boldsymbol Q} = \mathrm{diag}(-1, -3)$ is negative semidefinite.
co-f-308 · level facile · notes
With ${\boldsymbol Q} = \begin{pmatrix} 1 & 0 \\ 0 & -2 \end{pmatrix}$, how is the quadratic function ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ written?
  1. $x_1^2 - 2x_2^2$
  2. $x_1^2 + 2x_2^2$
  3. $x_1 - 2x_2$
  4. $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.
co-f-309 · level facile · notes
Which symmetric matrix ${\boldsymbol Q}$ gives $f({\boldsymbol x}) = x_1^2 + 2x_2 x_3 + 3x_3^2$, with ${\boldsymbol x} \in \R^3$, in the form ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$?
  1. $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 2 \\ 0 & 2 & 3 \end{pmatrix}$
  2. $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{pmatrix}$
  3. $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 2 & 3 \end{pmatrix}$
  4. $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 3 \end{pmatrix}$
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.
co-f-310 · level facile · notes
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}$?
  1. $0$
  2. $4$
  3. $2$
  4. $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.
co-f-311 · level facile · notes
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}$?
  1. $\begin{pmatrix} 2 \\ 6 \end{pmatrix}$
  2. $\begin{pmatrix} 6 \\ 2 \end{pmatrix}$
  3. $\begin{pmatrix} 3 \\ 1 \end{pmatrix}$
  4. $\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.
co-f-312 · level facile · notes
What is the Hessian matrix of the quadratic function $f({\boldsymbol x}) = 3x_1^2 - 2x_1 x_2 + x_2^2$?
  1. $\begin{pmatrix} 6 & -2 \\ -2 & 2 \end{pmatrix}$
  2. $\begin{pmatrix} 3 & -1 \\ -1 & 1 \end{pmatrix}$
  3. $\begin{pmatrix} 6 & -2 \\ -2 & 1 \end{pmatrix}$
  4. $\begin{pmatrix} 3 & -2 \\ -2 & 1 \end{pmatrix}$
Explanation. The symmetric matrix is ${\boldsymbol Q} = \begin{pmatrix} 3 & -1 \\ -1 & 1 \end{pmatrix}$ and the Hessian is $2{\boldsymbol Q}$, constant. Giving ${\boldsymbol Q}$ forgets the factor $2$.
co-f-313 · level facile · notes
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 \}$?
  1. $8$
  2. $4$
  3. $64$
  4. $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.
co-f-314 · level facile · notes
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$?
  1. a plane through the origin
  2. a sphere centered at the origin
  3. a paraboloid with vertex at the origin
  4. 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$.
co-f-315 · level facile · notes
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?
  1. only in dimension $n = 1$
  2. yes: ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = 0 \ge 0$ for every ${\boldsymbol x}$
  3. no: it has no positive entries
  4. 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.
co-f-316 · level facile · notes
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?
  1. yes: $f = (x_1 + x_2)^2$ and ${\boldsymbol Q}$ is positive semidefinite
  2. no: the mixed term $2x_1x_2$ makes it nonconvex
  3. no: the matrix ${\boldsymbol Q}$ is not invertible
  4. 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.
co-f-317 · level facile · notes
What is the Hessian matrix of $g({\boldsymbol x}) = 2x_1^2 + x_2^2 + 4x_1 - 3$?
  1. $\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}$
  2. $\begin{pmatrix} 4 & 4 \\ 0 & 2 \end{pmatrix}$
  3. $\begin{pmatrix} 8 & 0 \\ 0 & 2 \end{pmatrix}$
  4. $\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}$.
co-f-318 · level ipotesi · notes
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?
  1. by looking at the diagonal of ${\boldsymbol Q}$, which is positive
  2. with the transpose $\begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix}$, which is symmetric
  3. with the equivalent symmetric matrix $\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$
  4. 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.
co-f-319 · level ipotesi · notes
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}$.
  1. no: the off-diagonal entries must be zero
  2. no: with ${\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$ we get ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} = -3$
  3. yes: a positive diagonal is always enough
  4. yes, at least for $2 \times 2$ matrices
Explanation. $x_1^2 + 6x_1x_2 + 2x_2^2$ at $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$ equals $1 - 6 + 2 = -3 < 0$. Nonzero off-diagonal entries are allowed: $\begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}$ is positive semidefinite.
co-f-320 · level ipotesi · notes
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?
  1. no: with ${\boldsymbol x} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$ it equals $-2$
  2. yes: the check for ${\boldsymbol x} \ge {\boldsymbol 0}$ is enough
  3. yes: ${\boldsymbol Q}$ is symmetric
  4. 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).
co-f-321 · level ipotesi · notes
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$?
  1. that ${\boldsymbol p} \ne {\boldsymbol w}$, two distinct points
  2. that ${\boldsymbol Q}$ is also invertible
  3. that ${\boldsymbol p}, {\boldsymbol w} \ge {\boldsymbol 0}$ componentwise
  4. 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.
co-f-322 · level ipotesi · notes
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?
  1. yes, because ${\boldsymbol Q}$ is positive semidefinite
  2. no, because the matrix ${\boldsymbol Q}$ is not symmetric
  3. no: ${\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ equals $0$ at ${\boldsymbol 0}$, while $g({\boldsymbol 0}) = 1$
  4. 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$.
co-f-323 · level teorema · notes
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?
  1. no quadratic function is concave
  2. $f$ is concave if and only if $-{\boldsymbol Q}$ is positive semidefinite
  3. $f$ is concave if and only if ${\boldsymbol Q}$ is positive semidefinite
  4. $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.
co-f-337 · level teorema · notes
For every symmetric matrix ${\boldsymbol Q}$, which statement on the quadratic function $f({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x}$ is correct?
  1. if $f$ is convex, then every entry of ${\boldsymbol Q}$ is $\ge 0$
  2. if every entry of ${\boldsymbol Q}$ is $\ge 0$, then $f$ is convex
  3. if $f$ is convex, then ${\boldsymbol Q}$ is invertible
  4. 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.
co-f-338 · level teorema · notes
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?
  1. $g$ is convex if and only if ${\boldsymbol Q}$ is positive semidefinite and $d \ge 0$
  2. $g$ is convex if and only if ${\boldsymbol c}'{\boldsymbol x} + d \ge 0$ for every ${\boldsymbol x}$
  3. $g$ is convex if and only if ${\boldsymbol Q}$ is positive semidefinite, for every ${\boldsymbol c}$ and $d$
  4. $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}$.
co-f-339 · level teorema · notes
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?
  1. the off-diagonal entries are zero
  2. every diagonal entry $q_{ii}$ is $\ge 0$
  3. every entry $q_{ij}$ is $\ge 0$
  4. ${\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.
co-f-389 · level facile · notes
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}$?
  1. $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$
  2. $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$
  3. $\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}$
  4. $\begin{pmatrix} 1 \\ 1 \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$.
co-f-390 · level facile · notes
What shape does the graph of the nonconvex quadratic function $f({\boldsymbol x}) = x_1^2 - x_2^2$ have?
  1. a paraboloid opening downward
  2. a cone with vertex at the origin
  3. a saddle surface
  4. 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.
co-f-391 · level facile · notes
Completing the square, how is $g({\boldsymbol x}) = x_1^2 + x_2^2 - 2x_1$ written?
  1. $(x_1 - 1)^2 + x_2^2 + 1$
  2. $(x_1 - 1)^2 + x_2^2 - 1$
  3. $(x_1 - 2)^2 + x_2^2 - 4$
  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}$.
co-f-392 · level facile · notes
What does $g({\boldsymbol x}) = {\boldsymbol x}'{\boldsymbol Q}\,{\boldsymbol x} + {\boldsymbol c}'{\boldsymbol x} + d$ become if ${\boldsymbol Q}$ is the zero matrix?
  1. linear plus constant: convex and concave
  2. a nonconvex quadratic function
  3. a convex but not concave function
  4. 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.
co-f-393 · level facile · notes
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}$?
  1. the matrix $2{\boldsymbol Q}$
  2. the vector of the diagonal entries of ${\boldsymbol Q}$
  3. it depends on the matrix ${\boldsymbol Q}$
  4. 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.

Part: Optimization problems (171)

5. Optimization problems (91)

co-f-099 · level facile · notes
In an optimization problem with feasible region $F$ and objective function $f$, what is a point ${\boldsymbol x} \in F$ called?
  1. optimal value
  2. feasible solution
  3. optimal solution
  4. 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.
co-f-100 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 4$
  2. $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 1$
  3. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 0$
  4. $\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.
co-f-101 · level facile · notes
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)$?
  1. infeasible, with $z(P)$ not defined
  2. with an unattainable infimum, with $z(P) = 0$
  3. unbounded, with $z(P) = +\infty$
  4. 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$.
co-f-102 · level facile · notes
What can be said about the problem $P$: $\min\{\, \frac{1}{x} \ \text{subject to}\ x > 0 \,\}$, with optimal value denoted by $z(P)$?
  1. it is unbounded, with $z(P) = -\infty$
  2. it is infeasible
  3. it has an unattainable infimum $0$: there is no optimal solution and $z(P)$ is not defined
  4. $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).
co-f-103 · level facile · notes
What can be said about the problem $P$: $\min\{\, x \ \text{subject to}\ x^2 \le -4 \,\}$, with feasible region $F$ and optimal value $z(P)$?
  1. it has an unattainable infimum
  2. it is infeasible: $F = \emptyset$ and $z(P)$ is not defined
  3. it is unbounded, with $z(P) = -\infty$
  4. $z(P) = -2$
Explanation. $x^2 \ge 0 > -4$ for every $x$: no point satisfies the constraint (Example 5.4).
co-f-104 · level facile · notes
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?
  1. the upper bound $z(P) \le f(\bar{\boldsymbol x})$
  2. the lower bound $f(\bar{\boldsymbol x}) \le z(P)$
  3. the optimal value $z(P) = f(\bar{\boldsymbol x})$
  4. 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.
co-f-105 · level facile · notes
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?
  1. $z(P) \le 7$
  2. $3 \le z(P)$
  3. $z(P) = 3$
  4. $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.
co-f-106 · level facile · notes
What is the optimal value of the problem $P$: $\min\{\, x^2 + 5 \ \text{subject to}\ -2 \le x \le 3 \,\}$?
  1. $0$
  2. $9$
  3. $5$
  4. $14$
Explanation. $\min\{a + f\} = a + \min\{f\}$ and the minimum of $x^2$ over $[-2,3]$ is $0$, at $x = 0$. $14 = 9 + 5$ is the maximum.
co-f-107 · level facile · notes
What is the optimal value of the problem $P$: $\min\{\, -3x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$?
  1. $12$
  2. $-12$
  3. $0$
  4. $-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$.
co-f-108 · level facile · notes
Which equality holds for every objective function $f$ and feasible region $F$ (optima taken over ${\boldsymbol x} \in F$, when they exist)?
  1. $\min\{f({\boldsymbol x})\} = -\max\{-f({\boldsymbol x})\}$
  2. $\min\{f({\boldsymbol x})\} = \max\{-f({\boldsymbol x})\}$
  3. $\min\{f({\boldsymbol x})\} = -\min\{-f({\boldsymbol x})\}$
  4. $\max\{f({\boldsymbol x})\} = \max\{-f({\boldsymbol x})\}$
Explanation. Property (5.1): a point minimizes $f$ over $F$ if and only if it maximizes $-f$, and the values change sign.
co-f-109 · level facile · notes
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?
  1. $\begin{pmatrix} 3 \\ 1 \end{pmatrix}$
  2. $\begin{pmatrix} -1 \\ -1 \end{pmatrix}$
  3. $\begin{pmatrix} 1 \\ \frac{7}{2} \end{pmatrix}$
  4. $\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}$.
co-f-110 · level facile · notes
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$?
  1. if $f(\bar{\boldsymbol x}) < f({\boldsymbol x})$ for every ${\boldsymbol x} \in D$ different from $\bar{\boldsymbol x}$
  2. if the derivative of $f$ vanishes at $\bar{\boldsymbol x}$
  3. 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$
  4. 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.
co-f-111 · level facile · notes
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?
  1. the set of all the feasible solutions
  2. the set of all the optimal solutions (empty if none exists)
  3. the optimal value $z(P)$
  4. 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.
co-f-112 · level media · notes
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?
  1. $x = 2$
  2. $x = -2$
  3. $x = 4$
  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).
co-f-113 · level media · notes
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?
  1. in minimization form $\tilde{\boldsymbol x}(P) = (0)$ and $z(P) = 0$; in maximization form $\tilde{\boldsymbol x}(P) = (1)$ and $z(P) = 1$
  2. in minimization form the problem is unbounded; in maximization form $z(P) = 1$
  3. in both forms the extremum is not attained
  4. 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).
co-f-114 · level media · notes
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$?
  1. $\argmin = [-1,1]$ and $\argmax = \{3\}$
  2. $\argmin = \{0\}$ and $\argmax = \{-3, 3\}$
  3. $\argmin = [-1,1]$ and $\argmax = \{-3, 3\}$
  4. $\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.
co-f-115 · level teorema · notes
On the points of local minimum and of (global) minimum of a function $f : D \subseteq \R^n \to \R$, which statement is correct?
  1. a point of local minimum cannot be a point of (global) minimum
  2. every point of (global) minimum is a point of local minimum, but the converse does not always hold
  3. every point of local minimum is a point of (global) minimum
  4. 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.
co-f-116 · level teorema · notes
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?
  1. $\min\{a\, f({\boldsymbol x})\} = a\, \max\{f({\boldsymbol x})\}$
  2. $\min\{a\, f({\boldsymbol x})\} = a\, \min\{f({\boldsymbol x})\}$
  3. $\min\{a\, f({\boldsymbol x})\} = -a\, \max\{f({\boldsymbol x})\}$
  4. $\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$.
co-f-117 · level teorema · notes
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?
  1. $z(P) \le f(\bar{\boldsymbol x})$: it is an upper bound
  2. $f(\bar{\boldsymbol x}) = z(P)$
  3. $f(\bar{\boldsymbol x}) \ge z(P)$ only if $\bar{\boldsymbol x}$ is a point of local maximum
  4. $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.
co-f-118 · level ipotesi · notes
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?
  1. checking that the derivative vanishes at $\bar{\boldsymbol x}$
  2. checking that $f$ is convex
  3. exhibiting one radius $\delta > 0$ for which $f(\bar{\boldsymbol x}) \le f({\boldsymbol x})$ in $N(\bar{\boldsymbol x}, \delta) \cap D$
  4. 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.
co-f-119 · level ipotesi · notes
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?
  1. the fact that $f$ is convex and $F$ is an interval
  2. for every $x \in F$ the point $\frac{x}{2}$ is feasible and $f(\frac{x}{2}) < f(x)$
  3. the continuity of $f$ over $F$, which has no isolated points
  4. 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.
co-f-120 · level ipotesi · notes
To prove that the problem $P$: $\max\{\, (x-2)^2 \ \text{subject to}\ x \in \R \,\}$ is unbounded, what is needed?
  1. for every $M \ge 0$ a feasible solution with value greater than $M$, for instance $x = M + 3$
  2. that $f$ is convex, and hence increases moving away from the vertex $x = 2$
  3. that the derivative $2(x-2)$ vanishes at no point $x \ne 2$
  4. 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.
co-f-121 · level facile · notes
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?
  1. a point $\tilde{\boldsymbol x}(P) \in D$ with $f(\tilde{\boldsymbol x}(P)) \le f({\boldsymbol x})$ for every ${\boldsymbol x} \in D$
  2. a point $\tilde{\boldsymbol x}(P) \in F$ with $f(\tilde{\boldsymbol x}(P)) \le f({\boldsymbol x})$ for some ${\boldsymbol x} \in F$
  3. a point $\tilde{\boldsymbol x}(P) \in F$ with $f(\tilde{\boldsymbol x}(P)) \le 0$, that is, of nonpositive value
  4. 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$.
co-f-122 · level facile · notes
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 \,\}$?
  1. $4$
  2. $0$
  3. $-6$
  4. $-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$).
co-f-123 · level ipotesi · notes
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?
  1. the vanishing of the gradient of $f$ at ${\boldsymbol 0}$, which alone guarantees the local minimum
  2. 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$
  3. the convexity of $f$ in the whole $\R^2$, which makes every point with zero gradient a minimum
  4. 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.
co-f-175 · level facile · notes
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?
  1. The maximum of $f$ over $F$
  2. A point of $F$ of minimum value on $F$
  3. The point of $\R^n$ where $f$ is minimal
  4. Any point of $F$
Explanation. The solution must lie in the feasible region.
co-f-176 · level facile · notes
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?
  1. $\tilde x(P) = 1$, with $z(P) = 4$
  2. $\tilde x(P) = 3$, with $z(P) = 0$
  3. $\tilde x(P) = 0$, with $z(P) = 9$
  4. It does not exist
Explanation. On $[0,1]$ the function decreases: the minimum is at $1$; the point $3$ is not feasible.
co-f-177 · level facile · notes
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)$?
  1. They are the same thing
  2. $z(P)$ is a point, $\tilde{\boldsymbol x}(P)$ a number
  3. $z(P)$ is the value of any point of $F$
  4. A point and its value $f(\tilde{\boldsymbol x}(P))$
Explanation. Optimal solution and optimal value.
co-f-178 · level teorema · notes
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?
  1. An optimal solution always exists
  2. The optimal value depends on the chosen optimal solution
  3. Unique optimal value, possibly many solutions
  4. The optimal solution is always unique
Explanation. All optimal solutions share the same value.
co-f-179 · level facile · notes
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)$?
  1. Nothing
  2. $z(P) \le 7$
  3. $z(P) \ge 7$
  4. $z(P) = 7$
Explanation. In a minimization problem a feasible solution gives an upper bound.
co-f-180 · level facile · notes
For $f(x) = x^2 - 2x$ on $D = \R$, what are the global minimum point and the minimum?
  1. $\tilde x = 1$, minimum $-1$
  2. $\tilde x = 0$, minimum $0$
  3. $\tilde x = 2$, minimum $0$
  4. $\tilde x = -1$, minimum $3$
Explanation. $f(x) = (x - 1)^2 - 1$.
co-f-181 · level teorema · notes
Which statement about global and local minimum points of $f$ in $D$ is correct?
  1. Every local minimum point is global
  2. A global minimum point is unique
  3. A local minimum never exists on $\R$
  4. Every global minimum is also local
Explanation. The converse holds for convex functions.
co-f-182 · level facile · notes
What is the neighbourhood $N(\bar{\boldsymbol x}, \delta)$ of radius $\delta > 0$?
  1. The segment from ${\boldsymbol 0}$ to $\bar{\boldsymbol x}$
  2. The set $\{\bar{\boldsymbol x}\}$
  3. The set of points at Euclidean distance less than $\delta$ from $\bar{\boldsymbol x}$
  4. The set of points with integer coordinates close to $\bar{\boldsymbol x}$
Explanation. $N(\bar{\boldsymbol x}, \delta) = \{{\boldsymbol x} : \|{\boldsymbol x} - \bar{\boldsymbol x}\|_2 < \delta\}$.
co-f-183 · level facile · notes
When is $\bar{\boldsymbol x} \in F$ a local minimum point of $f$ in $F$?
  1. If $f(\bar{\boldsymbol x}) = 0$
  2. If minimal on $F \cap N(\bar{\boldsymbol x}, \delta)$ for some $\delta > 0$
  3. If $f(\bar{\boldsymbol x}) \le f({\boldsymbol x})$ for every ${\boldsymbol x} \in F$
  4. If $\nabla f(\bar{\boldsymbol x}) = {\boldsymbol 0}$
Explanation. The comparison is only with nearby feasible points.
co-f-184 · level facile · notes
For $f(x) = x^3 - 3x$ on $F = \R$, the point $x = 1$ is:
  1. a local, not global, minimum point
  2. a global minimum point
  3. a local maximum point
  4. neither a local minimum nor maximum
Explanation. $f'(1) = 0$, $f''(1) = 6 > 0$; but $f \to -\infty$ as $x \to -\infty$.
co-f-185 · level ipotesi · notes
To prove that $\bar x = 0$ is a local minimum point of $f(x) = x^2$ on $F = [-1, 1]$, what is it enough to show?
  1. $f(0) \le f(x)$ for every $x \in \R$
  2. $f'(0) \ne 0$
  3. $F$ unbounded
  4. $f(0) \le f(x)$ near $0$, in $F$
Explanation. A neighbourhood suffices; here it even holds on all of $F$.
co-f-186 · level teorema · notes
Which relation links a minimization and a maximization problem on the same region $F$?
  1. $\min_F f = -\min_F (-f)$
  2. $\min_F f = \frac{1}{\max_F f}$
  3. $\min_F f = -\max_F (-f)$
  4. $\min_F f = \max_F f$
Explanation. Changing the sign of the objective swaps minimum and maximum.
co-f-187 · level ipotesi · notes
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$?
  1. No: $z(P) \ge 5$ holds
  2. No: it is infeasible
  3. Yes, always
  4. Yes, if $f$ is convex
Explanation. Only feasible solutions give upper bounds.
co-f-188 · level facile · notes
Does the problem $\min\{e^{-x} : x \ge 0\}$ have an optimal solution?
  1. No: $0$ is not attained
  2. Yes: $x = 0$
  3. Yes: $x = 1$
  4. It is infeasible
Explanation. $e^{-x} > 0$ approaches $0$ without reaching it.
co-f-189 · level teorema · notes
Which statement about neighbourhoods $N(\bar{\boldsymbol x}, \delta)$ is correct?
  1. A neighbourhood always contains the origin
  2. A neighbourhood is a finite set
  3. $N(\bar{\boldsymbol x}, \delta)$ does not contain $\bar{\boldsymbol x}$
  4. If $\delta_1 < \delta_2$, then $N(\bar{\boldsymbol x}, \delta_1) \subseteq N(\bar{\boldsymbol x}, \delta_2)$
Explanation. Smaller neighbourhoods are contained in larger ones.
co-f-190 · level ipotesi · notes
To conclude that $\tilde x = 0$ is a global minimum point of $f(x) = |x|$ on $\R$, what suffices?
  1. $f$ differentiable at $0$
  2. $f$ bounded
  3. $|x| \ge 0 = f(0)$ for every $x$
  4. $f'(0) = 0$
Explanation. $|x|$ is not differentiable at $0$, but the definition suffices.
co-f-209 · level facile · notes
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?
  1. no: $f(4) = 3 > 2 = f(3)$
  2. no: the derivative of $f$ does not vanish at $x = 3$
  3. yes, but only as a solution in minimization form
  4. 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.
co-f-210 · level facile · notes
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?
  1. optimal value and optimal solution
  2. level set and active constraint
  3. objective function and feasible region
  4. 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.
co-f-211 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
  2. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 0$
  3. $\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = -3$
  4. $\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.
co-f-212 · level facile · notes
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?
  1. the empty set
  2. the value $+\infty$
  3. the supremum of $f$ over $F$
  4. 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.
co-f-213 · level facile · notes
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?
  1. computing only the optimal value $z(P)$
  2. listing all the points of the region $F$
  3. proving that the region $F$ is convex
  4. 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.
co-f-214 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 4$
  2. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
  3. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 0$
  4. $\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.
co-f-215 · level facile · notes
How many optimal solutions does the problem $P$: $\min\{\, \max\{0,\; x - 2\} \ \text{subject to}\ 0 \le x \le 5 \,\}$ have?
  1. none, because the minimum is not unique
  2. infinitely many: every $x \in [0, 2]$
  3. only one: the point $x = 2$
  4. 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.
co-f-216 · level facile · notes
What can be said of the problem $P$: $\min\{\, -x^2 \ \text{subject to}\ x \in \R \,\}$, with optimal value $z(P)$?
  1. it is unbounded, with $z(P) = -\infty$
  2. it has optimal solution $x = 0$, with $z(P) = 0$
  3. it is infeasible and $z(P)$ is not defined
  4. 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$.
co-f-217 · level facile · notes
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)$?
  1. it is unbounded: $z(P) = +\infty$, no optimal solution
  2. it has optimal value $z(P) = 1$, on the line $x_1 + x_2 = 1$
  3. it has optimal value $z(P) = 3$, on the line $x_1 + x_2 = 3$
  4. 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.
co-f-218 · level facile · notes
What can be said of the problem $P$: $\max\{\, x^2 \ \text{subject to}\ -1 \le x < 2 \,\}$, with optimal value $z(P)$?
  1. it has optimal solution $x = -1$, with value $z(P) = 1$
  2. it is unbounded, with optimal value $z(P) = +\infty$
  3. it has an unattainable supremum $4$
  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.
co-f-219 · level facile · notes
For which three reasons can an optimization problem have no optimal solution?
  1. the function is not differentiable, not continuous, or not linear
  2. it is unbounded, it is infeasible, or the bound is not attained
  3. it is unbounded, it is infeasible, or it has several optimal solutions
  4. 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.
co-f-220 · level facile · notes
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?
  1. minimum point and minimum of $f$ over $F$
  2. stationary point and critical value of $f$
  3. local minimum and infimum of $f$
  4. 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$.
co-f-221 · level facile · notes
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?
  1. $\bar{\boldsymbol x}$ is not feasible
  2. the problem is unbounded
  3. $\bar{\boldsymbol x}$ is only a local minimum point
  4. $\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).
co-f-222 · level facile · 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?
  1. the upper bound $z(P) \le \frac{1}{2}$
  2. the optimal value $z(P) = \frac{1}{4}$
  3. the upper bound $z(P) \le \frac{1}{4}$
  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$.
co-f-223 · level ipotesi · notes
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})$?
  1. that $\bar{\boldsymbol x}$ is a local minimum point
  2. that $\bar{\boldsymbol x}$ is feasible, that is, $\bar{\boldsymbol x} \in F$
  3. that $\bar{\boldsymbol x}$ is an optimal solution
  4. 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)$.
co-f-224 · level facile · notes
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 \,\}$?
  1. optimal solution $\bar{\boldsymbol x}$, optimal value $5$
  2. optimal solution $\bar{\boldsymbol x}$, optimal value $-2$
  3. optimal solution $\bar{\boldsymbol x}$, optimal value $-14$
  4. 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.
co-f-225 · level facile · notes
Given an objective function $f$ over a feasible region $F$, when does a point of $F$ minimize $f$ over $F$?
  1. if and only if it minimizes $-f$ over $F$
  2. if and only if it maximizes $f$ over $F$
  3. if and only if $f$ is zero there
  4. if and only if it maximizes $-f$ over $F$
Explanation. From $\min\{f\} = -\max\{-f\}$: changing sign swaps minimum and maximum, and the optimal solutions are the same.
co-f-226 · level facile · notes
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 \,\}$?
  1. $\bar{\boldsymbol x}$, with optimal value $6$
  2. $\hat{\boldsymbol x}$, with optimal value $-2$
  3. $\bar{\boldsymbol x}$, with optimal value $-6$
  4. $\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}$.
co-f-227 · level facile · notes
What happens if the objective function $f$ of a minimization problem over a region $F$ is multiplied by a constant $a > 0$?
  1. every minimum point becomes a maximum point
  2. the optimal value is multiplied by $a$, the solutions stay the same
  3. the optimal solutions change, the optimal value stays the same
  4. 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$.
co-f-228 · level facile · notes
For $f(x) = |x - 2|$ on the domain $D = [0, 5]$, what are the (global) maximum point and the maximum of $f$ in $D$?
  1. $\tilde x = 5$, maximum $3$
  2. $\tilde x = 0$, maximum $2$
  3. $\tilde x = 2$, maximum $0$
  4. $\tilde x = 5$, maximum $5$
Explanation. $|x - 2|$ is the distance from $2$: in $[0,5]$ the farthest point is $5$, with $f(5) = 3 > 2 = f(0)$. The point $2$ is the minimum point.
co-f-229 · level facile · notes
What else is a (global) minimum point $\tilde{\boldsymbol x}$ of a function $f : D \subseteq \R^n \to \R$ in $D$ called?
  1. maximizer of $f$ in $D$
  2. stationary point of $f$
  3. infimum of $f$ in $D$
  4. minimizer of $f$ in $D$
Explanation. The notes call a minimum point a minimizer (and a maximum point a maximizer). The infimum is a value, not a point.
co-f-230 · level facile · notes
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$?
  1. the interval $(1, 5]$
  2. the open interval $(3, 5)$
  3. the open interval $(1, 5)$
  4. 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.
co-f-231 · level facile · notes
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}$?
  1. no: its distance from the center is $2$
  2. no: its distance from the center is exactly $1$
  3. yes: its distance from the center is $1 \le 1$
  4. 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).
co-f-232 · level facile · notes
How many local minimum points can a function $f : D \subseteq \R^n \to \R$ have in $D$?
  1. even infinitely many
  2. at most one
  3. at most two
  4. 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.
co-f-233 · level facile · notes
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?
  1. because $f$ is unbounded above
  2. because the gradient does not vanish at ${\boldsymbol 0}$
  3. because $f\left(\begin{pmatrix} 1 \\ 1 \end{pmatrix}\right) = 0$
  4. 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}$.
co-f-234 · level facile · notes
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?
  1. $x = \frac{1}{8}$, maximum $\frac{289}{64}$
  2. $x = 2$, maximum $1$
  3. $x = 4$, maximum $5$
  4. $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.
co-f-235 · level teorema · notes
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?
  1. $f$ is constant on the whole neighborhood $N(\bar{\boldsymbol x}, \delta) \cap D$
  2. the same inequality holds with every radius smaller than $\delta$
  3. the same inequality holds with every radius larger than $\delta$
  4. $\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.
co-f-236 · level teorema · notes
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?
  1. $\max\{a\, f({\boldsymbol x})\} = a\, \max\{f({\boldsymbol x})\}$
  2. $\max\{a\, f({\boldsymbol x})\} = a\, \min\{f({\boldsymbol x})\}$
  3. $\min\{a\, f({\boldsymbol x})\} = -a\, \max\{f({\boldsymbol x})\}$
  4. $\min\{a + f({\boldsymbol x})\} = a\, \min\{f({\boldsymbol x})\}$
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.
co-f-237 · level teorema · notes
On the optimal value $z(P)$ of an optimization problem $P$ with feasible region $F$, which statement is correct?
  1. if $F = \emptyset$ it is $+\infty$; if $P$ is a minimization and unbounded it is $-\infty$
  2. if the infimum is not attained, $z(P)$ is the infimum
  3. if $F$ is bounded, $z(P)$ is always defined
  4. 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$.
co-f-340 · level teorema · notes
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?
  1. the (global) minimum points of $f$ in $F$
  2. the local minimum points of $f$ in $F$
  3. the points of $F$ where the gradient of $f$ vanishes
  4. 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.
co-f-341 · level teorema · notes
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?
  1. $\max\{a\, f({\boldsymbol x})\} = a\, \max\{f({\boldsymbol x})\}$
  2. $\max\{a\, f({\boldsymbol x})\} = -a\, \min\{f({\boldsymbol x})\}$
  3. $\max\{a\, f({\boldsymbol x})\} = \min\{f({\boldsymbol x})\} - a$
  4. $\max\{a\, f({\boldsymbol x})\} = a\, \min\{f({\boldsymbol x})\}$
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\}$).
co-f-342 · level facile · notes
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$?
  1. that the supremum is attained at infinity
  2. that the optimal solution is the point $x = +\infty$
  3. that the problem is unbounded: $f$ grows indefinitely over $F$
  4. 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.
co-f-343 · level facile · notes
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)?
  1. it has an unattainable infimum $0$
  2. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 0$
  3. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 4$
  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.
co-f-344 · level facile · notes
What can be said of the problem $P$: $\max\{\, \frac{1}{x} \ \text{subject to}\ x > 0 \,\}$, with optimal value $z(P)$?
  1. it is unbounded, with $z(P) = +\infty$
  2. it has a supremum not attained at $x = 0$
  3. it has optimal solution $x = 1$, with $z(P) = 1$
  4. 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.
co-f-345 · level facile · notes
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)?
  1. it does not exist: the supremum $1$ is not attained
  2. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 0$
  3. it is unbounded, with $z(P) = +\infty$
  4. $\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.
co-f-346 · level facile · notes
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$?
  1. $F = D$: the feasible region is the domain
  2. $F \cap D = \emptyset$: the two sets are disjoint
  3. $F \subseteq D$: $f$ is defined at every feasible point
  4. $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.
co-f-347 · level facile · notes
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)$?
  1. $\bar{\boldsymbol x}$ is optimal only if $f(\bar{\boldsymbol x}) = 0$
  2. $\tilde{\boldsymbol x}(P) = \bar{\boldsymbol x}$ and $z(P) = f(\bar{\boldsymbol x})$, in minimization and maximization form
  3. they do not exist, because there are no other points to compare
  4. 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.
co-f-348 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = -1$
  2. $\tilde{\boldsymbol x}(P) = (5)$, $z(P) = -6$
  3. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 1$
  4. $\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.
co-f-349 · level facile · notes
For $f(x) = |x|$ on the domain $D = [-1, 2]$, what is the point $x = 2$?
  1. only a local maximum point, not a global one
  2. a local minimum point of $f$ in $D$
  3. neither, because it is an endpoint of $D$
  4. 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.
co-f-350 · level facile · notes
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$?
  1. no: an endpoint of the domain cannot be a local minimum
  2. yes, but it is only local and not global
  3. yes, even though the derivative of $f$ at $0$ is not zero
  4. 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.
co-f-351 · level facile · notes
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?
  1. $x = 0$ and $x = -4$
  2. $x = -4$ and $x = \frac{1}{8}$
  3. none: there is only $x = 4$
  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.
co-f-352 · level facile · notes
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$?
  1. $\tilde x = 1$, minimum $-3$
  2. $\tilde x = 2$, minimum $-4$
  3. $\tilde x = 0$, minimum $0$
  4. $\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.
co-f-364 · level facile · notes
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?
  1. because $x = -2$ is not feasible
  2. because $2$ is greater than $-2$ and we maximize
  3. because $x = -2$ is a minimum point
  4. 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)$.
co-f-365 · level facile · notes
Can an infeasible optimization problem, that is, one with feasible region $F = \emptyset$ (and optimal value $z(P)$), also be unbounded?
  1. yes, if the objective function is unbounded on its domain
  2. yes, but only in maximization form
  3. yes: then $z(P) = -\infty$ and $z(P)$ is not defined
  4. 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.
co-f-366 · level facile · notes
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?
  1. $z(P) \le 1$
  2. $4 \le z(P)$
  3. $1 \le z(P)$
  4. $\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.
co-f-367 · level facile · notes
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 \,\}$?
  1. none, because the coefficient is negative
  2. two: $x = -5$ and $x = 5$, with optimal value $-4$
  3. one: $x = 0$, with optimal value $6$
  4. 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$.
co-f-368 · level facile · notes
In $\R^2$, what shape does the spherical neighborhood $N(\bar{\boldsymbol x}, \delta) = \{ {\boldsymbol x} \in \R^2 : \|\bar{\boldsymbol x} - {\boldsymbol x}\| < \delta \}$ have, with the Euclidean distance?
  1. the open disk with center $\bar{\boldsymbol x}$ and radius $\delta$
  2. a closed disk with center $\bar{\boldsymbol x}$ and radius $\delta$
  3. a square with center $\bar{\boldsymbol x}$ and side $2\delta$
  4. the circle with center $\bar{\boldsymbol x}$ and radius $\delta$
Explanation. The strict inequality excludes the points at distance exactly $\delta$. The square would be the neighborhood with the norm $\infty$.
co-f-369 · level facile · notes
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?
  1. that there is ${\boldsymbol x} \in D$ with $f({\boldsymbol x}) < f(\bar{\boldsymbol x})$
  2. that the derivative of $f$ at $\bar{\boldsymbol x}$ is not zero
  3. that there are $\delta > 0$ and ${\boldsymbol x} \in N(\bar{\boldsymbol x}, \delta)$ with $f({\boldsymbol x}) > f(\bar{\boldsymbol x})$
  4. 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$).
co-f-370 · level facile · notes
For $f(x) = x^3$ on the domain $\R$, what is the point $x = 0$, where the derivative vanishes?
  1. a local maximum point, because $f'(0) = 0$
  2. a global minimum point of $f$ on $\R$
  3. neither a local minimum nor a local maximum
  4. 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.
co-f-371 · level facile · notes
Can a function $f : D \to \R$ have a (global) minimum point in $D$ without having a maximum point?
  1. no: minimum and maximum always exist
  2. yes: $f(x) = x^2$ on $\R$ has minimum $0$ and no maximum
  3. no: if the minimum exists the maximum exists too
  4. only if the domain $D$ is bounded
Explanation. $x^2 \ge 0 = f(0)$ on $\R$, but $x^2$ grows indefinitely: the maximization problem is unbounded. The two notions are independent.

6. Convex and concave optimization problems (80)

co-f-124 · level facile · notes
When is an optimization problem called a convex optimization problem?
  1. when the feasible region is convex and the objective function is convex over it
  2. when the objective function is convex, whatever the feasible region is
  3. when the feasible region is convex, whatever the objective function is
  4. when the feasible region is a polyhedron and the objective function is linear
Explanation. Definition 6.1: both conditions are needed. The linear case over a polyhedron is a special case, not the definition.
co-f-125 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 5$
  2. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 0$
  3. $\tilde{\boldsymbol x}(P) = (5)$, $z(P) = 10$
  4. $\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$.
co-f-126 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (5)$, $z(P) = 6$
  2. $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 0$
  3. $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 10$
  4. $\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$.
co-f-127 · level facile · notes
In a convex minimization problem, how many points of local minimum that are not optimal solutions can exist?
  1. it depends on the dimension $n$
  2. none
  3. at most one
  4. 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.
co-f-128 · level facile · notes
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?
  1. because it is described by constraints $g_i(x) \le 0$ with linear, hence convex, functions $g_i$
  2. because it is bounded, so every segment between two of its points stays inside it
  3. because it is closed, that is, it contains its endpoints $a$ and $b$
  4. 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.
co-f-129 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 6$
  2. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 4$
  3. $\tilde{\boldsymbol x}(P) = (4)$, $z(P) = 6$
  4. $\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$.
co-f-130 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 2$
  2. $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 2$
  3. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 6$
  4. $\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$.
co-f-131 · level facile · notes
Is the problem $P$: $\min\{\, x^2 \ \text{subject to}\ x^2 \ge 1 \,\}$ a convex minimization problem?
  1. no: the objective function is concave
  2. no: the feasible region $(-\infty,-1] \cup [1,+\infty)$ is not convex
  3. yes: the objective function is convex
  4. yes: the feasible region is closed
Explanation. $-1$ and $1$ are feasible but their midpoint $0$ is not. The convexity of $x^2$ alone is not enough.
co-f-132 · level facile · notes
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?
  1. it suggests the candidate, whose local optimality is then checked with the definition
  2. it proves by itself that the point is an optimal solution, for every problem
  3. it proves that the objective function is convex
  4. 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.
co-f-133 · level facile · notes
In the problem $P$: $\min\{\, -x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$, which statement is correct?
  1. $x = -1$ is the optimal solution, because it is a point of local minimum
  2. $x = 0$ is the optimal solution, because the derivative vanishes there
  3. it is a convex minimization problem, hence $x = -1$ is optimal
  4. $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.
co-f-134 · level facile · notes
In the problem $P$: $\max\{\, x^2 \ \text{subject to}\ -1 \le x \le 2 \,\}$, what can be said about the point $x = -1$?
  1. it is not a point of local maximum, because $x^2$ grows toward $x = 2$
  2. the problem is a concave maximization problem, so it is optimal
  3. it is a point of local maximum but not an optimal solution, which is $x = 2$
  4. 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.
co-f-135 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 0 \end{pmatrix}$, $z(P) = 4$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$, $z(P) = 2$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 2 \end{pmatrix}$, $z(P) = 0$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$, $z(P) = 8$
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).
co-f-136 · level media · notes
Completing the squares, how can the function $f({\boldsymbol x}) = 4x_1 + 2x_2 - x_1^2 - x_2^2$ of ${\boldsymbol x} \in \R^2$ be written?
  1. $5 - (x_1-2)^2 - (x_2-1)^2$
  2. $5 - (x_1+2)^2 - (x_2+1)^2$
  3. $3 - (x_1-2)^2 - (x_2-1)^2$
  4. $-5 + (x_1-2)^2 + (x_2-1)^2$
Explanation. $x_1^2 - 4x_1 = (x_1-2)^2 - 4$ and $x_2^2 - 2x_2 = (x_2-1)^2 - 1$, hence $f = 5 - (x_1-2)^2 - (x_2-1)^2$ (Exercise 6.4).
co-f-137 · level media · notes
Let $F_2 = \{ {\boldsymbol x} \in \R^2 : x_1^2 + x_2^2 - 2 \ge 0 \}$. Which computation proves that $F_2$ is not convex?
  1. $\begin{pmatrix} 0 \\ 0 \end{pmatrix} \notin F_2$, because $-2 < 0$
  2. $\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$
  3. $\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$
  4. $\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).
co-f-138 · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$, $z(P) = 18$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$, $z(P) = 2$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$, $z(P) = 8$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 3 \\ 3 \end{pmatrix}$, $z(P) = 0$
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$.
co-f-139 · level teorema · notes
On convex and concave optimization problems (convex feasible region, convex or concave objective function), which statement is correct?
  1. in a convex minimization problem, the optimal solution is always unique
  2. in a convex minimization problem, every point of local minimum is an optimal solution
  3. in a convex minimization problem, every feasible solution is a point of local minimum
  4. 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\}$.
co-f-140 · level teorema · notes
On problems with convex feasible region and concave objective function, which statement is correct?
  1. in a concave maximization problem, a point is a point of local maximum if and only if it is a point of maximum
  2. in a concave minimization problem, every point of local minimum is an optimal solution
  3. in a concave maximization problem, the optimal solution always lies on the boundary of the feasible region
  4. 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$).
co-f-141 · level teorema · notes
On the inequality of cubes, for $a, b \in \R$ and $\lambda \in [0,1]$, which statement is correct?
  1. $\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$ for every $a, b \in \R$
  2. $\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$ if $a, b \le 0$
  3. $\big(\lambda a + (1-\lambda) b\big)^3 \ge \lambda a^3 + (1-\lambda) b^3$ if $a, b \ge 0$
  4. $\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$.
co-f-142 · level ipotesi · notes
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?
  1. the boundedness of $F$, which guarantees the existence of a point of minimum
  2. the uniqueness of the optimal solution, which must then coincide with $\bar{\boldsymbol x}$
  3. 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$
  4. 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.
co-f-143 · level ipotesi · notes
To prove that in a concave maximization problem ($F$ convex, $f$ concave over $F$) every point of local maximum is optimal, what is used?
  1. the fact that $f \ge 0$ over $F$, so that maximizing $f$ is the same as maximizing $|f|$
  2. $-f$ convex, a local maximum of $f$ is a local minimum of $-f$, and in convex problems local minima are optimal
  3. the differentiability of $f$ and the negative sign of the second derivative at the local maximum
  4. 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.
co-f-144 · level ipotesi · notes
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?
  1. that $a, b \ge 0$, the condition under which the inequality of cubes holds
  2. that $a, b \le 0$, the condition under which the inequality of cubes holds
  3. nothing on the sign: the inequality of cubes holds for every $a, b \in \R$
  4. 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.
co-f-145 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (5)$, $z(P) = 0$
  2. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 25$
  3. $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 2$
  4. $\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.
co-f-191 · level facile · notes
When is an optimization problem $\min\{f({\boldsymbol x}) : {\boldsymbol x} \in F\}$ called convex?
  1. If $f$ is linear
  2. If $F$ is convex and $f$ is convex on $F$
  3. If $f$ is convex, whatever $F$
  4. If $F$ is bounded
Explanation. A convex region and a convex objective are needed.
co-f-192 · level facile · notes
Which problem is convex?
  1. $\min\{x_1^2 + x_2^2 : x_1 + x_2 \ge 1\}$
  2. $\min\{-x_1^2 : -1 \le x_1 \le 1\}$
  3. $\min\{x_1^2 : x_1 \in \{0, 1\}\}$
  4. $\min\{x_1 : x_1^2 \ge 1\}$
Explanation. Convex objective on a half-plane; the others have a concave objective or a nonconvex region.
co-f-193 · level teorema · notes
Which statement about a linear program $\min\{{\boldsymbol c}'{\boldsymbol x} : {\boldsymbol A}{\boldsymbol x} \le {\boldsymbol b}\}$ is correct?
  1. It is not convex because the objective is linear
  2. It is convex only if ${\boldsymbol c} \ge {\boldsymbol 0}$
  3. It is concave but not convex
  4. It is both convex and concave
Explanation. Convex polyhedral region, linear objective (convex and concave).
co-f-194 · level ipotesi · notes
To prove that $\min\{\|{\boldsymbol x}\|_2 : {\boldsymbol A}{\boldsymbol x} = {\boldsymbol b}\}$ is a convex problem, what is needed?
  1. That ${\boldsymbol b} = {\boldsymbol 0}$
  2. That the problem has a unique solution
  3. Convex affine region and convex norm
  4. That ${\boldsymbol A}$ is square
Explanation. An affine set is convex; every norm is convex.
co-f-195 · level facile · notes
In a convex minimization problem, a local minimum point is:
  1. a vertex of the region
  2. also global
  3. in general not global
  4. a maximum point
Explanation. It is the proposition on local minima of convex problems.
co-f-196 · level facile · notes
In a concave maximization problem (convex region, concave objective), a local maximum point is:
  1. a global maximum point
  2. in general only local
  3. a minimum point
  4. a saddle point
Explanation. Apply the proposition to $-f$, which is convex.
co-f-197 · level teorema · notes
Which statement about a maximization problem with a concave objective on a convex region is correct?
  1. Every local minimum is global
  2. It never has optimal solutions
  3. It always has a unique optimal solution
  4. Every local maximum is global
Explanation. It is the corollary for concave problems.
co-f-198 · level ipotesi · notes
To derive the corollary on maxima of concave problems from the proposition on minima of convex problems, what is used?
  1. That the region is bounded
  2. That $f$ is differentiable
  3. That $-f$ is convex
  4. That $f$ is quadratic
Explanation. Maxima of $f$ are minima of $-f$.
co-f-199 · level facile · notes
For $\min\{(x - 2)^2 : 0 \le x \le 5\}$, what follows from the local minimum point $x = 2$?
  1. The problem is unbounded
  2. It is the optimal solution, with value $0$
  3. It is only a local minimum
  4. The global minimum is at $x = 0$
Explanation. Convex problem: the local minimum is global.
co-f-200 · level facile · notes
Is the problem $\min\{x^3 : x \in \R\}$ convex?
  1. No: $x^3$ is not convex on $\R$
  2. Yes: $x^3$ is increasing
  3. Yes: $\R$ is convex
  4. Yes, but only for $x \ge 0$
Explanation. An increasing function is not convex for that reason.
co-f-201 · level teorema · notes
Which statement about the optimal solutions of a convex minimization problem is correct?
  1. The optimal solution is always unique
  2. The optimal solutions are vertices of the region
  3. Optimal solutions never exist
  4. The set of optimal solutions is convex
Explanation. If two points are optimal, convexity makes the segment between them optimal too.
co-f-202 · level ipotesi · notes
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?
  1. Bounded $F$
  2. Quadratic $f$
  3. Convex $F$ and $f$
  4. Only continuous $f$
Explanation. Without convexity of $F$ the points of the segment might leave $F$.
co-f-203 · level facile · notes
The problem $\max\{\ln x : 1 \le x \le e^2\}$ is:
  1. a linear problem
  2. a concave maximization problem
  3. a convex minimization problem
  4. neither convex nor concave
Explanation. $\ln x$ is concave on an interval (convex).
co-f-204 · level facile · notes
For $\min\{x_1^2 + x_2^2 : x_1 + x_2 = 2\}$, the optimal solution is:
  1. $(1, 1)'$, with value $2$
  2. $(2, 0)'$, with value $4$
  3. $(0, 0)'$, with value $0$
  4. $(0, 2)'$, with value $4$
Explanation. The point of the line closest to the origin; the problem is convex.
co-f-205 · level facile · notes
For $\max\{4x - x^2 : 0 \le x \le 3\}$, what is the optimal solution?
  1. $x = 3$, value $3$
  2. $x = 0$, value $0$
  3. $x = 4$, value $0$
  4. $x = 2$, value $4$
Explanation. Concave objective; the derivative $4 - 2x$ vanishes at $2$, feasible.
co-f-206 · level teorema · notes
Which statement about a nonconvex problem is correct?
  1. It always has a unique optimal solution
  2. Every local minimum is global
  3. It may have local minima that are not global
  4. It never has optimal solutions
Explanation. For instance $x^3 - 3x$ on $\R$ has a local minimum at $1$, not global.
co-f-207 · level ipotesi · notes
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$?
  1. That $F$ contains the origin
  2. That $F$ is convex
  3. That $F$ is bounded
  4. That $f$ is positive
Explanation. With nonconvex $F$ (e.g. two disjoint intervals) a local minimum may not be global.
co-f-208 · level facile · notes
For $\min\{x^2 : x \in [-2, -1] \cup [1, 3]\}$, why can the proposition «local minimum $\Rightarrow$ global» not be applied?
  1. The region is not convex
  2. $x^2$ is not convex
  3. The region is unbounded
  4. The problem has no local minima
Explanation. The union of two disjoint intervals is not convex ($x = 0$ is missing).
co-f-238 · level facile · notes
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?
  1. no: in minimization form it is called a convex problem
  2. yes, but only if the feasible region is bounded
  3. yes: the definition concerns $F$ and $f$, not the form
  4. 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.
co-f-239 · level facile · notes
Why do the definitions of convex and concave optimization problems require a convex feasible region $F$?
  1. because a convex $F$ makes every objective function convex
  2. because convex and concave functions are defined on a convex domain
  3. because otherwise the feasible region would be empty
  4. 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.
co-f-240 · level facile · notes
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?
  1. $g({\boldsymbol x}) = x_1^2 + x_2^2 - 1$
  2. $g({\boldsymbol x}) = 1 - x_1^2 - x_2^2$
  3. $g({\boldsymbol x}) = x_1 x_2 - 1$
  4. $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.
co-f-241 · level facile · notes
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 \,\}$?
  1. it is not convex, because $|x_1| + |x_2|$ is not differentiable
  2. it is not convex, because the feasible region is unbounded
  3. it is concave, because the constraint is an equality
  4. 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.
co-f-242 · level facile · notes
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 \,\}$?
  1. it is concave, because the function is a cube
  2. it is not convex, because the function is increasing
  3. it is convex: $(x-1)^3$ is convex where $x \ge 1$
  4. 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.
co-f-243 · level facile · notes
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$?
  1. $f({\boldsymbol x}) \le 3$
  2. $f({\boldsymbol x}) \ge 3$
  3. $f({\boldsymbol x}) \ge 3$ only near $\bar{\boldsymbol x}$
  4. $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$.
co-f-244 · level facile · notes
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?
  1. $f(\bar{\boldsymbol x}^{(1)}) = f(\bar{\boldsymbol x}^{(2)})$, because both are optimal
  2. they can be different, as in every problem
  3. it is impossible: a convex problem has only one local minimum
  4. $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).
co-f-245 · level facile · notes
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)$?
  1. $z(P) \ge 7$, but it could be larger
  2. $z(P) \le 7$, but it could be smaller
  3. it cannot be said without comparing all points
  4. $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$.
co-f-246 · level facile · notes
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?
  1. yes, if the feasible region is bounded
  2. no: such a problem never has local maxima
  3. no: it can be a local maximum that is not global
  4. 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$.
co-f-247 · level facile · notes
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?
  1. on the boundary of the feasible region $F$
  2. in $N(\bar{\boldsymbol x}, \delta) \cap F$
  3. outside the feasible region $F$
  4. 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})$.
co-f-248 · level facile · notes
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?
  1. $N\big((2), 1\big) = (1, 3)$, whose points are all feasible
  2. $N\big((2), 3\big) = (-1, 5)$, whose points are all feasible
  3. none: it is enough that the derivative vanishes at $x = 2$
  4. $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.
co-f-249 · level facile · notes
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?
  1. $-2x - 6$, zero at $x = -3$
  2. $2x - 6$, zero at $x = 3$, which is a minimum
  3. $-x + 3$, zero at $x = 3$
  4. $-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.
co-f-250 · level facile · notes
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}$?
  1. $8 \le 8$
  2. $4 \le 14$
  3. $8 \le 14$
  4. $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.
co-f-251 · level facile · notes
The function $f(x) = 2 + 9x - 6x^2 + x^3$ has $f(0) = 2$, $f(1) = 6$, $f(2) = 4$. Which computation proves that $f$ is not convex on $\R$?
  1. $f(0) < f(2)$, hence $f$ is not decreasing
  2. with $p = 0$, $w = 2$, $\lambda = \frac{1}{2}$: $f(1) = 6 > 3 = \frac{1}{2} f(0) + \frac{1}{2} f(2)$
  3. with $p = 2$, $w = 4$, $\lambda = \frac{1}{2}$: $f(3) = 2 < 5 = \frac{1}{2} f(2) + \frac{1}{2} f(4)$
  4. 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.
co-f-252 · level facile · notes
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?
  1. $x = 3$, because $x = 1$ is not feasible
  2. $x = 1$, because it vanishes there first
  3. both, because the derivative vanishes there
  4. 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.
co-f-253 · level facile · notes
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$?
  1. because the derivative of $f$ vanishes at $x = 3$
  2. because $(x-3)^2 \ge 0$ is enough whatever the sign of $x$
  3. because $f$ is increasing on $(2, 4)$
  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.
co-f-254 · level facile · notes
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?
  1. the derivative of $f$ vanishes at $x = 1$, inside $[0, 2]$
  2. $f(0) = 2 < 6 = f(1)$, hence $f$ increases on $[0, 1]$
  3. $a, b \le 0$: the inequality of cubes holds with $\ge$
  4. $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.
co-f-255 · level facile · notes
To prove with the definition that $f(x) = (x-2)^2 + 1$ is convex, which inequality do the notes use (for $a, b \in \R$ and $\lambda \in [0,1]$)?
  1. $\lambda a + (1-\lambda) b \le \max\{a, b\}$ per $\lambda \in [0,1]$
  2. $\big(\lambda a + (1-\lambda) b\big)^2 \le \lambda a^2 + (1-\lambda) b^2$
  3. $\big(\lambda a + (1-\lambda) b\big)^3 \le \lambda a^3 + (1-\lambda) b^3$
  4. $|\lambda a + (1-\lambda) b| \le \lambda |a| + (1-\lambda) |b|$
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.
co-f-256 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 2$
  2. $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 1$
  3. $\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = 26$
  4. $\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$.
co-f-257 · level facile · notes
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 \}$?
  1. minimum at $x = -1$ (value $-1$), maximum at $x = 1$ (value $3$)
  2. minimum at $x = 1$ (value $3$), maximum at $x = 4$ (value $-6$)
  3. minimum at $x = 4$ (value $-6$), maximum at $x = -1$ (value $-1$)
  4. 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.
co-f-258 · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 0 \end{pmatrix}$, $z(P) = 4$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$, $z(P) = 1$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} \frac{8}{5} \\ \frac{1}{5} \end{pmatrix}$, $z(P) = \frac{21}{5}$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 1 \end{pmatrix}$, $z(P) = 5$
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}$.
co-f-259 · level teorema · notes
On a convex minimization problem (convex feasible region $F$, objective function $f$ convex on $F$), which statement is correct?
  1. every feasible point of it is a local minimum point
  2. it may have no optimal solutions, as $\min\{x \text{ subject to } x > 0\}$
  3. it always has at least one optimal solution
  4. 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.
co-f-260 · level teorema · notes
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$?
  1. it can be positive, negative or zero
  2. it is always $\ge 0$, as for $a, b \ge 0$
  3. it is always $\le 0$, as for $a, b \le 0$
  4. 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.
co-f-261 · level teorema · notes
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?
  1. if $F$ is convex, every function $g_i$ is convex
  2. if every function $g_i$ is concave, $F$ is convex
  3. $F$ is convex only if $m = 1$
  4. 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.
co-f-353 · level teorema · notes
Let $f$ be convex on the convex feasible region $F$. Which statement is correct?
  1. every local maximum of $f$ in $F$ is also a maximum of $f$ in $F$
  2. $f$ has at most one local minimum point in the whole region $F$
  3. $f$ has no local maximum point at all in the region $F$
  4. 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).
co-f-354 · level facile · notes
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?
  1. yes: the feasible region is bounded
  2. no: it is a concave problem
  3. no: the feasible region is not convex
  4. 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.
co-f-355 · level facile · notes
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?
  1. the optimal solution is the endpoint $x = 0$
  2. it is the optimal solution, with optimal value $0$
  3. it is only a local minimum: other comparisons are needed
  4. 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.
co-f-356 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 2$
  2. $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -1$
  3. $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 1$
  4. $\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.
co-f-357 · level facile · notes
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)$)?
  1. that the point found is the only local minimum
  2. nothing: it may stop at a local minimum that is not global
  3. that the value found is only an upper bound on $z(P)$
  4. 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$.
co-f-358 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 1$
  2. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 10$
  3. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 9$
  4. $\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$.
co-f-359 · level facile · notes
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?
  1. neither, because the constraints are not linear
  2. only $P_1$: its region is convex, that of $P_2$ is not
  3. both, because $f$ is convex
  4. 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.
co-f-360 · level facile · notes
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?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 3 \\ 3 \end{pmatrix}$, $z(P) = 0$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$, $z(P) = 8$
  3. they do not exist, because the region is not convex
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$, $z(P) = 18$
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$.
co-f-361 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$, $z(P) = 0$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$, $z(P) = 2$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$, $z(P) = 0$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$, $z(P) = 1$
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.
co-f-362 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 3$
  2. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 0$
  3. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
  4. $\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$.
co-f-363 · level facile · notes
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]$?
  1. none, because the derivative does not vanish on $[1,3]$
  2. only $x = 1$, which is also the optimal solution
  3. $x = 0$, where the derivative vanishes
  4. $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.
co-f-372 · level facile · notes
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 \,\}$?
  1. it is concave: concave objective, convex half-plane
  2. it is convex, because the feasible region is convex
  3. it is neither convex nor concave, because the region is unbounded
  4. 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.
co-f-373 · level facile · notes
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 \,\}$?
  1. it is convex, because $\R^2$ is convex
  2. it is concave, because it contains a negative term
  3. it is convex, because it is a sum of squares
  4. 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}$.
co-f-374 · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$, $z(P) = 0$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 2 \end{pmatrix}$, $z(P) = 0$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 2 \end{pmatrix}$, $z(P) = 5$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} \frac{3}{2} \\ \frac{3}{2} \end{pmatrix}$, $z(P) = \frac{9}{2}$
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.
co-f-375 · level facile · notes
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?
  1. to compute the optimal value without finding the optimal solution
  2. because only then is a local optimum automatically an optimal solution
  3. because the derivative exists only for convex functions
  4. 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.
co-f-376 · level facile · notes
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?
  1. every ${\boldsymbol x} \ge {\boldsymbol 0}$ with $x_1 + x_2 = 2$, value $2$
  2. only $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, because a convex problem has a single optimum
  3. only $\begin{pmatrix} 2 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} 0 \\ 2 \end{pmatrix}$
  4. 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.

1. Convex sets (5)

Example 1 · co-g-cc2 · level facile · notes
Let ${\boldsymbol p} = \begin{pmatrix} 3 \\ 3 \end{pmatrix}$ and ${\boldsymbol w} = \begin{pmatrix} 6 \\ 7 \end{pmatrix}$. What is their convex combination $\lambda {\boldsymbol p} + (1-\lambda){\boldsymbol w}$ with scalar $\lambda = \frac{1}{4}$?
  1. $\begin{pmatrix} \frac{21}{4} \\ 6 \end{pmatrix}$
  2. $\begin{pmatrix} \frac{15}{4} \\ 4 \end{pmatrix}$
  3. $\begin{pmatrix} \frac{9}{2} \\ 5 \end{pmatrix}$
  4. $\begin{pmatrix} \frac{9}{4} \\ \frac{5}{2} \end{pmatrix}$
Explanation. Component by component: $\frac{1}{4}\cdot 3 + \frac{3}{4}\cdot 6 = \frac{21}{4}$ and $\frac{1}{4}\cdot 3 + \frac{3}{4}\cdot 7 = 6$. Typical mistake: swapping $\lambda$ and $1-\lambda$.
Example 2 · co-g-cc2 · level facile · notes
Let ${\boldsymbol p} = \begin{pmatrix} 1 \\ 7 \end{pmatrix}$ and ${\boldsymbol w} = \begin{pmatrix} 0 \\ -2 \end{pmatrix}$. What is their convex combination $\lambda {\boldsymbol p} + (1-\lambda){\boldsymbol w}$ with scalar $\lambda = \frac{3}{4}$?
  1. $\begin{pmatrix} \frac{3}{4} \\ \frac{19}{4} \end{pmatrix}$
  2. $\begin{pmatrix} \frac{1}{4} \\ \frac{1}{4} \end{pmatrix}$
  3. $\begin{pmatrix} \frac{1}{2} \\ \frac{5}{2} \end{pmatrix}$
  4. $\begin{pmatrix} \frac{3}{4} \\ \frac{15}{4} \end{pmatrix}$
Explanation. Component by component: $\frac{3}{4}\cdot 1 + \frac{1}{4}\cdot 0 = \frac{3}{4}$ and $\frac{3}{4}\cdot 7 + \frac{1}{4}\cdot -2 = \frac{19}{4}$. Typical mistake: swapping $\lambda$ and $1-\lambda$.
Example 1 · co-g-cc3 · level facile · notes
What is the convex combination $\lambda_1 {\boldsymbol p}^{(1)} + \lambda_2 {\boldsymbol p}^{(2)} + \lambda_3 {\boldsymbol p}^{(3)}$ of the points ${\boldsymbol p}^{(1)} = \begin{pmatrix} 4 \\ 4 \end{pmatrix}$, ${\boldsymbol p}^{(2)} = \begin{pmatrix} 7 \\ 8 \end{pmatrix}$, ${\boldsymbol p}^{(3)} = \begin{pmatrix} -1 \\ 7 \end{pmatrix}$, with scalars $\lambda_1 = \frac{1}{2}$, $\lambda_2 = \frac{1}{3}$, $\lambda_3 = \frac{1}{6}$?
  1. $\begin{pmatrix} \frac{25}{6} \\ \frac{35}{6} \end{pmatrix}$
  2. $\begin{pmatrix} 2 \\ \frac{37}{6} \end{pmatrix}$
  3. $\begin{pmatrix} \frac{23}{6} \\ 7 \end{pmatrix}$
  4. $\begin{pmatrix} \frac{10}{3} \\ \frac{19}{3} \end{pmatrix}$
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}$).
Example 2 · co-g-cc3 · level facile · notes
What is the convex combination $\lambda_1 {\boldsymbol p}^{(1)} + \lambda_2 {\boldsymbol p}^{(2)} + \lambda_3 {\boldsymbol p}^{(3)}$ of the points ${\boldsymbol p}^{(1)} = \begin{pmatrix} 5 \\ 9 \end{pmatrix}$, ${\boldsymbol p}^{(2)} = \begin{pmatrix} 7 \\ 5 \end{pmatrix}$, ${\boldsymbol p}^{(3)} = \begin{pmatrix} 8 \\ 7 \end{pmatrix}$, with scalars $\lambda_1 = \frac{1}{2}$, $\lambda_2 = \frac{1}{4}$, $\lambda_3 = \frac{1}{4}$?
  1. $\begin{pmatrix} \frac{25}{4} \\ \frac{15}{2} \end{pmatrix}$
  2. $\begin{pmatrix} 7 \\ 7 \end{pmatrix}$
  3. $\begin{pmatrix} \frac{27}{4} \\ \frac{13}{2} \end{pmatrix}$
  4. $\begin{pmatrix} \frac{20}{3} \\ 7 \end{pmatrix}$
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}$).
Example 1 · co-g-ball · level facile · notes
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$?
  1. $\begin{pmatrix} 2 \\ -1 \end{pmatrix}$
  2. $\begin{pmatrix} -2 \\ 6 \end{pmatrix}$
  3. $\begin{pmatrix} 6 \\ 0 \end{pmatrix}$
  4. $\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).
Example 2 · co-g-ball · level facile · notes
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$?
  1. $\begin{pmatrix} 4 \\ 1 \end{pmatrix}$
  2. $\begin{pmatrix} 5 \\ 1 \end{pmatrix}$
  3. $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
  4. $\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).
Example 1 · co-g-ballcap · level media · notes
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$?
  1. $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
  2. $\begin{pmatrix} 0 \\ 4 \end{pmatrix}$
  3. $\begin{pmatrix} 6 \\ 0 \end{pmatrix}$
  4. $\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).
Example 2 · co-g-ballcap · level media · notes
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$?
  1. $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$
  2. $\begin{pmatrix} 2 \\ 3 \end{pmatrix}$
  3. $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
  4. $\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).
Example 1 · co-g-bary · level complessa · notes
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?
  1. $(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{4}, \frac{1}{2}, \frac{1}{4})$: it is a convex combination
  2. $(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{4}, \frac{1}{2}, \frac{1}{4})$: it is not a convex combination
  3. $(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{2}, \frac{1}{4}, \frac{1}{4})$: it is a convex combination
  4. $(\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.
Example 2 · co-g-bary · level complessa · notes
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?
  1. $(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{2}, \frac{3}{4}, -\frac{1}{4})$: it is not a convex combination
  2. $(\lambda_1, \lambda_2, \lambda_3) = (\frac{1}{2}, \frac{3}{4}, -\frac{1}{4})$: it is a convex combination
  3. $(\lambda_1, \lambda_2, \lambda_3) = (\frac{3}{4}, -\frac{1}{4}, \frac{1}{2})$: it is not a convex combination
  4. $(\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.

2. Functions of several variables (5)

Example 1 · co-g-grad · level facile · notes
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}$?
  1. $\begin{pmatrix} -8 \\ 5 \end{pmatrix}$
  2. $\begin{pmatrix} -2 \\ 5 \end{pmatrix}$
  3. $\begin{pmatrix} 5 \\ -8 \end{pmatrix}$
  4. $\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.
Example 2 · co-g-grad · level facile · notes
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}$?
  1. $\begin{pmatrix} -6 \\ -10 \end{pmatrix}$
  2. $\begin{pmatrix} -4 \\ -10 \end{pmatrix}$
  3. $\begin{pmatrix} -10 \\ -6 \end{pmatrix}$
  4. $\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.
Example 1 · co-g-hess · level facile · notes
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}$?
  1. $\begin{pmatrix} -4 & 7 \\ 7 & -24 \end{pmatrix}$
  2. $\begin{pmatrix} -4 & 4 \\ 4 & -24 \end{pmatrix}$
  3. $\begin{pmatrix} -4 & 7 \\ 7 & 24 \end{pmatrix}$
  4. $\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.
Example 2 · co-g-hess · level facile · notes
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}$?
  1. $\begin{pmatrix} 2 & 7 \\ 7 & 6 \end{pmatrix}$
  2. $\begin{pmatrix} 2 & 5 \\ 5 & 6 \end{pmatrix}$
  3. $\begin{pmatrix} 2 & 7 \\ 7 & -3 \end{pmatrix}$
  4. $\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.
Example 1 · co-g-level · level facile · notes
For $f: \R^2 \to \R$, $f({\boldsymbol x}) = (x_1 - 1)^2 + (x_2 - 1)^2 + 4$, what is the level set $L(-5) = \{ {\boldsymbol x} \in \R^2 : f({\boldsymbol x}) = -5 \}$?
  1. the empty set
  2. the single point $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
  3. the circle with center $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ and radius $3$
  4. the circle with center $\begin{pmatrix} -1 \\ -1 \end{pmatrix}$ and radius $3$
Explanation. $L(-5)$: we would need $(x_1 - 1)^2 + (x_2 - 1)^2 = -9 < 0$, impossible: the set is empty.
Example 2 · co-g-level · level facile · notes
For $f: \R^2 \to \R$, $f({\boldsymbol x}) = (x_1 - 3)^2 + (x_2 - 2)^2 + 5$, what is the level set $L(5) = \{ {\boldsymbol x} \in \R^2 : f({\boldsymbol x}) = 5 \}$?
  1. the single point $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$
  2. the empty set
  3. the single point $\begin{pmatrix} -3 \\ -2 \end{pmatrix}$
  4. the circle with center $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$ and radius $5$
Explanation. $L(5)$: $(x_1 - 3)^2 + (x_2 - 2)^2 = 0$, a vanishing sum of squares: only the point $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$.
Example 1 · co-g-descent · level media · notes
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?
  1. $\begin{pmatrix} 2 \\ -4 \end{pmatrix}$
  2. $\begin{pmatrix} 6 \\ 0 \end{pmatrix}$
  3. $\begin{pmatrix} 0 \\ -6 \end{pmatrix}$
  4. $\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.
Example 2 · co-g-descent · level media · notes
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?
  1. $\begin{pmatrix} -\frac{2}{3} \\ -9 \end{pmatrix}$
  2. $\begin{pmatrix} \frac{2}{3} \\ 15 \end{pmatrix}$
  3. $\begin{pmatrix} -2 \\ -33 \end{pmatrix}$
  4. $\begin{pmatrix} -\frac{1}{3} \\ -3 \end{pmatrix}$
Explanation. $\nabla f(\bar{\boldsymbol x}) = \begin{pmatrix} 2 \\ 36 \end{pmatrix}$, hence $\bar{\boldsymbol x} - \frac{1}{3}\,\nabla f(\bar{\boldsymbol x}) = \begin{pmatrix} -\frac{2}{3} \\ -9 \end{pmatrix}$. Typical mistakes: the sign $+$ (direction of steepest ascent), the step $\alpha$ forgotten, the factor $2$ of the gradient forgotten.
Example 1 · co-g-tangent · level media · notes
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?
  1. $\begin{pmatrix} -3 \\ 1 \end{pmatrix}$
  2. $\begin{pmatrix} 1 \\ 3 \end{pmatrix}$
  3. $\begin{pmatrix} 3 \\ 1 \end{pmatrix}$
  4. $\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.
Example 2 · co-g-tangent · level media · notes
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?
  1. $\begin{pmatrix} 3 \\ -1 \end{pmatrix}$
  2. $\begin{pmatrix} -1 \\ -3 \end{pmatrix}$
  3. $\begin{pmatrix} -3 \\ -1 \end{pmatrix}$
  4. $\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.

3. Convex and concave functions (5)

Example 1 · co-g-norms · level facile · notes
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$?
  1. $\|{\boldsymbol x}\|_1 = 17$, $\|{\boldsymbol x}\|_2 = 11$, $\|{\boldsymbol x}\|_\infty = 9$
  2. $\|{\boldsymbol x}\|_1 = -1$, $\|{\boldsymbol x}\|_2 = 11$, $\|{\boldsymbol x}\|_\infty = 9$
  3. $\|{\boldsymbol x}\|_1 = 17$, $\|{\boldsymbol x}\|_2 = 121$, $\|{\boldsymbol x}\|_\infty = 9$
  4. $\|{\boldsymbol x}\|_1 = 17$, $\|{\boldsymbol x}\|_2 = 11$, $\|{\boldsymbol x}\|_\infty = 2$
Explanation. $\|{\boldsymbol x}\|_1 = 9 + 6 + 2 = 17$, $\|{\boldsymbol x}\|_2 = \sqrt{81 + 36 + 4} = 11$, $\|{\boldsymbol x}\|_\infty = \max\{9, 6, 2\} = 9$. Typical mistakes: absolute values forgotten, square root forgotten, minimum instead of maximum.
Example 2 · co-g-norms · level facile · notes
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$?
  1. $\|{\boldsymbol x}\|_1 = 5$, $\|{\boldsymbol x}\|_2 = 3$, $\|{\boldsymbol x}\|_\infty = 2$
  2. $\|{\boldsymbol x}\|_1 = -3$, $\|{\boldsymbol x}\|_2 = 3$, $\|{\boldsymbol x}\|_\infty = 2$
  3. $\|{\boldsymbol x}\|_1 = 5$, $\|{\boldsymbol x}\|_2 = 9$, $\|{\boldsymbol x}\|_\infty = 2$
  4. $\|{\boldsymbol x}\|_1 = 5$, $\|{\boldsymbol x}\|_2 = 3$, $\|{\boldsymbol x}\|_\infty = 1$
Explanation. $\|{\boldsymbol x}\|_1 = 1 + 2 + 2 = 5$, $\|{\boldsymbol x}\|_2 = \sqrt{1 + 4 + 4} = 3$, $\|{\boldsymbol x}\|_\infty = \max\{1, 2, 2\} = 2$. Typical mistakes: absolute values forgotten, square root forgotten, minimum instead of maximum.
Example 1 · co-g-chord · level facile · notes
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?
  1. $f(\lambda p + (1-\lambda) w) = \frac{121}{16}$, $\lambda f(p) + (1-\lambda) f(w) = \frac{49}{4}$
  2. $f(\lambda p + (1-\lambda) w) = \frac{49}{4}$, $\lambda f(p) + (1-\lambda) f(w) = \frac{121}{16}$
  3. $f(\lambda p + (1-\lambda) w) = \frac{121}{16}$, $\lambda f(p) + (1-\lambda) f(w) = \frac{17}{2}$
  4. $f(\lambda p + (1-\lambda) w) = \frac{121}{16}$, $\lambda f(p) + (1-\lambda) f(w) = \frac{47}{4}$
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}$.
Example 2 · co-g-chord · level facile · notes
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?
  1. $f(\lambda p + (1-\lambda) w) = \frac{169}{16}$, $\lambda f(p) + (1-\lambda) f(w) = \frac{49}{4}$
  2. $f(\lambda p + (1-\lambda) w) = \frac{49}{4}$, $\lambda f(p) + (1-\lambda) f(w) = \frac{169}{16}$
  3. $f(\lambda p + (1-\lambda) w) = \frac{169}{16}$, $\lambda f(p) + (1-\lambda) f(w) = \frac{17}{2}$
  4. $f(\lambda p + (1-\lambda) w) = \frac{169}{16}$, $\lambda f(p) + (1-\lambda) f(w) = \frac{13}{4}$
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}$.
Example 1 · co-g-normchord · level media · notes
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?
  1. $\frac{23}{4}$ and $\frac{25}{4}$
  2. $\frac{25}{4}$ and $\frac{23}{4}$
  3. $\frac{11}{4}$ and $\frac{25}{4}$
  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$.
Example 2 · co-g-normchord · level media · notes
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?
  1. $\frac{9}{2}$ and $5$
  2. $5$ and $\frac{9}{2}$
  3. $\frac{13}{2}$ and $5$
  4. $\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?
  1. $\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}$
  2. $\begin{pmatrix} -3 \\ -3 \end{pmatrix},\ \begin{pmatrix} -3 \\ 3 \end{pmatrix},\ \begin{pmatrix} 3 \\ -3 \end{pmatrix},\ \begin{pmatrix} 3 \\ 3 \end{pmatrix}$
  3. $\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}$
  4. $\begin{pmatrix} -3 \\ -3 \end{pmatrix},\ \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}$
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?
  1. $\begin{pmatrix} -4 \\ 2 \end{pmatrix},\ \begin{pmatrix} -4 \\ 4 \end{pmatrix},\ \begin{pmatrix} 2 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ 4 \end{pmatrix}$
  2. $\begin{pmatrix} -4 \\ -4 \end{pmatrix},\ \begin{pmatrix} -4 \\ 4 \end{pmatrix},\ \begin{pmatrix} 4 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ 4 \end{pmatrix}$
  3. $\begin{pmatrix} -4 \\ -2 \end{pmatrix},\ \begin{pmatrix} -4 \\ 4 \end{pmatrix},\ \begin{pmatrix} -2 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ 4 \end{pmatrix}$
  4. $\begin{pmatrix} -4 \\ -4 \end{pmatrix},\ \begin{pmatrix} -4 \\ 2 \end{pmatrix},\ \begin{pmatrix} -4 \\ 4 \end{pmatrix},\ \begin{pmatrix} 2 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ 4 \end{pmatrix}$
Explanation. The ball of norm $\infty$ is the square with vertices $\begin{pmatrix} -4 \\ -4 \end{pmatrix},\ \begin{pmatrix} -4 \\ 4 \end{pmatrix},\ \begin{pmatrix} 4 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ 4 \end{pmatrix}$; the line $-x_1 - x_2 = 2$ cuts off the vertex $\begin{pmatrix} -4 \\ -4 \end{pmatrix}$ and meets two sides at two new vertices. The vertices are $\begin{pmatrix} -4 \\ 2 \end{pmatrix},\ \begin{pmatrix} -4 \\ 4 \end{pmatrix},\ \begin{pmatrix} 2 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ -4 \end{pmatrix},\ \begin{pmatrix} 4 \\ 4 \end{pmatrix}$.
Example 1 · co-g-cubicchord · level media · notes
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?
  1. $-3$ and $-6$: $f$ is not convex on $[p, w]$
  2. $-3$ and $-6$: $f$ is concave on $[p, w]$
  3. $-3$ and $-6$: $f$ is not concave on $[p, w]$
  4. $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.
Example 2 · co-g-cubicchord · level media · notes
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?
  1. $\frac{567}{64}$ and $\frac{87}{4}$: $f$ is not concave on $[p, w]$
  2. $\frac{567}{64}$ and $\frac{87}{4}$: $f$ is convex on $[p, w]$
  3. $\frac{567}{64}$ and $\frac{87}{4}$: $f$ is not convex on $[p, w]$
  4. $-\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.

4. Quadratic functions (5)

Example 1 · co-g-sym · level facile · notes
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?
  1. $\begin{pmatrix} 1 & -2 \\ -2 & -1 \end{pmatrix}$
  2. $\begin{pmatrix} 1 & -6 \\ -6 & -1 \end{pmatrix}$
  3. $\begin{pmatrix} 1 & 2 \\ 2 & -1 \end{pmatrix}$
  4. $\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.
Example 2 · co-g-sym · level facile · notes
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?
  1. $\begin{pmatrix} -1 & 3 \\ 3 & 5 \end{pmatrix}$
  2. $\begin{pmatrix} -1 & 4 \\ 4 & 5 \end{pmatrix}$
  3. $\begin{pmatrix} -1 & 2 \\ 2 & 5 \end{pmatrix}$
  4. $\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.
Example 1 · co-g-quadgrad · level facile · notes
Let $g({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} + {\boldsymbol c}' {\boldsymbol x}$ with ${\boldsymbol Q} = \begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix}$ and ${\boldsymbol c} = \begin{pmatrix} 4 \\ -4 \end{pmatrix}$. What is $\nabla g$ at the point $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$?
  1. $\begin{pmatrix} 12 \\ 6 \end{pmatrix}$
  2. $\begin{pmatrix} 8 \\ 1 \end{pmatrix}$
  3. $\begin{pmatrix} 8 \\ 10 \end{pmatrix}$
  4. $\begin{pmatrix} 4 \\ 14 \end{pmatrix}$
Explanation. $\nabla g({\boldsymbol x}) = 2\,{\boldsymbol Q}\,{\boldsymbol x} + {\boldsymbol c}$, with ${\boldsymbol Q}{\boldsymbol x} = \begin{pmatrix} 4 \\ 5 \end{pmatrix}$: $2\begin{pmatrix} 4 \\ 5 \end{pmatrix} + \begin{pmatrix} 4 \\ -4 \end{pmatrix} = \begin{pmatrix} 12 \\ 6 \end{pmatrix}$. Typical mistakes: factor $2$ forgotten, ${\boldsymbol c}$ forgotten or subtracted.
Example 2 · co-g-quadgrad · level facile · notes
Let $g({\boldsymbol x}) = {\boldsymbol x}' {\boldsymbol Q}\, {\boldsymbol x} + {\boldsymbol c}' {\boldsymbol x}$ with ${\boldsymbol Q} = \begin{pmatrix} 0 & -1 \\ -1 & 3 \end{pmatrix}$ and ${\boldsymbol c} = \begin{pmatrix} -4 \\ -1 \end{pmatrix}$. What is $\nabla g$ at the point $\begin{pmatrix} 3 \\ 2 \end{pmatrix}$?
  1. $\begin{pmatrix} -8 \\ 5 \end{pmatrix}$
  2. $\begin{pmatrix} -6 \\ 2 \end{pmatrix}$
  3. $\begin{pmatrix} -4 \\ 6 \end{pmatrix}$
  4. $\begin{pmatrix} 0 \\ 7 \end{pmatrix}$
Explanation. $\nabla g({\boldsymbol x}) = 2\,{\boldsymbol Q}\,{\boldsymbol x} + {\boldsymbol c}$, with ${\boldsymbol Q}{\boldsymbol x} = \begin{pmatrix} -2 \\ 3 \end{pmatrix}$: $2\begin{pmatrix} -2 \\ 3 \end{pmatrix} + \begin{pmatrix} -4 \\ -1 \end{pmatrix} = \begin{pmatrix} -8 \\ 5 \end{pmatrix}$. Typical mistakes: factor $2$ forgotten, ${\boldsymbol c}$ forgotten or subtracted.
Example 1 · co-g-psd · level media · notes
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$?
  1. $f({\boldsymbol x}) = 3x_1^2 + 2x_1 x_2 + 3x_2^2$
  2. $f({\boldsymbol x}) = x_1^2 + 6x_1 x_2 + 3x_2^2$
  3. $f({\boldsymbol x}) = 2x_1^2 + 6x_1 x_2 + x_2^2$
  4. $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.
Example 2 · co-g-psd · level media · notes
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$?
  1. $f({\boldsymbol x}) = 4x_1^2 + 2x_1 x_2 + x_2^2$
  2. $f({\boldsymbol x}) = 2x_1^2 - 6x_1 x_2 + 2x_2^2$
  3. $f({\boldsymbol x}) = x_1^2 + 4x_1 x_2 + x_2^2$
  4. $f({\boldsymbol x}) = -3x_1^2 - 2x_1 x_2 + 4x_2^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?
  1. $g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, where $g = 0$
  2. $g$ is convex; $\nabla g$ vanishes at $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$, where $g = 0$
  3. $g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} 2 \\ 2 \end{pmatrix}$, where $g = 5$
  4. $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?
  1. $g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} -2 \\ -1 \end{pmatrix}$, where $g = 6$
  2. $g$ is convex; $\nabla g$ vanishes at $\begin{pmatrix} -2 \\ -1 \end{pmatrix}$, where $g = 6$
  3. $g$ is not convex; $\nabla g$ vanishes at $\begin{pmatrix} -4 \\ -2 \end{pmatrix}$, where $g = 5$
  4. $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}$).
Example 1 · co-g-witness · level media · notes
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?
  1. $\begin{pmatrix} -1 \\ 2 \end{pmatrix}$
  2. $\begin{pmatrix} -1 \\ 0 \end{pmatrix}$
  3. $\begin{pmatrix} -2 \\ 1 \end{pmatrix}$
  4. $\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.
Example 2 · co-g-witness · level media · notes
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?
  1. $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
  2. $\begin{pmatrix} 1 \\ -2 \end{pmatrix}$
  3. $\begin{pmatrix} -1 \\ -2 \end{pmatrix}$
  4. $\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.

5. Optimization problems (14)

Example 1 · co-g-bounds · level facile · notes
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?
  1. $z(P) \le 2$
  2. $z(P) \le 17$
  3. $2 \le z(P)$
  4. $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.
Example 2 · co-g-bounds · level facile · notes
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?
  1. $z(P) \le 3$
  2. $z(P) \le 19$
  3. $3 \le z(P)$
  4. $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.
Example 1 · co-g-props · level facile · notes
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 \,\}$?
  1. $5$
  2. $20$
  3. $0$
  4. $-5$
Explanation. The constant is added outside and, with $a = 3 > 0$, $\min\{a f\} = a \min\{f\}$: $3\cdot(0) + 5 = 5$.
Example 2 · co-g-props · level facile · notes
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 \,\}$?
  1. $-17$
  2. $-3$
  3. $-12$
  4. $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$.
Example 1 · co-g-neigh · level facile · notes
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?
  1. $\begin{pmatrix} -2 \\ 3 \end{pmatrix}$
  2. $\begin{pmatrix} 7 \\ 2 \end{pmatrix}$
  3. $\begin{pmatrix} -3 \\ 0 \end{pmatrix}$
  4. $\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$.
Example 2 · co-g-neigh · level facile · notes
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?
  1. $\begin{pmatrix} 2 \\ 4 \end{pmatrix}$
  2. $\begin{pmatrix} -1 \\ 4 \end{pmatrix}$
  3. $\begin{pmatrix} 3 \\ 5 \end{pmatrix}$
  4. $\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$.
Example 1 · co-g-interval · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 2$
  2. $\tilde{\boldsymbol x}(P) = (8)$, $z(P) = 50$
  3. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
  4. $\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$.
Example 2 · co-g-interval · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (7)$, $z(P) = 19$
  2. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 7$
  3. $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = 3$
  4. $\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?
  1. it has optimal solution $\tilde{\boldsymbol x}(P) = (1)$, with $z(P) = 3$
  2. it has optimal solution $\tilde{\boldsymbol x}(P) = (5)$, with $z(P) = -13$
  3. it has an unattainable supremum $3$: there is no optimal solution
  4. 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?
  1. it has optimal solution $\tilde{\boldsymbol x}(P) = (3)$, with $z(P) = -1$
  2. it has optimal solution $\tilde{\boldsymbol x}(P) = (2)$, with $z(P) = 0$
  3. it has optimal solution $\tilde{\boldsymbol x}(P) = (7)$, with $z(P) = 15$
  4. 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.
Example 1 · co-g-feas · level facile · notes
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$?
  1. $\begin{pmatrix} -1 \\ 1 \end{pmatrix}$
  2. $\begin{pmatrix} 1 \\ 4 \end{pmatrix}$
  3. $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$
  4. $\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.
Example 2 · co-g-feas · level facile · notes
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$?
  1. $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$
  2. $\begin{pmatrix} 2 \\ 1 \end{pmatrix}$
  3. $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$
  4. $\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.
Example 1 · co-g-status · level facile · notes
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?
  1. it is infeasible: $F = \emptyset$ and no optimal solution
  2. it has optimal solution $\tilde{\boldsymbol x}(P) = (-3)$ and optimal value $z(P) = -2$
  3. it has an unattainable supremum $2$: no optimal solution
  4. 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.
Example 2 · co-g-status · level facile · notes
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?
  1. it has optimal solution $\tilde{\boldsymbol x}(P) = (3)$ and optimal value $z(P) = 0$
  2. it has an unattainable infimum $0$: no optimal solution
  3. it is unbounded: $z(P) = -\infty$ and no optimal solution
  4. 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$.
Example 1 · co-g-finite · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 2 \end{pmatrix}$, $z(P) = 6$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ -1 \end{pmatrix}$, $z(P) = 5$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ -2 \end{pmatrix}$, $z(P) = 4$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -2 \\ 3 \end{pmatrix}$, $z(P) = 3$
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}$.
Example 2 · co-g-finite · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 3 \\ 2 \end{pmatrix}$, $z(P) = 2$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ 3 \end{pmatrix}$, $z(P) = 4$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 4 \end{pmatrix}$, $z(P) = 9$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 4 \end{pmatrix}$, $z(P) = 11$
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}$.
Example 1 · co-g-neighcap · level facile · notes
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$?
  1. $(2, 5]$
  2. $[2, 5)$
  3. $(2, 8)$
  4. $[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.
Example 2 · co-g-neighcap · level facile · notes
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. $[-1, 0)$
  2. $(-1, 0]$
  3. $(-2, 0)$
  4. $[-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.
Example 1 · co-g-negprop · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (5)$, $z(P) = -47$
  2. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 1$
  3. $\tilde{\boldsymbol x}(P) = (5)$, $z(P) = -51$
  4. $\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$.
Example 2 · co-g-negprop · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = -7$
  2. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 1$
  3. $\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = -12$
  4. $\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$.
Example 1 · co-g-localcubic · level media · notes
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)$?
  1. local minimum points: $-4,\ 1$; optimal solution $\tilde{\boldsymbol x}(P) = (-4)$
  2. local minimum points: $-4,\ 1$; optimal solution $\tilde{\boldsymbol x}(P) = (1)$
  3. local minimum points: $1$; optimal solution $\tilde{\boldsymbol x}(P) = (1)$
  4. local minimum points: $-1,\ 3$; optimal solution $\tilde{\boldsymbol x}(P) = (3)$
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.
Example 2 · co-g-localcubic · level media · notes
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)$?
  1. local minimum points: $-3,\ 4$; optimal solution $\tilde{\boldsymbol x}(P) = (-3)$
  2. local minimum points: $-3,\ 4$; optimal solution $\tilde{\boldsymbol x}(P) = (4)$
  3. local minimum points: $4$; optimal solution $\tilde{\boldsymbol x}(P) = (4)$
  4. local minimum points: $0,\ 5$; optimal solution $\tilde{\boldsymbol x}(P) = (5)$
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.
Example 1 · co-g-multiopt · level media · notes
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 \}$?
  1. $\arg\min = [-2, 2]$, $\arg\max = \{5\}$
  2. $\arg\min = \{0\}$, $\arg\max = \{5\}$
  3. $\arg\min = [-2, 2]$, $\arg\max = \{-4\}$
  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$.
Example 2 · co-g-multiopt · level media · notes
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 \}$?
  1. $\arg\min = [-3, 1]$, $\arg\max = \{2\}$
  2. $\arg\min = \{-1\}$, $\arg\max = \{2\}$
  3. $\arg\min = [-3, 1]$, $\arg\max = \{-3\}$
  4. $\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)$?
  1. $x = -1$; optimal value $z(P) = 0$
  2. $x = 3$; optimal value $z(P) = 0$
  3. $x = -1$; optimal value $z(P) = 3$
  4. $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)$?
  1. $x = -3$; optimal value $z(P) = 0$
  2. $x = 3$; optimal value $z(P) = 0$
  3. $x = -3$; optimal value $z(P) = 1$
  4. $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).
Example 1 · co-g-gap · level complessa · notes
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)$?
  1. best bound $z(P) \le -9$; optimal value $z(P) = -19$
  2. best bound $z(P) \le -1$; optimal value $z(P) = -19$
  3. best bound $z(P) \le -9$; optimal value $z(P) = -1$
  4. 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$.
Example 2 · co-g-gap · level complessa · notes
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)$?
  1. best bound $-16 \le z(P)$; optimal value $z(P) = 0$
  2. best bound $-70 \le z(P)$; optimal value $z(P) = 0$
  3. best bound $-16 \le z(P)$; optimal value $z(P) = 2$
  4. 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$.

6. Convex and concave optimization problems (13)

Example 1 · co-g-boxproj · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ 3 \end{pmatrix}$, $z(P) = 4$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ 4 \end{pmatrix}$, $z(P) = 5$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 6 \\ 3 \end{pmatrix}$, $z(P) = 0$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 3 \end{pmatrix}$, $z(P) = 36$
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.
Example 2 · co-g-boxproj · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 3 \end{pmatrix}$, $z(P) = 4$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 2 \end{pmatrix}$, $z(P) = 5$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 3 \\ 3 \end{pmatrix}$, $z(P) = 0$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -1 \\ 3 \end{pmatrix}$, $z(P) = 16$
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?
  1. It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 6$
  2. It is a convex maximization problem; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 6$
  3. It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = 5$
  4. 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?
  1. It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -1$
  2. It is a concave minimization problem; $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -1$
  3. It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (6)$, $z(P) = 26$
  4. 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$.
Example 1 · co-g-cubic · level complessa · notes
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?
  1. It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 20$
  2. It is a convex maximization problem; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 20$
  3. It is a concave maximization problem; $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -12$
  4. 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$.
Example 2 · co-g-cubic · level complessa · notes
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?
  1. It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = -17$
  2. It is a concave minimization problem; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = -17$
  3. It is a convex minimization problem; $\tilde{\boldsymbol x}(P) = (-3)$, $z(P) = 15$
  4. 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$.
Example 1 · co-g-sepbox · level complessa · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 3 \end{pmatrix}$, $z(P) = -18$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 3 \\ 3 \end{pmatrix}$, $z(P) = -36$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -2 \\ 2 \end{pmatrix}$, $z(P) = 16$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 2 \end{pmatrix}$, $z(P) = -16$
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$.
Example 2 · co-g-sepbox · level complessa · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 1 \end{pmatrix}$, $z(P) = -23$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 3 \end{pmatrix}$, $z(P) = -35$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ -2 \end{pmatrix}$, $z(P) = 42$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$, $z(P) = -21$
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$.
Example 1 · co-g-convtype · level facile · notes
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 \,\}$?
  1. it is neither convex nor concave, because $F$ is not convex
  2. it is a convex problem: $F$ is convex and $f$ is convex on $F$
  3. it is a concave problem: $F$ is convex and $f$ is concave on $F$
  4. 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.
Example 2 · co-g-convtype · level facile · notes
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]$?
  1. it is a convex problem: $F$ is convex and $f$ is convex on $F$
  2. it is a concave problem: $F$ is convex and $f$ is concave on $F$
  3. it is neither convex nor concave, because $F$ is not convex
  4. 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.
Example 1 · co-g-cubeineq · level facile · notes
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}$?
  1. $-\frac{87}{64}$
  2. $\frac{87}{64}$
  3. $-\frac{93}{64}$
  4. $-\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.
Example 2 · co-g-cubeineq · level facile · notes
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}$?
  1. $\frac{136}{27}$
  2. $-\frac{136}{27}$
  3. $\frac{152}{27}$
  4. $\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.
Example 1 · co-g-concmin · level facile · notes
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)?
  1. local minima at $x = -1$ and $x = 3$; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = -11$
  2. local minima at $x = 2$; $\tilde{\boldsymbol x}(P) = (2)$, $z(P) = -2$
  3. local minima at $x = -1$ and $x = 3$; $\tilde{\boldsymbol x}(P) = (3)$, $z(P) = -3$
  4. 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.
Example 2 · co-g-concmin · level facile · notes
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)?
  1. local minima at $x = -4$ and $x = 1$; $\tilde{\boldsymbol x}(P) = (-4)$, $z(P) = -1$
  2. local minima at $x = -1$; $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 8$
  3. local minima at $x = -4$ and $x = 1$; $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 4$
  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.
Example 1 · co-g-lpbox · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ 0 \end{pmatrix}$, $z(P) = 4$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$, $z(P) = 1$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ -2 \end{pmatrix}$, $z(P) = 2$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ -2 \end{pmatrix}$, $z(P) = -1$
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.
Example 2 · co-g-lpbox · level facile · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$, $z(P) = -4$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -2 \\ -1 \end{pmatrix}$, $z(P) = -1$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 2 \end{pmatrix}$, $z(P) = 5$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -2 \\ 2 \end{pmatrix}$, $z(P) = 8$
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?
  1. $F = [-3, 1]$
  2. $F = [1, 5]$
  3. $F = [0, 4]$
  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?
  1. $F = [-2, 0]$
  2. $F = [0, 2]$
  3. $F = [-1, 1]$
  4. $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.
Example 1 · co-g-diskproj · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -8 \\ -6 \end{pmatrix}$, $z(P) = 25$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -8 \\ -6 \end{pmatrix}$, $z(P) = 5$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -12 \\ -9 \end{pmatrix}$, $z(P) = 0$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -10 \\ -9 \end{pmatrix}$, $z(P) = 4$
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.
Example 2 · co-g-diskproj · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -3 \\ 4 \end{pmatrix}$, $z(P) = 25$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -3 \\ 4 \end{pmatrix}$, $z(P) = 5$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -6 \\ 8 \end{pmatrix}$, $z(P) = 0$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -5 \\ 5 \end{pmatrix}$, $z(P) = 10$
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.
Example 1 · co-g-halfplane · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 2 \end{pmatrix}$, $z(P) = 2$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 2 \end{pmatrix}$, $z(P) = 1$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 3 \\ 3 \end{pmatrix}$, $z(P) = 0$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 1 \\ 3 \end{pmatrix}$, $z(P) = 4$
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.
Example 2 · co-g-halfplane · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 2 \end{pmatrix}$, $z(P) = 8$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ 2 \end{pmatrix}$, $z(P) = 4$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 4 \\ 4 \end{pmatrix}$, $z(P) = 0$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ 4 \end{pmatrix}$, $z(P) = 16$
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.
Example 1 · co-g-meanpoint · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (-1)$, $z(P) = 26$
  2. $\tilde{\boldsymbol x}(P) = (\frac{1}{3})$, $z(P) = \frac{62}{3}$
  3. $\tilde{\boldsymbol x}(P) = (-3)$, $z(P) = 54$
  4. $\tilde{\boldsymbol x}(P) = (-2)$, $z(P) = 37$
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.
Example 2 · co-g-meanpoint · level media · notes
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)?
  1. $\tilde{\boldsymbol x}(P) = (0)$, $z(P) = 17$
  2. $\tilde{\boldsymbol x}(P) = (1)$, $z(P) = 14$
  3. $\tilde{\boldsymbol x}(P) = (-3)$, $z(P) = 62$
  4. $\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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -\frac{1}{2} \\ -\frac{3}{2} \end{pmatrix}$, $z(P) = -\frac{13}{4}$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -\frac{1}{3} \\ -\frac{5}{4} \end{pmatrix}$, $z(P) = -\frac{83}{24}$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} \frac{11}{2} \\ -\frac{15}{2} \end{pmatrix}$, $z(P) = \frac{707}{4}$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} -1 \\ -1 \end{pmatrix}$, $z(P) = -2$
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)?
  1. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 0 \\ -1 \end{pmatrix}$, $z(P) = 4$
  2. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} \frac{5}{4} \\ \frac{3}{2} \end{pmatrix}$, $z(P) = -\frac{43}{8}$
  3. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} 2 \\ -3 \end{pmatrix}$, $z(P) = 16$
  4. $\tilde{\boldsymbol x}(P) = \begin{pmatrix} \frac{1}{2} \\ -\frac{3}{2} \end{pmatrix}$, $z(P) = \frac{19}{4}$
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.