Questions tagged [scalar-fields]

A scalar field is a function of the type $X\to \Bbb R$, where $X$ may be an open set in $\mathbb R^n$ or more generally a smooth manifold.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

How to find the directional derivative at every point?

Given a function $f: \mathbb{R}^2 \to \mathbb{R}$ defined by $$f(x,y) = \begin{cases} \left( x^2 + y^2 \right) \cos \left(\frac{1}{x^2 + y^2} \right) & \text { if } (x,y) \neq (0,0)\\ 0 & \...
user avatar
  • 11
-5 votes
0 answers
24 views

I want someone to explain example 1 [duplicate]

enter image description hereenter image description here I want someone to explain example 1 clearly
user avatar
0 votes
1 answer
28 views

Surface integral of hemisphere

In a scalar field I need to calculate the surface integral of this: $$\iint_{\Sigma}\frac{d \sigma}{\sqrt{x^2+y^2+(z+R)^2}}$$ with $\Sigma$ the upper half of the sphere $x^2+y^2+z^2=R^2$ The formula ...
user avatar
0 votes
1 answer
17 views

Partial derivatives in scalar field taylor expansion

$\newcommand{\v}[1]{\mathbf{#1}} \newcommand{\abs}[1]{\lvert#1\rvert} \newcommand{\dd}[1]{\mathrm{d}#1}$ In our lecture notes we derived the following formula for the Taylor expansion of a scalar ...
user avatar
0 votes
0 answers
37 views

What makes complex numbers so dominant among two-dimensional scalar fields?

Complex numbers are a two-dimensional field. But other 2d fields can be defined. Edit: That is incorrect, no other 2d scalar field can be defined. For example, the standard vector addition and the ...
user avatar
1 vote
1 answer
62 views

Calculate $\frac{\partial}{\partial \mathbf{A}}\lVert \mathbf{A}^{\top}\mathbf{AX}-\mathbf{X} \rVert _{F}^{2}$

Calculate $\frac{\partial}{\partial \mathbf{A}}\lVert \mathbf{A}^{\top}\mathbf{AX}-\mathbf{X} \rVert _{F}^{2}$ with $\mathbf{A}\in\mathbb{R}^{M\times N}$ and $\mathbf{X}\in\mathbb{R}^{N\times D}$, and ...
user avatar
  • 158
1 vote
1 answer
42 views

Find gradient and Hessian for optimization problem

Given $$S_\mu(u) := \sum_{i=1}^n \sqrt{u_i^2+\mu^2}-\mu$$ a smoothed $1$-norm. Using Newton's method, calculate $$\min_{u\in \mathbb{R}^n}\frac{1}{2} \|u-u_0\|_2^2 + \alpha S_\mu(\nabla u)$$ where $$(\...
user avatar
1 vote
0 answers
17 views

Can the ensemble of Fourier transforms of Gaussian random fields be given explicitly by a pdf?

I have an ensemble of Gaussian random fields $X(s)$ over coordinates $s$. The pdf of an individual realisation of the field taking a value $x(s)$ at coordinate $s$ is given by $$ f_x(x(s))=\frac{1}{(2\...
user avatar
1 vote
1 answer
29 views

Calculating gradient ascent vector from a scalar field

For a computer program, given an nxn grid of scalar values (which can be viewed as a height field), I need to calculate the ...
user avatar
  • 119
1 vote
1 answer
32 views

Hessian of quadratic objective function

I have the quadratic function $$f(\boldsymbol{x}) = \frac{3}{2} \left (x_{1}^{2}+x_{2}^{2} \right) + (1+a) x_{1} x_{2} - \left(x_{1} + x_{2} \right) + b$$ where $a, b \in \Bbb R$ are unknown ...
user avatar
  • 121
2 votes
1 answer
79 views

Directional derivative definition versus gradient

Given the following scalar field $$f(x,y) = \begin{cases} \frac{y^3}{x^2+y^2} & (x,y)\ne(0,0) \\ 0 & (x,y)=(0,0) \end{cases}$$ find its directional derivative ...
user avatar
1 vote
2 answers
63 views

Time derivative of the function $ t \mapsto \frac{1}{2}\dot{f}(t)^T A (f)\dot{f}(t) $

I have been trying to differentiate the following function with respect to time $$ t \mapsto \frac{1}{2}\dot{f}(t)^T A (f)\dot{f}(t) $$ but I am struggling with the chain rule for matrix calculus. ...
user avatar
1 vote
0 answers
62 views

Minimizing $\|A−XB\|^2_F$

Find a closed form solution for $$\underset{X}{\operatorname{argmin}} \|A−XB\|^2_F$$ where $\| \cdot \|_F$ denotes the Frobenius norm. I have found this thread. Not sure if it helps here though. Any ...
user avatar
1 vote
1 answer
51 views

Derivative of diagonal matrix $\mbox{diag}(X 1_n) $ with respect to $X$

For a symmetric matrix $X \in \Bbb R^{n\times n}$, let $$f(X) := u^\top \mbox{diag}(X 1_n) v$$ What is the derivative of $f$ with respect to $X$? $X 1_n$ is the row-wise summation to generate a vector ...
user avatar
  • 211
1 vote
1 answer
63 views

Differential of quadratic form

I'm having trouble understanding this: if $\phi(x)=x^{T}Ax$, where $A$ is a matrix of constraints. Then, the differential of $\phi$: $\mathrm{d} \phi=(\mathrm{d} x)^{T} A x+x^{T} A \mathrm{~d} x=x^{T} ...
user avatar
  • 13
0 votes
1 answer
43 views

Gradient of matrix function using the trace

For the function \begin{equation} \label{eq:sparsecost} \mathcal{C}\left(\mathbf{B}, \mathbf{A}\right) = \frac{1}{K} \sum_{k=1}^K \left ( \sum_j \left[ {S}_{kj} - \sum_i {A}_{ki} \: {B}_{ij} \right]^2 ...
user avatar
1 vote
1 answer
49 views

Correct definition of derivatives of higher dimensions - Derivative of quadratic form - From the perspective of notation

I am studying optimal control (for an introductory course) and we have to know the derivatives of quadratic forms. Out teacher said that the following are true: $$\frac{\partial Ax}{\partial x} = A^T $...
user avatar
0 votes
3 answers
60 views

Gradient of $\mbox{trace}(Axx^TB)$

I am trying to find the gradient $$\nabla \mbox{trace}(Axx^TB)$$ where both $A$ and $B$ are $n \times n$ matrices, and $x$ is an $n$-length column vector I'm not exactly sure how to approach this ...
user avatar
0 votes
2 answers
71 views

Can the field (underlying a vector space) always be considered a 1-dimensional vector space?

For example. We know that a linear transformation is exactly the unique homomorphism between vector spaces, therefore applying a linear transformation to a vector always leads to a vector. At the ...
user avatar
1 vote
0 answers
53 views

Correlation of the convolution between a uniformly distributed random noise and a Gaussian function

Given a random scalar field $u(x,y)$ for $x,y \in D \subset \mathbb{R}^2$ where $D$ is a rectangular box centered at $(0,0)$, the value of $u(x,y)$ at an arbitrary point $(x,y)$ is uniformly ...
user avatar
  • 143
-1 votes
1 answer
54 views

Can a unit vector be treated as a vector field?

Say you have the kth component of a vector field: $$\phi \hat{k}$$ Can we treat this as a scalar field $\phi$ multiplied by the vector field $\hat{k}$? EDIT: So, if you wanted to find the curl of $\...
user avatar
  • 301
0 votes
1 answer
60 views

Gradient of quadratic vector function [duplicate]

I'm struggling with this very simple gradient question. Where... Now I've already been told the answer is Ax + b, but I can't work out how to get to the first term. Intuitively it looks like a ...
user avatar
1 vote
1 answer
75 views

Gradient of linear scalar field with respect to matrix

I am following the book Mathematics for Machine Learning to study the math necessary to understand machine learning papers. On page 158, the authors list these results about gradients of scalar fields ...
user avatar
  • 13
1 vote
2 answers
344 views

Proof for the Laplacian of scalar fields using index notation [closed]

For scalar fields Φ and Ψ, the Laplacian is defined by $$∇^2(ΦΨ)=(∇^2Φ)Ψ+2∇Φ\cdot∇Ψ+Φ∇^2Ψ$$ where $∇$ is the usual del operator and $∇^2$ is the Laplacian. How can I prove this relation? I tried the ...
user avatar
  • 21
0 votes
1 answer
62 views

Gradient of $\sum_{i,j}^n A_{ij}x_i^TB^iC{B^j}^Tx_j$

Suppose I have a symmetric matrix $A$ and $C$ and matrices $B_i$ of respective size. Then for vectors (of different dimension) $x_i$ I define the function $$f(x_1,\dots,x_n)=\sum_{i,j=1}^n A_{ij}x_i^...
user avatar
  • 3,847
1 vote
2 answers
139 views

Compute the derivative of $\mbox{tr}(AXB)$ with respect to $X$

Given matrices $A, B \in \Bbb R^{2 \times 2}$, compute the derivative of $\mbox{tr}(AXB)$ with respect to $X \in \Bbb R^{2 \times 2}$. I know that $\frac{\partial tr(AXB}{\partial X}$ is same like $...
user avatar
0 votes
2 answers
49 views

Computing gradients with chain rule

Let $x_{1}, \dots, x_{N}$ be a sequence of vectors in $\mathbb{R}^{n}$ and $A$ be an $n \times n$ matrix. Let $f: \mathbb{R} \to \mathbb{R}$ be a smooth (as smooth as you want) function. We define $$ ...
user avatar
  • 1,218
1 vote
1 answer
33 views

Function with non-Lipschitzian gradient satisfies descent lemma

It is well-known that if $f:\mathbb{R}^n\rightarrow \mathbb{R}$ is a $C^1$ function with Lipschitz gradient, then $f$ satisfies the descent condition $$f(y)\le f(x)+\left\langle\nabla f(x),y-x\right\...
user avatar
0 votes
1 answer
31 views

How to compute the gradient of the $2$-norm of this trigonometric function?

I wonder how to compute the gradient of the following scalar field $$L(x) := \| \sin \left( W_2 \cos \left( W_1 x \right) \right) \|_2^2,$$ where $r \in [1, 95]$, $W_1 \in \mathbb{R}^{r \times 100}$ ...
user avatar
  • 111
1 vote
2 answers
70 views

Calculate the gradient of $F(x) := \frac{|Ax|^2}{|x|^2}$

Given matrix $A \in \mathbb{R}^{k \times n}$, define scalar field $F : \mathbb{R}^{n}\ \backslash \{ 0\} \to \mathbb{R}$ by $$F(x) := \frac{|Ax|^2}{|x|^2}$$ and find $\nabla F$ I have tried to write ...
user avatar
  • 27
0 votes
0 answers
10 views

Question regarding plotting a Scalar Field that has 3 input variables and 1 output variable

I have a hard time understanding how the equipotential surfaces for a fucntion that has 3 inputs and 1 output is drawn Here ,how is the Contour surface drawn ,is it done by ...
user avatar
6 votes
3 answers
169 views

Finding the gradient of the restricted function in terms of the gradient of the original function

The following question showed up as part of a proof that I am doing for my research thesis. If we have a differentiable function $f: \mathbb{R}^n \to \mathbb{R}$ and then set $n-d$ coordinates to ...
user avatar
  • 931
0 votes
1 answer
70 views

How to find the directional derivative by definition? [closed]

I have the following function: $$ f(x,y)=3xy^2+e^{xy} $$ I first calculated it in the normal way, using the unit vector, and the resulting value was $\sqrt2$. Then, I tried calculating it by ...
user avatar
  • 19
0 votes
1 answer
115 views

Derivative of matrix inverse with respect to a vector

How can I find the gradient $$\nabla_{u} \left(x^T \left(A \, \mbox{diag}(u)\, A^T \right)^{-1} x \right)$$ where $x \in \mathbb{R}^n$, $u \in \mathbb{R}^d$, are vectors and $A \in \mathbb{R}^{n \...
user avatar
  • 1,487
0 votes
1 answer
75 views

Vectors of a gradient field [closed]

The scalar field function s is defined by s = (x + y + z)². How do I show that the vectors of the associated gradient field are all parallel, have different lengths and do not always point in the same ...
user avatar
0 votes
1 answer
55 views

How to find the gradient $\nabla_W \left( u^T_1 W \left( W E W^T + \lambda I \right)^{-1} W^{T} u_2 \right)$?

I am struggling to find the gradient $$\nabla_W \left( u^T_1 W \left( W E W^T + \lambda I \right)^{-1} W^{T} u_2 \right)$$ where $I \in \mathbb{R}^{n\times n}$ is the identity matrix, $\lambda > 0$,...
user avatar
  • 1,513
-3 votes
1 answer
24 views

Reason for a lower gradient value [closed]

We know that the gradient will be $0$ at maxima or minima. Let's assume we measure the gradient at two points and that at the first point the norm of the gradient is higher than at the second point. ...
user avatar
0 votes
1 answer
88 views

Gradient of inner product containing inverse of the sum of two matrices

Given $n \times 1$ vectors $\mathbf{x}$ and $\mathbf{y}$, I need help determining the gradient $$\nabla_{\mathbf{A}} \left( \mathbf{x}^{T} \left( \mathbf{A} + \mathbf{B} \right)^{-1} \mathbf{y} \right)...
user avatar
  • 301
0 votes
0 answers
68 views

Clarifying Eq. 101 in The Matrix Cookbook

Eq. 101 of The Matrix Cookbook claims that $$\frac{\partial \operatorname {Tr}(AXB)}{\partial X} = A^\top B^\top$$ The point that is unclear to me is why the dimensions in the product fit? For example,...
user avatar
  • 1,513
0 votes
0 answers
46 views

Can I swap the positions in this equation?

I am looking at this question. I wonder if I have: $$\left\|Y-XW\right\|_{\text{F}}^2$$ Does taking derivative w.r.t $W$ yields this? $$-2X^T(Y-XW)$$
user avatar
  • 161
0 votes
3 answers
46 views

How did they get the final result here?

I am trying to understand the answer of this question. How do you get this? $$\nabla_{\mathrm W}\left(\mbox{tr} \left( \mathrm W^{\top} \mathrm X^{\top} \mathrm X \mathrm W - \mathrm Y^{\top} \mathrm ...
user avatar
  • 161
0 votes
1 answer
70 views

If for any sequence $\vec{r_n}\to\vec{a}$, the sequence $f(\vec{r_n})$ converges to $L$, prove that $\lim_{\vec{r} \to \vec{a}} f(\vec{r}) = L$

Question statement: Let $f : \mathbb{R}^n\to\mathbb{R}$ be a function. If for any sequence $\vec{r_n}\to\vec{a}$, the sequence $f(\vec{r_n})$ converges to $L$, then prove that $\lim_{\vec{r} \to \vec{...
user avatar
5 votes
2 answers
125 views

If $f(x) \leq f(a)$ for all $x$ in an open ball $B(a)$ , then prove that $\nabla f(a) = 0$

Question statement : Assume $f$ is a scalar field function differentiable at each point of an n-ball $B(a)$ . If $f(x) \leq f(a) \ \ \forall \ x $ in an open ball $B(a)$ , then prove that $\nabla f(a)...
user avatar
2 votes
3 answers
120 views

Prove that there exists no scalar field which has derivative $> 0$ at a fixed point wrt every direction

The problem statement : Prove that there is no scalar field $f$ such that $\nabla_\vec{y}f(\vec{a})>0$ for a fixed vector $\vec{a}$ and every non-zero vector $\vec{y}$. Here $\nabla_\vec{y}f(\vec{...
user avatar
1 vote
2 answers
53 views

Partial derivative of $x_1^TAB^Tx_2$

Let $A$ and $B$ be orthogonal matrices, and $x_1$, $x_2$ be vectors. What are: $$ \dfrac{\partial}{\partial x_1}\left( x_1^TAB^Tx_2 \right)$$ $$ \dfrac{\partial}{\partial x_2}\left( x_1^TAB^Tx_2 \...
user avatar
  • 479
0 votes
0 answers
33 views

Is there a bundle concept that includes tensors and spinors as special cases?

A scalar field is a map from the base space to the field of interest but it is equivalently a section of a (0,0)-tensor bundle. Similarly, a vector bundle is just a section of a (1,0)-tensor bundle. ...
user avatar
  • 450
0 votes
1 answer
84 views

Matrix differentiation, $x^T A x$ w.r.t $A$ [duplicate]

In Gaussian Mixture Models, in order to derive the M-step for covariance matrix, I need this result. I have poor knowledge of matrix calculus and result does not exist in https://en.wikipedia.org/wiki/...
user avatar
0 votes
0 answers
19 views

Finding Potential for specific Vector Field, help?

I've been trying to think of a potential to derive for the vector field $$ \vec{F}(r,\theta,z) =-mg\sin(\theta) \hat{e}_{\theta} .$$ I'm assuming this is a force as in physics so the potential is ...
user avatar
1 vote
1 answer
142 views

What is the gradient of $x^T A\, x$ with respect to the matrix $A$? [duplicate]

I have seen many times that the gradient of $x^TA\,x$ with respect to $x$ is $2A\,x$. But how do you find its gradient with respect to $A$?
user avatar
3 votes
4 answers
120 views

Confused about computing the gradient of least-squares cost

Given matrix $A \in \mathbb R^{m \times n}$ and vector $y \in \mathbb R^m$, I want to take the gradient of the following scalar field with respect to $x\in \mathbb R^n$. $$x \mapsto \big((Ax - y)^T(Ax ...
user avatar

1
2 3 4 5 6