Say I wish to find the minimum value of the determinant of a symmetric matrix under the condition that the matrix be positive definite. So I attempt:
M = {{a,0},{0,b}}
FindMinimum[{Det[M],a>=1,b>=1,PositiveDefiniteMatrixQ[M]},{a,b}]
This returns an error that Constraints in {False} are not all equality or inequality constraints...
, suggesting to me that the PositiveDefiniteMatrixQ
is being evaluated immediately for arbitrary a,b
and not evaluated each iteration for a,b
values.
Then I might try to delay the evaluation of PositiveDefiniteMatrixQ
with Delayed
, which returns a similar error Constraints in {Delayed[PositiveDefiniteMatrixQ[M]],a>=1,b>=1} are not all equality or inequality constraints
.
How can I impose such a constraint on the FindMinimum
function?
The specific problem I am trying to minimise involves two coupled matrices, one 2x2 and one 4x4. Simplified as far as possible while still exhibiting an issue with the Thread[Eigenvalues[B] > 0]
approach:
A = {{a, 0}, {0, d^2*b + a - 2 d*c*Sign[d]}};
B = {{a, 0, c, 0}, {0, a, 0, -c}, {c, 0, b, 0}, {0, -c, 0, b}};
min = FindMinimum[{
Det[A],
a^2 + b^2 - 2 c^2 >= 0,
Thread[Eigenvalues[B] > 0],
a >= 1, b >= 1, -1 < d < 1},
{a, b, c, {d, 0}}]
Thread[Eigenvalues[B /. min[[2]]] > 0]
M
is symmetric, you can useFindMinimum[{Det[M], a >= 1, b >= 1, Thread[Eigenvalues[M] > 0]}, {a, b}]
? $\endgroup$Thread[...]
returns {True,True,False,False} (for a 4x4 matrix) so the constraint is not being respected $\endgroup$M
is symmetric and (2) the 4X4 example you mention in the comment? $\endgroup$