Questions tagged [matrix-calculus]

Matrix calculus is about doing calculus, especially derivative and infinite series over spaces of vectors and matrices.

Matrix calculus studies derivatives and differentials of scalar, vector and matrix with respect to vector and matrix. It has been widely applied into different areas such as machine learning, numerical analysis, economics etc.

There are basically two methods.

  • Direct: Regard vectors and matrices as scalar so as to compute in the usual way in calculus. And The Matrix Cookbook provides a lot of basic facts.

  • Component-wise: Write everything in indices notation and compute in the usual way componentwisely. Einstein summation convention is frequently used.

3828 questions
0
votes
1 answer

the derivative for F-norm of a matrix

From the matrix cookbook, I got: $\frac{\partial}{\partial X} ||X||_F^2 = \frac{\partial}{\partial X} Tr(XX^H) = 2X$ Now I want to compute $\frac{\partial}{\partial X} ||X-Y||_F^2 = \frac{\partial}{\partial X} Tr\left((X-Y)(X-Y)^H\right)$, but I am…
cinvro
  • 329
0
votes
1 answer

Derivative of scalar function with respect to matrix with vectors involved

I want to find derivative of a scalar function with respect to matrix $A$: $ E=\|f(Ax)\|^2 $ Where $f(Ax)$ is a vector, say color of pixel at position $Ax$. How can I do that, given that I can compute derivative of $f$ with respect to its argument…
DikobrAz
  • 229
0
votes
1 answer

Inverse of perturbed triangular matrix

For an ill-conditioned triangular matrix $T$, can we give a simple expression for the following $$(T + \Delta T)^{-1}$$ where $|\Delta T| \leq \epsilon|T|$, $\epsilon \ll 1$.
DDaren
  • 421
0
votes
4 answers

How can I calculate the partial derivative $\frac{\partial}{\partial \vec{x}} f\left(A\vec{x} + \vec{b}\right)$ using matrix calculus?

I want to calculate $\frac{\partial}{\partial \vec{x}} f\left(A\vec{x} + \vec{b}\right)$ where $\vec{x}, \vec{b} \in \mathbb{R^n}$ and $f: \mathbb{R}^n \rightarrow \mathbb{R}^n$ which is applied element-wise. Is it correct that since both $\vec{x}$…
Lenar Hoyt
  • 1,062
0
votes
2 answers

Verify the differentiablity of trace and determinant function

$f: \text{GL}_n(\mathbb R) \times \mathbb M_n(\mathbb R) \to R, f(A,B) = \text{tr}(A^{-1}B)$ $g: \mathbb M_n(\mathbb R) \to \mathbb M_n(\mathbb R), g(A) = \det(A)$ Are $f,g$ differentiable? (Use the definition of differentiation) We need to find a…
0
votes
1 answer

How to work out this matrix differentiation?

I am trying to minimize a function A wrt W, so seeking its gradient $$ A = \ln \det ( WW^T + \sigma^2I)$$ So according to the chain rule I found $$ \frac{\partial A}{\partial W} = tr((\frac{\partial g(U)}{\partial U})^T \cdot \frac{\partial…
lericson
  • 189
0
votes
0 answers

what does "matrix valued function is continuous differentiable" mean?

I have a question regarding definition for matrix valued function. Suppose $f:\mathbb{R}^q \to \mathbb{R}^q \times \mathbb{R}^d$, which is a matrix valued function. Then what does it mean by $f$ is continuous differentiable? Where can I find…
Sean
  • 339
0
votes
2 answers

which one is the correct derivative w.r.t time?

We want to take time derivative of $x^TPx$ and we know $\dot{x}=Ax,~~P^T=P$. Which one is wrong and why? 1- $d(x^TPx)/dt=\nabla (x^TPx).\dot{x}=2x^TP\dot{x}=2x^TPAx.$ 2- $d(x^TPx)/dt=\dot{x}^TPx+x^TP\dot{x}=x^TA^TPx+x^TPAx$
ehsank
  • 415
0
votes
1 answer

Matrix gradient of linear form

My question is very basic, and I ask it because I haven't seem to have found it online. What is the matrix gradient (with respect to A) of Ax, where A is m by n and x is n by 1?
user19346
  • 101
0
votes
2 answers

How to prove $ \frac{1}{A+B} = \frac{1}{A} - \frac{1}{A} B \frac{1}{A} + \frac{1}{A}B \frac{1}{A}B \frac{1}{A} + \cdots $?

For matrix $A$ and $B$ \begin{align} \frac{1}{A+B} = \frac{1}{A} - \frac{1}{A} B \frac{1}{A} + \frac{1}{A}B \frac{1}{A}B \frac{1}{A} + \cdots \end{align} How can prove above identity holds?
phy_math
  • 6,448
0
votes
0 answers

matrix derivative of $X^{1/2}C(X^{1/2})'$ with respect to $X$?

Where $X$ and $C$ are both symmetric positive-definite matrices, and $X^{1/2}$ is the lower-triangular matrix sqare root of $X$. In other words, if $Y=X^{1/2}C{X^{1/2}}'$, what is the effect of a change in the elements of $X$ on those of $Y$?…
0
votes
1 answer

How to calculate $\frac{\partial \mathbf{A}}{\partial \mathbf{x}}$?

How to calculate $\frac{\partial \mathbf{A}}{\partial \mathbf{x}}$? Here $\mathbf{A}$ is a matrix and $\mathbf{x}$ is a vector. Thank you very much.
0
votes
1 answer

Derivative of matrix expression

I have an expression: $$(Y-Xw-z1)^T(Y-Xw-z1)$$ Where $1$ is a $n\times 1$ column of ones, $w$ and $z$ are constants, and $X$ and $Y$ are matrices. How do I take a partial derivative (lets say with respect to $z$) of this expression?
0
votes
2 answers

Matrix differential and differentation

I need to find the differential and derivative of $ f: X\rightarrow (I-X(X'X)^{-1}X')$ Now by the product rule I found that the differential of $d(I-X(X'X)^{-1}X')=-(dX(X'X)^{-1}X' + (X)d(X'X)^{-1}X'+X(X'X)^{-1}d(X')$ Now I have issues with finding…
joog
  • 15
0
votes
1 answer

matrix differentation

I want to find the derivative of the $f:X→(X′X)^{-1}$ where $X$ is a $m×n$ matrix. Now I know that the differential of $d(X^{−1})=−X^{−1}(dX)X^{−1}$. Can I use this directly to get the differential for the function I want to differentiate above? Any…
joog
  • 15
1 2 3
13
14