Derivatives of scalars, vector functions and matrices

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 and y 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 to X 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 y Vector y (size m) Matrix Y (size m×n)
Notation Type Notation Type Notation Type
Scalar 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×nmatrix
Vector 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
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值