Derivatives of scalars, vector functions and matrices

来源:互联网 发布:mac用预览编辑pdf文件 编辑:程序博客网 时间:2024/06/06 01:54

There are six kinds of derivatives that can be expressed as matrices:




The partials with respect to the numerator are laid out according to the shape ofY while the partials with respect to the denominator are laid out according to the transpose ofX. For example, dy/dx is a column vector while dy/dx is a row vector (assumingx andy are column vectors—otherwise it is flipped). Each of these derivatives can be tediously computed via partials, but this section shows how they instead can be computed with matrix manipulations.



Assuming x and y are column vectors, A, X, Y are Matrix


This is where the operators and identities developed in the following sections are useful. For example, since the derivative ofY with respect toX cannot be represented by a matrix, it is customary to use dvec(Y)/dvec(X) instead (vec is defined below). If the purpose of differentiation is to equate the derivative to zero, then this transformation doesn’t affect the result. 




引用于Old and New Matrix Algebra Useful for Statistics Thomas P. Minka December 28, 2000



 Scalar yVector y (size m)Matrix Y (size m×n)NotationTypeNotationTypeNotationTypeScalar x\frac{\partial y}{\partial x}scalar\frac{\partial \mathbf{y}}{\partial x}(numerator layout) size-m column vector

(denominator layout) size-m row vector

\frac{\partial \mathbf{Y}}{\partial x}(numerator layout) m×nmatrixVector x (size n)\frac{\partial y}{\partial \mathbf{x}}(numerator layout) size-n row vector

(denominator layout) size-n column vector

\frac{\partial \mathbf{y}}{\partial \mathbf{x}}(numerator layout) m×n matrix

(denominator layout) n×m matrix

\frac{\partial \mathbf{Y}}{\partial \mathbf{x}} ?Matrix X (sizep×q)\frac{\partial y}{\partial \mathbf{X}}(numerator layout) q×p matrix

(denominator layout) p×q matrix

\frac{\partial \mathbf{y}}{\partial \mathbf{X}} ?\frac{\partial \mathbf{Y}}{\partial \mathbf{X}} ?

引用于https://en.wikipedia.org/wiki/Matrix_calculus#Layout_conventions


一般我们采用numerator layout


0 0
原创粉丝点击