Proof that given function is convex

In summary: No problem, glad I could help! Sometimes taking a step back and looking at things from a different perspective can make all the difference. Keep up the good work with your self-study!
  • #1
PhDeezNutz
693
440
Homework Statement
Given ##f: \mathbb{R}^n \rightarrow \mathbb{R}## where ##f\left(\vec{x}\right) = \| \vec{x} \|^2## prove that ##f## is convex
Relevant Equations
Definition of convex function

A function ##f: \mathcal{C} \subset \mathbb{R}^n \rightarrow \mathbb{R}## is convex on convex set ##\mathcal{C}## if ## \forall \vec{x}, \vec{y} \in \mathcal{C}##

##f\left(\left( 1 - \lambda \right) \vec{x} + \lambda \vec{y} \right) \leq \left( 1 - \lambda \right) f \left(\vec{x} \right) + \lambda f \left( y \right)##

where ##\lambda \in \left[ 0,1 \right]##

Also the triangle inequality

## \left\| \vec{a} + \vec{b} \right\|^2 \leq \left\| \vec{a} \right\|^2 + \left\| \vec{b} \right\|^2##
Part 1

##\left\| \vec{y} \right\|^2 \leq \left\| \vec{y} \right\|^2## and since ##\lambda \in \left[ 0,1 \right] \Rightarrow \lambda^2 \leq \lambda##

So

##\lambda^2 \left\| \vec{y} \right\|^2 \leq \lambda \left\| \vec{y} \right\|^2 ##

Part 2

##\left\| \vec{x} \right\|^2 \leq \left\| \vec{x} \right\|^2## and since ##\lambda \in \left[ 0,1 \right] ## we have ##1 - \lambda \leq 1 \Rightarrow \left( 1 - \lambda \right)^2 \leq \left( 1 - \lambda \right)##

So

##\left( 1 - \lambda \right)^2 \left\| \vec{x} \right\|^2 \leq \left(1 - \lambda \right) \left\| \vec{x} \right\|^2##

Part 3 (adding Parts 1 and 2)

##\left( 1 -\lambda \right)^2 \left\| \vec{x} \right\|^2 + \lambda^2 \left\| \vec{y} \right\|^2 \leq \left( 1 - \lambda \right) \left\| \vec{x} \right\|^2 + \lambda \left\| \vec{y} \right\|^2##

Part 4 (Invoking the triangle inequality)

##\left\| \left(1 - \lambda \right) \vec{x} + \lambda \vec{y} \right\|^2 \leq \left( 1 -\lambda \right)^2 \left\| \vec{x} \right\|^2 + \lambda^2 \left\| \vec{y} \right\|^2 \leq \left( 1 - \lambda \right) \left\| \vec{x} \right\|^2 + \lambda \left\| \vec{y} \right\|^2##Taking the first and last part of the above inequality we have

##\left\| \left(1 - \lambda \right) \vec{x} + \lambda \vec{y} \right\|^2 \leq \left( 1 - \lambda \right) \left\| \vec{x} \right\|^2 + \lambda \left\| \vec{y} \right\|^2##

Therefore ##f\left(\vec{x}\right) = \left\| \vec{x} \right\|^2## is convex
 
Physics news on Phys.org
  • #2
Looks okay to me. The steps are all there. Technically, the proof should start with "Let ##\lambda \in [0, 1]## and ##\vec x, \vec y \in \mathbb R^n##" and show explicitly that $$f\left(\left( 1 - \lambda \right) \vec{x} + \lambda \vec{y} \right) \leq \left( 1 - \lambda \right) f \left(\vec{x} \right) + \lambda f \left( \vec y \right)$$
 
  • Love
Likes PhDeezNutz
  • #3
PeroK said:
Looks okay to me. The steps are all there. Technically, the proof should start with "Let ##\lambda \in [0, 1]## and ##\vec x, \vec y \in \mathbb R^n##" and show explicitly that $$f\left(\left( 1 - \lambda \right) \vec{x} + \lambda \vec{y} \right) \leq \left( 1 - \lambda \right) f \left(\vec{x} \right) + \lambda f \left( \vec y \right)$$
You'll have to forgive me I am but a filthy physics major :-p. I'm starting to self [URL='https://www.physicsforums.com/insights/self-study-basic-high-school-mathematics/']study mathematics[/URL] because there were some parts of grad school that seemed extremely hand wavy to me. I'll have to learn proof etiquette.

Thank you for reviewing my proof.
 
  • Like
Likes PeroK
  • #4
  • Like
Likes PhDeezNutz
  • #5
532CAC02-805F-401B-B57A-65A81C2A24F2.jpeg


I’m trying to follow this proof of ##x^4## being strictly convex but I don’t understand how they got rid of the cross terms with step ##\left( 2 \right)##
 
  • #6
PhDeezNutz said:
View attachment 293510

I’m trying to follow this proof of ##x^4## being strictly convex but I don’t understand how they got rid of the cross terms with step ##\left( 2 \right)##
The cross terms are non-negative.
 
  • Like
Likes PhDeezNutz
  • #7
PeroK said:
The cross terms are non-negative.

I’m confused. To me that is precisely the reason we can’t get rid of them in the end. Let me be more explicit.

##\left\| \lambda \vec{x} + \left( 1 - \lambda \right)\vec{y} \right\|^4 = \left( \left\| \lambda \vec{x} \left( 1 - \lambda \right) \vec{y} \right\|^2 \right)^2 \leq \left( \lambda \left\| \vec{x}\right\|^2 + \left(1 - \lambda \right) \left\| \vec{y} \right\|^2 \right)^2##

Where I've used the fact that ##\left\| \vec{x} \right\|^2 ## is convex to get to the ##/leq## inequality

To me the only thing I can do now is "foil it out"

## = \lambda^2 \left\| \vec{x} \right\|^4 + 2 \lambda \left( 1 - \lambda \right) \left\| \vec{x} \right\|^2 \left\| \vec{y} \right\|^2 + \left( 1 - \lambda \right)^2 \left\| \vec{y} \right\|^4##

We know that both ##\lambda , \left(1 - \lambda \right) \lt 1 \Rightarrow \lambda^2 , \left( 1 - \lambda \right)^2 \lt \lambda, 1 - \lambda ##

## \lt \lambda \left\| \vec{x} \right\|^4 + 2 \lambda \left( 1 - \lambda \right) \left\| \vec{x} \right\|^2 \left\| \vec{y} \right\|^2 + \left( 1 - \lambda \right) \left\| \vec{y} \right\|^4##

So all in all

##\left\| \lambda \vec{x} + \left( 1 - \lambda \right) \right\|^4 \lt \lambda \left\| \vec{x} \right\|^4 + 2 \lambda \left( 1 - \lambda \right) \left\| \vec{x} \right\|^2 \left\| \vec{y} \right\|^2 + \left( 1 - \lambda \right) \left\| \vec{y} \right\|^4 ##

Don't know how to get rid of the middle cross term ##2 \lambda \left( 1 - \lambda \right) \left\| \vec{x} \right\|^2 \left\| \vec{y} \right\|^2##
 
  • #8
You're right. They are simply applying the convex property of ##x^2## twice. There's no expansion needed.
 
  • Like
Likes PhDeezNutz
  • #9
PS It's cometimes easier to generalise things. Suppose ##f: \mathbb R_+ \rightarrow \mathbb R_+## is convex and increasing, then ##f \circ f## is convex and increasing:

Let ##t \in [0, 1]## and ##x, y \in \mathbb R_+##. We have:

$$f(tx + (1-t)y) \le tf(x) + (1-t)f(y) \ \ (\text{as} \ f \ \text{is convex})$$$$\Rightarrow \ f[f(tx + (1-t)y)] \le f[tf(x) + (1-t)f(y)] \ \ (\text{as} \ f \ \text{is increasing})$$ $$\le tf[f(x)] + (1-t)f[f(y)] \ \ (\text{as} \ f \ \text{is convex and} \ f(x), f(y) \in \mathbb R_+)$$$$\therefore f \circ f(tx + (1-t)y) \le tf \circ f(x) + (1-t)f \circ f(y)$$$$\therefore f \circ f \ \text{is convex}$$It's easy to show that ##f \circ f## in increasing, although not a bad exercise, in fact.
 
  • Love
Likes PhDeezNutz
  • #10
PeroK said:
You're right. They are simply applying the convex property of ##x^2## twice. There's no expansion needed.
I actually see it now. Wow this has confused me for several days.All we needed to do was make a change of variables

##\left\| \vec{x} \right\|^2 \mapsto X \in \mathbb{R} ##

##\left\| \vec{y} \right\|^2 \mapsto Y \in \mathbb{R} ##

and repeat the argument and replace ##X## and ##Y## at the end.

Can't believe I didn't see it until now. Thank you for your help.
 

What is a convex function?

A convex function is a function where any line segment connecting two points on the graph of the function lies entirely above or on the graph. In other words, the function is always "curving up" and never "curving down".

How do you prove that a given function is convex?

To prove that a given function is convex, you can use the definition of convexity or the second derivative test. The definition of convexity states that if the second derivative of the function is always positive, then the function is convex. The second derivative test involves taking the second derivative of the function and checking if it is always positive.

What are the benefits of knowing if a function is convex?

Knowing if a function is convex can be useful in optimization problems. Convex functions have a unique minimum, making them easier to optimize compared to non-convex functions. Additionally, convex functions have nice properties that make them easier to work with mathematically.

Can a function be both convex and concave?

No, a function cannot be both convex and concave. A function is either convex or concave, depending on the direction of its curvature. A convex function curves upwards, while a concave function curves downwards.

Are there any real-life applications of convex functions?

Yes, convex functions have many real-life applications. They are commonly used in economics, finance, and engineering for optimization problems. For example, in economics, convex functions are used to model utility functions and production functions. In finance, they are used to model risk and return trade-offs. In engineering, they are used in control systems and signal processing.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
563
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
20
Views
467
  • Calculus and Beyond Homework Help
Replies
10
Views
386
  • Calculus and Beyond Homework Help
Replies
2
Views
837
  • Calculus and Beyond Homework Help
Replies
4
Views
821
  • Introductory Physics Homework Help
2
Replies
64
Views
2K
  • Calculus and Beyond Homework Help
Replies
14
Views
671
  • Calculus and Beyond Homework Help
Replies
2
Views
714
Back
Top