About Gradient Definition

71 Views Asked by At

I am learning about gradient and I came across a comment from in this question: (Gradient of a Vector Valued function) that says that we can view a gradient of a function f: R2 -> R1 as a function that maps elements from R2 to element of L(R2, R), were L is a linear application from R2 to R1, why this L(R2, R), I can't seems to comprehend it, I was always thinking that gradient of f is a function that takes R2 and returns R2.

1

There are 1 best solutions below

5
On BEST ANSWER

I think you are mixing up to different views of the gradient here:

The gradient of $f$ at a single point $x \in \mathbb{R}^2$ is a row vector $\nabla f(x)$ or, equivalently, $1 \times 2$ matrix. As a vector it just gives the direction of the steepest ascent (of $f$). Viewed as a matrix, we can apply it to any vector $v \in \mathbb{R}^2$ to get the rate of change of $f$ in the direction of $v$. That is, $\nabla f(x)$ is a linear mapping from $\mathbb{R}^2$ to $\mathbb{R}$. Intuitively, the gradient of $f$ at a point $x \in \mathbb{R}^2$ is, thus, a function that takes a direction (i.e. a vector $v \in \mathbb{R}^2$) and gives you the rate of change of $f$ in the direction of this vector (at point $x$): $\nabla f(x)\cdot v$

The gradient of $f$ is a function from $\mathbb{R}^2$ to $\mathbb{R}^{1\times 2}$ which takes a point $x \in \mathbb{R}^2$ and gives you the gradient of $f$ at that point (and, thus, a $1\times 2$-matrix $\nabla f(x)$).

Alternatively, you could also incooperate the first view into the second one and say that the gradient is a function $$\nabla f: \mathbb{R}^2 \to L(\mathbb{R}^2,\mathbb{R}), x \mapsto (\nabla f(x): \mathbb{R}^2 \to \mathbb{R}, v \mapsto \nabla f(x)\cdot v)$$