## why the curl of the gradient of a scalar field is zero? geometric interpretation

This is probably a very silly question, but am I correct in saying that a vector field has non zero curl at some point when the direction of transformation changes? If so I can think of plenty of two variable scalar fields whose gradient vector field changes direction. Isn’t the curl non zero at these … Read more

## Meaning of this line integral

I have seen expressions for 4 different line integrals: ∫fds ∫fds \int \textbf{F} \boldsymbol{\cdot} \text{d}\textbf{s} \int \textbf{F} \times \text{d} \textbf{s} These give results that are scalar, vector, scalar, vector respetively. Now the second integral I have only come across in one book, and it was only mentioned as a type of line integral. However I … Read more

## Difference between Directional Derivative x Chain Rule for Scalar Fields

could you guys help me out with an issue I am having. What’s the difference between the “Directional Derivative” and “Chain Rule for Scalar Fields”? In meaning and the formulae? I don’t know if I got it right but both of them have the same formula: g′(→r(t))=∇(g(t))⋅→r′(t) for the Chain Rule And Derivative=∇(g(t))⋅→r(t) for the Directional Derivative And to me they both seem … Read more

## Second order approximation of log det X

I’m trying to follow the derivation of second order approximation of \log \det X from page 658 of Boyd & Vandenberghe’s Convex Optimization. How is the last step derived? I.e., where does the trace expression come from? Answer Short answer: The trace gives the scalar product on the space of matrices: \langle X,Y \rangle = … Read more

## Derivative of aTXTXXTXb\rm a^T X^T X X^T X b with respect to X\rm X

I’m trying to take the derivative of a 4th order equation with respect to a matrix. It has the following form ∂aTXTXXTXb∂X=? a and b are vectors and X is a matrix so, in effect, it’s the derivative of a scalar with respect to a matrix. I found the basic derivatives in Matrix Calculus on … Read more

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 – y) \big),$$ $\textbf{Attempt}.$ \begin{align} \frac{\partial}{\partial x} \big((Ax – y)^T(Ax – y) \big) &= \frac{\partial}{\partial x} \big( (x^TA^TAx – … Read more

This question already has answers here: How to take the gradient of the quadratic form? (5 answers) Closed 1 year ago. Let scalar field $f : \mathbb{R}^n \to \mathbb{R}$ be given by $$f(x) = x^TA^TAx – \lambda( x^T x – 1)$$ where $A$ is an $n \times n$ matrix and $\lambda$ is a scalar. How … Read more

## Gradient of $\mbox{tr} \left( (AX)^t (AX) \right)$

I am trying to calculate the gradient of the following function $$f(X) = \mbox{tr} \left( (AX)^t (AX) \right)$$ Chain’s rule gives $$\nabla_X(f(X)) = \nabla_X (\mbox{tr}(AX))\nabla_x(AX)$$ However, I’m having trouble with those two derivatives. What is $\nabla_X tr(AX)$? Is it $A^t$? I did the math and obtained that $\frac{\partial(tr(AX))}{\partial x_{ij}} = a_{ji}$, but I’m not sure… … Read more

## Gradient of a function with respect to a matrix

How can I compute the gradient of the following function with respect to X, g(X)=12‖ where X\in\mathbb{R}^{n\times n}, y\in\mathbb{R}^m, and A:\mathbb{R}^{n\times n}\to \mathbb{R}^m is linear. We can assume that A is of the form, A = \begin{pmatrix}\langle X| A_1\rangle\\\vdots\\\langle X|A_m\rangle\end{pmatrix} where A_1,\ldots,A_m are n\times n real matrices and the inner product is the Frobenius inner … Read more

## Gradient of a^T X ba^T X b with respect to XX

How can I find the gradient of the term a^TXb where X is a n \times m matrix, and a and b are column vectors. Since the gradient is with respect to a matrix, it should be a matrix. But I do not have a clue on how to derive this gradient. Any help ? … Read more