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

Let $$f(a,b,c,d)=\frac{(a-b)*(c-d)}{\sqrt{(a-b)^2+(c-d)^2}},$$ where $a,b,c,d$ are variables.

Is this function convex or non-convex?

share|cite|improve this question
Why are you writing an equation? – Giuseppe Negro Feb 3 '13 at 18:45
Assuming your function is the LHS, compute, say, $\frac{\partial^2}{\partial a^2}$ and notice it is negative for $a>b, c>d$... – user7530 Feb 3 '13 at 18:51
What is(are) your variable(s) WRT convexity? – vonbrand Feb 3 '13 at 19:06
updated and convexity only WRT two variables? – Nob Jame Feb 3 '13 at 19:40
up vote 0 down vote accepted

We have $$\frac{\partial f}{\partial a} = \frac{c-d}{\sqrt{(a-b)^2+(c-d)^2}}-\frac{(a-b)^2(c-d)}{\left[(a-b)^2+(c-d)^2\right]^{3/2}}=\frac{(c-d)^3}{\left[(a-b)^2+(c-d)^2\right]^{3/2}}$$ $$\frac{\partial^2f}{\partial a^2} = -\frac{3(a-b)(c-d)^3}{\left[(a-b)^2+(c-d)^2\right]^{5/2}},$$ which is negative when $a>b$ and $c>d$. Therefore the Hessian of $f$ cannot be positive semi-definite, and so $f$ is not convex.

share|cite|improve this answer

The pre-requisite of a function to be convex is: the domain set of the function must be convex. ( A set C is convex if and only if for any ${ x }_{ 1 },{ x }_{ 2 }\in C$, and any $\theta$ with $0\le \theta \le 1$: $$\theta { x }_{ 1 }+(1-\theta ){ x }_{ 2 }\in C$$

It's easy to show that the domain set of the function you have mentioned is not convex.

e.g. $$(x,0,y,0), \quad(0,x,0,y)\in dom \quad f$$

but $$\frac { 1 }{ 2 } (x,0,y,0)+(1-\frac { 1 }{ 2 } )(0,x,0,y)=\frac { 1 }{ 2 } (x,x,y,y)\notin dom\quad f$$

So the domain set of the function is not a convex set. Therefore the function is not a convex function.

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.