Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a model - function of two vectors $A$ and $B$. I have data that I want to fit to the model and find the model's parameters. The function needs to be convex to find the parameters using optimization; my question is: is the function convex?

The parameters are vectors $A$ and $B$ of $N$ elements. The data is an array $N\times N$. The function models element $M_{i,j}$ of the array as

$$ M_{i,j} = c_1 {A_iA_j\over{\sum{A}}} + c_2{A_iB_j+c_3A_jB_i\over{\sum{B}}} $$

And want to minimize

$$ \sum|Data_{i,j}-M_{i,j}|^2 $$

share|cite|improve this question
Are you asking whether the final sum is a convex function of $(A,B)$? – Harald Hanche-Olsen Feb 27 '12 at 12:36
@HaraldHanche-Olsen: Yes – Jakub M. Feb 27 '12 at 12:38
Have you tried computing the Hessian? Away from the hyperplanes $\sum A = 0$ and $\sum B = 0$ the function is algebraic, and can you can compute explicitly the Hessian. – Willie Wong Feb 27 '12 at 13:38
up vote 1 down vote accepted

As Willie suggests, taking the Hessian shows the function is not convex. Consider taking $N=2, c_2=0, c_1=1$ and $A_{1,2}>0$. Then the second derivatives are all negative.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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