provide form of the objective function and other constraints
Fei Zhu
• 335
• 2
• 9

I'm solving a constrained optimization for matrix $$\mathbf{A}$$ with dimension 6x6, where one of the constraints is $$\mathrm{det}(\mathbf{A})>0$$. I use the NLopt package to solve my problem and provide value&&gradient routines of the objective and constraints. As described in the matrix cookbook, the gradient of matrix determinant is computed as $$\frac{\partial \mathrm{det}(\mathbf{A})}{\partial \mathbf{A}} = \mathrm{det}(\mathbf{A})(\mathbf{A}^{-1})^T$$ and involves matrix inverse. During the optimization iterations, one intermediate solution might violates the constraint and leads to singular matrix $$\mathbf{A}$$. The singular $$\mathbf{A}$$ will halt the optimization because evaluation of constraint gradient throws a "not invertible" exception.

One possible solution is to use optimization algorithms that do not need the gradient of constraints. But I wonder if there's any workaround if I use gradient-based algorithms. As far as I know, methods using gradient information would converge faster.

=============== Edit =================

The objective function is of the form:

$$\min_{\mathbf{A}}\quad\sum_i\frac{1}{2}(\mathbf{E}_i^T\mathbf{A}\mathbf{E}_i-t_i)^2$$

where $$\mathbf{E}_i$$ are known 6x1 vectors and $$t_i$$ are knwon scalars. Other constraints enforced on $$\mathbf{A}$$ are: (1) $$\mathbf{A}$$ is symmetric matrix (2) entries of $$\mathbf{A}$$ is non-negative

Fei Zhu
• 335
• 2
• 9

# Optimization with matrix determinant as constraint

I'm solving a constrained optimization for matrix $$\mathbf{A}$$, where one of the constraints is $$\mathrm{det}(\mathbf{A})>0$$. I use the NLopt package to solve my problem and provide value&&gradient routines of the objective and constraints. As described in the matrix cookbook, the gradient of matrix determinant is computed as $$\frac{\partial \mathrm{det}(\mathbf{A})}{\partial \mathbf{A}} = \mathrm{det}(\mathbf{A})(\mathbf{A}^{-1})^T$$ and involves matrix inverse. During the optimization iterations, one intermediate solution might violates the constraint and leads to singular matrix $$\mathbf{A}$$. The singular $$\mathbf{A}$$ will halt the optimization because evaluation of constraint gradient throws a "not invertible" exception.

One possible solution is to use optimization algorithms that do not need the gradient of constraints. But I wonder if there's any workaround if I use gradient-based algorithms. As far as I know, methods using gradient information would converge faster.