Defining Gradient for f(x)= ||x-a||

  • Thread starter Black Orpheus
  • Start date
  • Tags
    Gradient
In summary, the gradient for f(x) = ||x-a|| is given by (x-a)/||x-a||, which is a unit vector in the direction of x-a.
  • #1
Black Orpheus
23
0
One last question for tonight... If you let f: R^n ---> R (Euclidean n-space to real numbers) and f(x) = ||x-a|| for some fixed a, how would you define the gradient in terms of symbols and numbers (not words)?
 
Physics news on Phys.org
  • #2
Start by writing out the definition for ||x - a||
 
  • #3
forgot to add that it's for all x not equal to a
 
  • #4
||x-a|| = sqrt[(xsub1 - a)^2 +...+ (xsubn - a)^2]

so gradient = (partial derivative of sqrt[(xsub1 - a)^2] , ... , partial derivative of sqrt[(xsubn - a)^2])?
 
  • #5
For [tex]f(x)=\| x-a\| = \sqrt{(x_1-a_1)^2+\cdots +(x_n-a_n)^2}[/tex]

we have

[tex]\nabla f(x) = \left< \frac{\partial }{\partial x_1},\ldots , \frac{\partial }{\partial x_n}\right>\cdot \sqrt{(x_1-a_1)^2+\cdots +(x_n-a_n)^2} [/tex]
[tex]\left< \frac{\partial }{\partial x_1}\sqrt{(x_1-a_1)^2+\cdots +(x_n-a_n)^2},\ldots , \frac{\partial }{\partial x_n}\sqrt{(x_1-a_1)^2+\cdots +(x_n-a_n)^2}\right> [/tex]
[tex]= \left< \frac{x_1-a_1 }{\sqrt{(x_1-a_1)^2+\cdots +(x_n-a_n)^2}},\ldots , \frac{x_n-a_n }{\sqrt{(x_1-a_1)^2+\cdots +(x_n-a_n)^2}}\right> [/tex]
[tex]= \frac{1}{\sqrt{(x_1-a_1)^2+\cdots +(x_n-a_n)^2}}\left< x_1-a_1 ,\ldots , x_n-a_n \right> [/tex]
[tex]= \frac{x-a}{\| x-a\| }[/tex]

which is a unit vector in the direction of x-a.
 
Last edited:

1. What is the definition of gradient for a function?

The gradient of a function is a vector that points in the direction of the steepest increase of the function at a given point. It is perpendicular to the level curves or surfaces of the function at that point.

2. How is the gradient of a function calculated?

The gradient of a function is calculated by taking the partial derivatives of the function with respect to each of its variables and combining them into a vector. For example, for a function f(x,y), the gradient would be (∂f/∂x, ∂f/∂y).

3. What does ||x-a|| mean in the function f(x)= ||x-a||?

The double bars, ||x-a||, represent the magnitude or length of the vector (x-a). This is also known as the distance between the point x and the point a in a multi-dimensional space.

4. How does the gradient of f(x)= ||x-a|| change at different points?

At different points, the gradient of f(x)= ||x-a|| will change in direction and magnitude, depending on the location of the point x in relation to the point a. At points closer to a, the gradient will have a larger magnitude as the function is steepening, while at points further away from a, the gradient will have a smaller magnitude as the function is flattening.

5. Why is the gradient important in mathematical optimization?

The gradient is important in mathematical optimization because it tells us the direction in which a function is changing the most rapidly. This is useful in finding the maximum or minimum values of a function, which is often the goal of optimization problems. By following the direction of the gradient, we can reach the maximum or minimum point in the shortest amount of steps.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
347
  • Calculus and Beyond Homework Help
Replies
1
Views
455
  • Calculus and Beyond Homework Help
Replies
3
Views
164
  • Calculus and Beyond Homework Help
Replies
3
Views
466
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
2
Replies
58
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
761
  • Calculus and Beyond Homework Help
Replies
34
Views
2K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
Back
Top