728x90
많이 사용되는 vector 도함수들을 정리함.
Numeartor Layout 과 Denominator Layout을 구분하여 살펴야 함.
$$f(\textbf{x})$$ | $$\frac{\partial f(\textbf{x})}{\partial \textbf{x}}$$ | Convention | $$f(x)$$ | $$\frac{df(x)}{dx}$$ |
$$\textbf{x}^T \textbf{b}$$ | $$\textbf{b}^T$$ | Numerator Layout | $$bx$$ | $$b$$ |
$$\textbf{b}^T \textbf{x}$$ | $$\textbf{b}^T$$ | Numerator Layout | $$bx$$ | $$b$$ |
$\textbf{b}\cdot \textbf{x}$ or $\textbf{x}\cdot \textbf{b}$ | $$\textbf{b}^T$$ | Numerator Layout | $$bx$$ | $$b$$ |
$$\textbf{x}^T A$$ | $$A^T$$ | Numerator Layout | $$ax$$ | $$a$$ |
$$A\textbf{x}$$ | $$A$$ | Numerator Layout | $$ax$$ | $$a$$ |
$\textbf{x}^T \textbf{x}$ or $\|\textbf{x}\|_2^2$ or $\textbf{x} \cdot \textbf{x}$ | $$2\textbf{x}^T$$ | Numerator Layout | $$x^2$$ | $$2x$$ |
$$\|\textbf{x}\|_2$$ | $$\frac{\textbf{x}^T}{\|\textbf{x}\|_2}$$ | Numerator Layout | ||
$$\textbf{x}\textbf{x}^T$$ | $$\textbf{x}\otimes I+ I \otimes \textbf{x}$$ | Numerator Layout | $$x^2$$ | $$2x$$ |
$$\textbf{x}^TS\textbf{x}$$ | $$2\textbf{x}^TS(=\textbf{x}^T(S^T+S))$$ | Numerator Layout | $$sx^2$$ | $$2sx$$ |
$$\textbf{x}^TA\textbf{x}$$ | $$\textbf{x}^T(A^T+A)$$ | Numerator Layout | $$ax^2$$ | $$2ax$$ |
$$\textbf{y}^TA\textbf{z}$$ | $$\textbf{z}^TA^T\frac{\partial\textbf{y}}{\partial x}+\textbf{y}^TA\frac{\partial\textbf{z}}{\partial x}$$ | Numerator Layout | $$sy(x)z(x)$$ | $$s(y^\prime(x)z(x)+y(x)z^\prime(x))$$ |
$\textbf{x}^T\textbf{b}$ or $\textbf{b}^T\textbf{x}$ or $\textbf{x}\cdot\textbf{b}$ or $\textbf{b}\cdot \textbf{x}$ | $$\textbf{b}$$ | Denominator Layout | $$bx$$ | $$b$$ |
$$\textbf{x}^TA$$ | $$A$$ | Denominator Layout | $$ax$$ | $$a$$ |
$$A\textbf{x}$$ | $$A^T$$ | Denominator Layout | $$ax$$ | $$a$$ |
$\textbf{x}^T \textbf{x}$ or $\|\textbf{x}\|_2^2$ or $\textbf{x} \cdot \textbf{x}$ | $$2\textbf{x}$$ | Denominator Layout | $$x^2$$ | $$2x$$ |
$$\textbf{x}^TA\textbf{x}$$ | $$(A+A^T)\textbf{x}$$ | Denominator Layout | $$ax^2$$ | $$2ax$$ |
$$\textbf{y}^TA\textbf{z}$$ | $$\frac{\partial\textbf{y}}{\partial x}A\textbf{z}+\frac{\partial\textbf{z}}{\partial x}A^T\textbf{y}$$ | Denominator Layout | $$sy(x)z(x)$$ | $$s(y^\prime(x)z(x)+y(x)z^\prime(x))$$ |
- $A$ : matrix
- $\textbf{x}$ : vector
- $\textbf{b}$ : $\textbf{x}$와 상관없는 vector (i.e. constant vector)
- $S$ : symmetric matrix
- $a,b,s,x$ : scalar
- $\|\cdot\|_2$ : L2-norm
- $\textbf{y}$,$\textbf{z}$ : $\textbf{x}$를 입력으로하고 vector 출력을 갖는 함수. (vector field)
References
- http://www.matrixcalculus.org/
- Ref1 for Denominator Layout Convention
- Ref2 for Denominator Layout Convention (very simple)
반응형
'... > Math' 카테고리의 다른 글
[Math] Matrix Calculus : Numerator Layout (0) | 2022.05.08 |
---|---|
[Math] Jacobian : Summary (0) | 2022.05.07 |
[Statistics] Covariance vs. Correlation (0) | 2022.05.01 |
[Statistics] Sample Point Method (0) | 2022.05.01 |
Closed-form solution and Closed-form expression (0) | 2022.04.29 |