Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [matrix-calculus]

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

0
votes
1answer
17 views

Values to whom the matrix is diagonalizable and invertible

I've got this matrix A=$$\begin{bmatrix} 2&0&3\\0&L&0\\4&0&0\end{bmatrix}$$ And I must to find the values for what this matrix is diagonalizable and they are 5 and 1 with ...
0
votes
0answers
23 views

Bounds on L1 norm of product of matrices [on hold]

I have a matrix $W \in R^{n \times k}$ whose $m^{th}$ column is $w_m$, and $|w_m|_{\infty} < 1$ and $|w_m|_{1} < \lambda$ where $\lambda$ is known. I am multiplying it with a matrix $X \in R^{k \...
0
votes
1answer
15 views

Variance of a combination of random vectors

I was looking at the proof for optimal weighting matrix when using GMM (slide 35 here) At one point, they take the variance of both sides of following expression (where Z is a random vector) $A_1Z = ...
1
vote
1answer
33 views

Laplacian of $ \nabla^2 f( A x)$ in terms of Laplacian of $ \nabla^2_y f( y)$

How to find the Laplacian \begin{align} \nabla^2_x f( A x) \end{align} where $n \times m$ matrix and we know know the laplacian of \begin{align} \nabla^2_y f( y) \end{align} This question is about ...
2
votes
1answer
34 views

Matrix Differentiation of Kronecker Product

I have a question about differentiating an expression which has multiple kronecker products. I have the following objective function I would like to differentiate with respect to $\mathbf{Q}$: \...
0
votes
0answers
16 views

Markov Chain first order applied to attribution modelling

Based on this article I'm using within R the Channel Attribution package to leverage on the Markov Chain in order to attribute conversion between several marketing channels. However, the computation ...
0
votes
0answers
22 views

Weakly Diagonally Dominant with Positive Diagonals

Suppose $A \in \mathbb{R}^{n\times n}$ (not necessarily symmetric) is weakly diagonally dominant with positive diagonals. Is it true that all eigenvalues of $A$ are non-negative (in the case of ...
0
votes
1answer
15 views

Proving nonsingularity of this block matrix

I have received this question to solve, but, quite frankly, I have no idea how to do it. Can anyone help? Let $A,B,C,D \in R^{n \times n}$ Show that if $B,D,A-BD^{-1}C$, and $C-DB^{-1}A$ are ...
0
votes
1answer
44 views

Second derivative of norm of matrix power $\lVert y - A^kx \rVert$

I am looking for the second derivative w.r.t $A$ (and $x$ and $y$, but those are a little easier): $$ \frac{\partial^2}{\partial A^2} \frac{1}{2} \lVert y - A^kx \rVert_2^2 $$ I can find the first ...
0
votes
1answer
43 views

How to find a matrix with characteristic equation? [duplicate]

I'll write it again but the users below don't seem to understand ... THIS IS NOT A DUPLICATE . PLEASE READ MY QUESTION THOROUGLY. I need to find a matrix with characteristic equation given by λ² − λ ...
0
votes
0answers
30 views

Minimazation problem with norm and matrix

In the context of principal component analysis, I got to the minimazation problem: $$\min_{A, (v_{i})} \sum_{i=0}^n \left\lVert X_{i}-Av_{i}\right\rVert^2$$ for $X_1,...,X_n\in \mathbb{R}^p$ For ...
1
vote
2answers
28 views

Derivative of matrix expression $(Y − A\beta)^TW(Y − A\beta)$ wrt $\beta$.

$Y$ and $\beta$ are $1 \times n$ matrices and $W$ is a diagonal $n \times n$ matrix. What is the best way to think about how to simplify this expression and its derivative to get the expression ...
0
votes
0answers
16 views

Finding the Upper Bound of the difference between the Inverse of the 2 matrix

Given that $ K = A^{-1} - B^{-1} + A^{-1} - A^{-1}BA^{-1}$, we need to find the upper bound of $K$ where matrix $A = C + I\rho$ and $ B = C_{x} + I\rho $ has dimension $n\times n$, $ C = RDR^{T}$ ...
0
votes
2answers
32 views

Find the values for which the matrix is diagonalizable

I have this matrix A= $$\begin{bmatrix} 2&0&3\\0&L&0\\1&0&4\end{bmatrix}$$ and for find characteristic matrix I do $\lambda I - A$ so I've got $$\begin{bmatrix} \lambda - 2&...
0
votes
1answer
26 views

Derivative of a Function of the Diag function

Suppose there is a vector $U \in \mathbb{R}^n$. How would you find the derivative of: $$ F(U)=trace\left(diag(U) A\ diag(U) \right) $$ where $A \in \mathbb{R}^{n \times n} \succ 0 $ and where $diag(\...
0
votes
1answer
48 views

derivative of the trace of matrix logarithm

Let $f(X) = \text{tr}(\log(X)\cdot A)$, where $\log(X)$ is the matrix logrithm of matrix $X$, both $X$ and $A$ are $m\times m$ symmetric positive definite (SPD) matrices. I was wondering what is $\...
0
votes
0answers
18 views

Principal Components of Constructed Matrix Analysis

Assume two matrixs $\mathbf{A}=[\vec{\mathbf{a_1}},\vec{\mathbf{a_2}},\dots,\vec{\mathbf{a_n}}]\in R^{d\times n}$ and $\mathbf{B}=[\vec{\mathbf{b_1}},\vec{\mathbf{b_2}},\dots,\vec{\mathbf{b_m}}]\in R^{...
2
votes
0answers
54 views

How to prove the derivative of $a^{T} A^{-1} b$ with respect to $A$

So I can find from the matrix cookbook here: $\frac{\partial a^TX^{-1}b}{\partial X} = -X^{-T}ab^TX^{-T}$ To prove it, I have tried expanding: $a^TX^{-1}b = \sum\limits_{i,j}^{n,n}a_i(X^{-1})_{ij}...
2
votes
2answers
62 views

Find a matrix B such that $B^5 = A$ [duplicate]

I am being asked to find a matrix $B$ where $B^5 = A$ $$A = \begin{bmatrix} 1 & 3 \\ 3 & 1 \end{bmatrix}$$ In the first part of the question I was asked to find the eigenvalues & ...
0
votes
1answer
21 views

Question concerning Jacobian of exponential expression

Consider $u (x) :\Omega\rightarrow\mathbb R^2$, $A(x):\Omega\rightarrow \mathbb R^{2\times 2} , x\in \Omega\subset\mathbb R^n$ and the following function $$f(x) = \exp(-u^T\cdot A^{-1}\cdot u )$$ I am ...
1
vote
1answer
22 views

tracial state of a orthogonal projection

Suppose $A\in M_n(\mathbb{C})$,$A$ has eigenvalues$\lambda_1,\cdots,\lambda_n$,$P$ is the orthogonal projection from $\mathbb{C}^n$ onto the span of eigenvectors associated with $\lambda_1,\cdots,\...
1
vote
0answers
30 views

Is there a version of the chain rule that applies to hessian matrices?

Suppose I have a scalar $J(n)$ and two vectors, $\mathbf{w}(n)$ and $\mathbf{x}(n)$. Now, suppose that $J(n)$ is a fairly straightforward function of $\mathbf{w}(n)$, and $\mathbf{w}(n)$ is actually a ...
0
votes
1answer
26 views

Derivative of matrix using Kronecker Product

Suppose $ A(p)$ and $B(p) $ are functions which map $ \mathbb{R}^{n\times m} $ to $ \mathbb{R}^{n\times m} $ and $$F(p)=S(I_{q}\otimes A(p))(I_{q}\otimes B(p))M$$ where $ S,M $ are constant matrices ...
0
votes
0answers
19 views

derivative of trace of inverse matrix which is a function of 1 parameters

I have a trace of inverse matrix which is a function of two parameters and need to find its derivative. $\frac{\partial \sum_{i=1}^{n}B^{T}A_{i}^{-1}\left(t\right) B}{\partial t}=\sum_{i=1}^{n}\frac{\...
1
vote
1answer
25 views

Sign rule for finding the adjugate of a 3x3 matrix?

So i have this matrix A= $$ \begin{pmatrix} 1 & 3 & 0 \\ -2 & -5 & 2 \\ 1 & 4 & 3 \\ \end{pmatrix} $$ And i want to find the inverse of it. Following all ...
1
vote
1answer
80 views

derivative of inverse matrix by itself

Let $A$ be a matrix, supposedly $k\times k$ matrix. I know that $$\frac{\partial A^{-1}}{\partial A} = -A^{-2} $$ I do not know how I am supposed to obtain the following results using this fact. I ...
0
votes
5answers
50 views

$A^TJA = J$ $ \rightarrow \det(A) = 1$ [closed]

Why is this true? I cant seem to understand why the $\det(A) = 1$ for this to hold?
0
votes
1answer
20 views

How to find multiplicity of eigenvalues?

So i have this matrix: enter image description here Sorry for the formatting, I'm new here and any help would be great. We compute the characteristic polynomial $p(\lambda)= {\rm det}(A − \lambda ...
0
votes
1answer
36 views

Matrix calculus (simple question)

Let $u_{0}$ be a row vector of real numbers, $U$ be a matrix of real numbers, $x$ some row vector. Then let $v = xU + u_{0} $ My question is how you would calculate $$ \frac{\partial v}{\partial u_{...
0
votes
1answer
33 views

Find a response vector that minimizes the distance to the true line

I have a system of equation of the following form: $$ {\bf W} \vec{x} = \vec{y} $$ W is a thin matrix (i.e. has more rows than columns) and $\vec{x}$, $\vec{y}$ are vectors of appropriate size. I ...
0
votes
1answer
17 views

Is the spectral decompsoition of semidefinite matrix unique?

Suppose $A\in M_n(\mathbb{C})$ is a semidefinite matrix, is the spectral decompsoition of $A$ unique?If not,can anyone show me some examples?Thanks
1
vote
1answer
43 views

Why the intersection appears in the matrix

Its for a calculus homework. They give me 2 subspace basis and a matrix, and after row reduction it appears the sum and the intersection. I have to explain why and how appears the intersection. This ...
1
vote
0answers
29 views

Choosing the adequate layout convention for matrix derivatives

Is there a rule (or maybe a rule of thumb) that provides guidance for choosing the layout convention (see Layout conventions, wiki) to use when dealing with matrix derivatives? I found a hint in this ...
-1
votes
1answer
23 views

Derivative of $f = {\rm tr} \left[ U^T \; {\rm unvec} \left( B \ {\rm vec}(X) \right) \right]$ w.r.t. $X$?

Let a block diagonal matrix reads $$B := {\rm blkdiag}\left(A_1, \cdots, A_i, \cdots, A_N \right) \ \in \mathbb{R}^{MN \times KN} \ ,$$ where $A_i \in \mathbb{R}^{M \times K}$. How to take the ...
0
votes
1answer
31 views

LU decomposition of a matrix given LU decomposition of its blocks.

Suppose $A, B, C$ are $n\times n$ matrices. Let $A = L_1U_1$ and $D = L_2U_2$. Then what is the LU decomposition of $$\begin{bmatrix} A&B\\ 0&D\end{bmatrix}$$ How to find this? I am able to ...
1
vote
1answer
19 views

Derivative of ${\rm Re} \left\{ {\rm tr} \left [Z^H \left( AX \right) \right] \right\}$ w.r.t. $X \in \mathbb{C}^{m \times n}$.

Question Let us say that I have a function $$f = {\rm Re} \left\{ {\rm tr} \left [Z^H \left( AX \right) \right] \right\} \ ,$$ where the matrices are $Z \in \mathbb{C}^{k \times n}$, $A \in \mathbb{C}...
2
votes
1answer
48 views

Decomposing a positive semi-definite matrix with all -1,+1 elements

Claim.$\,$ A matrix $\,X \in \{-1,1\}^{n\times n}\,$ is positive semi-definite if and only if it is of the form $X= xx^{T}$, for some $x \in \{-1,1 \}^n$. How can I prove this? Proving the 'if' part ...
0
votes
0answers
42 views

Multiplying only diagonal elements of a matrix

I'm dealing with the following problem: Suppose that I gave a upper diagonal matrix A of the form: $A= \begin{bmatrix} a_{11} & a_{12}&\dots &a_{1n}\\ 0 & a_{22}&\dots &a_{2n} ...
1
vote
2answers
40 views

Gradient of $||Ax - y||^2$ with respect to $A$

How do I proceed to find $\nabla_A||Ax - y||^2$ where $A \in \mathbb{R}^{n\times n}$ and $x,y \in \mathbb{R}^n$ and the norm is the Euclidean norm. Attempt so far $$||Ax - y||^2 = (Ax-y)^T(Ax-y) = ...
3
votes
1answer
102 views

The nonsingular matrix closest to singular one

It is well known that given nonsingular matrix $A$, the distance to closest singular is given by $\|A^{-1}\|^{-1}$. My question is given singular matrix $B$ what is the distance to closest ...
0
votes
1answer
46 views

Derivate of an Inverse of a Matrix

I have the following loss function. $$||\theta - (X^T X)^{-1} X^T y||_2^2$$ $$X\space \text{ is a matrix, } \theta \text{ and } y \text{ are known vectors.}$$ I have another constraint for $X$, ...
3
votes
1answer
47 views

Derivative with respect to Symmetric Matrix

I realize that derivatives with respect to symmetric matrices have been well covered in prior questions. Still, I find that the numerical results do not agree with what I understand as the theory. ...
0
votes
1answer
41 views

Frobenius norm of Fourier matrix

Fourier matrix is given as where $\omega = e^{-2\pi i/N}$ Is there any clever way to calculate Frobenius norm of Fourier matrix? I tried solving it with brute force and got some ugly calculations
1
vote
1answer
41 views

partial isometry

If $A\in M_{r\times m}(\mathbb{C}),B\in M_{m\times r}(\mathbb{C})$,$AB=Id_r$,then $A,B$ is a partial isometry. My question:how to show $A^*A,B^*B$ is a projection?
1
vote
1answer
40 views

singular value decomposition of simple $2\times2$ matrix.

Consider the matrix $A=\begin{bmatrix}1& \varepsilon\\ 0 & 0 \end{bmatrix}$ where $\varepsilon >0$. Determine a singular value decomposition of $A$. As far as I know the SVD can be ...
1
vote
1answer
29 views

Is square root of a matrix necessarily Cholesky decomposition? Or other decomposition satisfies?

If $a$ is a scalar, $a = \sqrt{a}\sqrt{a}$, then if A is a matrix, $A=\sqrt{A}\sqrt{A}$, now I think the square root operator is applied to the matrix instead of a scalar. Is square root of a matrix ...
-1
votes
2answers
49 views

N by N matrix of order 1

I am looking at a paper by Slawomir Jarek called "REMOVING INCONSISTENCY IN PAIRWISE COMPARISON MATRIX IN THE AHP" (http://cejsh.icm.edu.pl/cejsh/element/bwmeta1.element.cejsh-fdb88af9-ba25-435f-9c85-...
0
votes
1answer
33 views

What is $\frac{\partial}{\partial d_A} f$ where $d_A$ is matrix $A$'s diagonal?

Let us assume that we know $\frac{\partial}{\partial A} f$, where $f$ is a scalar function, and $A$ any matrix. Now suppose we are interested in the special case when $A$ is diagonal, and we want to ...
1
vote
1answer
46 views

infinite dimensional positive matrix

Suppose $A$ is a infinite dimensional positive complex matrix,what is the operator norm of $A$? In the finite dimensional case,we can use the spectral theorm,$\|A\|=sup|\lambda_i|$,where $\lambda_i$ ...
0
votes
1answer
37 views

What does the following matrix expression equal to after differentiating it wrt. $\dot{\mathrm{x}}$ and then wrt time

Suppose I have the following expression: $$\dot{\mathbf{x}}^\intercal\left(\mathbf{A}-\mathbf{B}\mathbf{D}^{-1}\mathbf{B}^\intercal\right)\dot{\mathbf{x}}$$ where $\mathbf{x}(t)\in \mathbb{R}^{m}$ ...