I need to solve the problem shown below, but I do not know what optimization libraries can solve this problem.

optimization target

The optimization target is a 3x3 matrix A and a 3D vector b, given the 3D vectors xi where i=1,2,...,N.

I need a C/C++ optimization library, hopefully open source, light and fast. If you have any idea, help me. I would appreciate more if you let me know the related class or method in the library. Thank you!

  • You can't get smaller than the trivial A=0 and b=0. Maybe there is another condition that you want to be fullfilled?
    – chtz
    May 13, 2017 at 16:44

1 Answer 1


In your place I would unpack the matrix to a vector. From this point, we have a continuous, vectoric, but nonlinear problem. It is nonlinear, because it depends quadratically from x. But it is very easily derivable, and surely doesn't have separate local optimum-points.

Thus it can be easily solved by any nonlinear optimization solution, I would suggest org.apache.commons.optim.nonlinear

  • I does not matter that the equation depends quadratically on x_i, since they are known.
    – chtz
    May 13, 2017 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.