HW2¶
1. Exercise 3.18, 3.57 of Convex Optimization¶
a. \(f(\mathbf{X}) = tr(\mathbf{X}^{-1})\) is convex on \(dom f=S_{++}^n\)
b. \(f(\mathbf{X}) = (\det(\mathbf{X}))^{1/n}\) is concave on \(dom f=S_{++}^n\)
Proof
a. consider \(g(t)=f(X+tY)\), where \(X\in S_{++}^n, Y\in S^n\). We have
Since \(UX^{-1}U^T\in S_{++}^n\), we get \((UX^{-1}U^T)_{ii}>0\).
And \(X+tY\succ 0\) iif \(I+t\Lambda\succ 0\).
If \(Y\neq 0\), then \(\Lambda \neq 0\), when \(1+t\lambda_i>0, i=1,..., n\)
So \(g(t)\) is strictly convex.
And then, we have \(f(\mathbf{X}) = tr(\mathbf{X}^{-1})\) is strictly convex.
b. Similarly, we have
Since \(\det(X)>0\), we get \(g(t)\) is concave. (By the way, we deduce that geometric mean is concave.)
And then we have \(f(\mathbf{X}) = (\det(\mathbf{X}))^{1/n}\) is concave.
2. Exercise 2.12 of 最优化:建模、算法与理论, Exercise 3.36 of Convex Optimization¶
Derive the conjugates of the following functions
a. Max function. \(f(\mathbf{x})=\max_{i=1,..,n} x_i\) on \(R^n\).
b. Sum of largest elements. \(f(\mathbf{x}) = \sum_{i=1}^r x_{[i]}\) on \(R^n\).
c. Log function of the Matrix: \(f(\mathbf{X}) = − \ln \det(\mathbf{X}) \).
Solution
a.
- If \(y_i < 0\) for some \(i\), then \(f^*(y) \ge \sup_{x_i < 0}\{y^T (0, ..., x_i, ..., 0) - 0\} = +\infty \).
- If \(\sum_{i=1}^n y_i \neq 1\), then \(f^*(y) \ge \sup_{t}\{y^T ( t, ..., t) - t\} = +\infty \).
- If \(\sum_{i=1}^n y_i = 1\) and \(y_i \ge 0\) for all \(i\), then
\(f^*(y) = \sup_{x\in dom f} \{ y^T x-f(x)\} \le \sum_{i=1}^n y_i\max_{i=1}^n x_i - \max_{i=1}^n x_i = 0\).
So we have
b.
Similarly,
- If \(y_i < 0\) for some \(i\), then \(f^*(y) \ge \sup_{x_i < 0}\{y^T (0, ..., x_i, ..., 0) - 0 \} = +\infty \).
- If \(y_i >1\) for some \(i\), then \(f^*(y) \ge \sup_{x_i >0}\{y^T (0, ..., x_i, ..., 0) -x_i \} = +\infty \).
- If \(\sum_{i=1}^n y_i \neq r\), then \(f^*(y) \ge \sup_{t}\{y^T ( t, ..., t) - rt\} = +\infty \).
- If \(\sum_{i=1}^n y_i = r\) and \(0 \le y_i \le 1\), then
It can be get when \(x=0\) Summarise:
Warning
c.
Since \(f(\mathbf{X}) = − \ln \det(\mathbf{X}) \),
根据奇异值分解, 设 \( Y = U D V^T \), 其中 \( D \) 是对角矩阵, \( U, V \) 是正交矩阵,且 \( \det(U)=\det(V)=1 \) 。
令 \( X=U \Lambda V^T \),则 \(tr(Y^TX)=tr( V D U^T U \Lambda V^T) = \sum_{i=1}^n d_i \lambda_i \).
若 \(d_1 > 0\),令 \( \lambda_1 = t^{n-1}, \lambda_i = 1/t, i\geq 2 \),那么
若 \(d_1 < 0\),令 \( \lambda_1 = -t^{n-1}, \lambda_2 = -1/t, \lambda_i = 1/t, i\geq 3 \),那么
Solution
c.
Since \(f(\mathbf{X}) = − \ln \det(\mathbf{X}) ,\quad \text{dom}f=S^n_{++} \), we claim that \(f(X)\) is convex! 最优化:建模、算法与理论 例 2.5
For \(\mathbf{Y} \in S^n\)
Let \(Y = U\Lambda_Y U^T\), where \(U\) is an orthogonal matrix, \(\Lambda_Y\) is a diagonal matrix.
Then,
If there is a \(\lambda_i \ge 0\),Let
Then
So, \(f^*(Y) = +\infty\) if \((-Y) \notin S^n_{++}\).
On th other hand, if \((-Y) \succ 0\), since \(Tr(Y^TX)\) is linear, and \( -\ln \det(X) \) is convex, we know that
is concave!
So if there is an \(X\) such that \(\nabla g_Y(X) = 0 \), then \(g_Y(X) = f^*(Y)\) is the maximum value . However
Hence \((-Y)\succ 0\), we can let \(X = (-Y)^{-1} = -Y^{-1} \in S^n_{++} \), where
Summary, we get
3. Exercise 2.6 of 最优化:建模、算法与理论¶
Compute the gradient of the functions with matrix variables.
a. \(f (\mathbf{X}) = Tr (\mathbf{X}^T\mathbf{A}\mathbf{X})\), where \(\mathbf{X} ∈ R^{m×n}\), \(\mathbf{A} ∈ R^{m×m}\) (may not symmetrix);
b. \(f (\mathbf{X}) = \ln \det(\mathbf{X})\), where \(\mathbf{X} ∈ R^{n×n}\) and domain is \(\{\mathbf{X} | \det(\mathbf{X}) > 0\}\).
Solution
a.
So, \( \nabla f(X) = AX+A^TX \)
b.
Let
So, \( \nabla f(X) = X^{-T} \)