Unable to use lagrange to solve 2 varable functions in modeling toolkit

I took this stuff, but I don’t remember much of it. T means the transvers of a matrix? How do i create a Hessian matrix from quadratic equations?

What about GalacticOptim?

Is JuMP insufficient for your needs? It sounded like you already have something working.

If you have a limited background in linear algebra and nonlinear optimization in general, I’d suggest you stick with JuMP.

The matrices was suggested, and I was currious about GalacticOptim, but I think i will use JuMP mostly.

The name Q usually suggests an orthogonal matrix (real-valued) or unitary matrix (same idea for complex matrices. Key property is Q^TQ = I (for real-valued orthogonal Q), or Q^* Q = I (for complex-valued, unitary Q).

Is that the term you’re looking for? Orthogonal/unitary matrices are kind of “unit” matrix, in that they don’t scale vectors, just rotate them. Kind of like a complex constant c with unit magnitude.

1 Like

yes

1 Like

Just a quick comment on that: solving the associated linear system is equivalent if the QP is convex and you only have equality constraints. This seems to be the case here :+1:

Solving a general QP (with inequalities and possibly nonconvex objective) is much more difficult (NP-hard if nonconvex).

1 Like

Well, strictly speaking, in this particular case the unconstrained problem (the function to be maximized) is nonconvex (the eigvals of Q are -1 and 1). It is only after imposing the equality constraints that the problem turns into a convex one. This is checked by computing the reduced/projected Hessian, which turns out negative.

I double checked and this is aligned with the exposition in the dedicated section 16.1 in Nocedal’s popular bible of optimization.

Yep, you’re absolutely right: the reduced Hessian (= the Hessian projected on the nullspace of the active constraints) should be positive (resp. negative) definite in the case of minimization (resp. maximization). In your case the problem is concave, which is the favorable case when you maximize.

I’m only interested in the positive quadrant.