117. Cheatsheet

117.1. Derivative Objects

Gradient𝑓:ℝ𝑛→ℝ𝑛×1Vector of first derivatives; special case of Jacobian (scalar output)
Jacobian𝐹:ℝ𝑛→ℝ𝑚𝑚×𝑛Matrix of first derivatives; general case for vector-valued functions
Hessian𝑓:ℝ𝑛→ℝ𝑛×𝑛Matrix of second derivatives; Jacobian of the gradient
Input/OutputDerivativesNotation
Gradient
(Derivative)
(1×1)
𝑓:ℝ→ℝ
One Input
One Output
Scalar Function
First
Order
∇𝑓(𝑥)=𝑓′(𝑥)=[𝜕𝑓𝜕𝑥]
Jacobian
(𝑚×1)
𝑓:ℝ→ℝ𝑚
One Input
Multiple Output
Vector Function
First
Order
𝐽𝑓(𝑥)=[𝜕𝑓1𝜕𝑥𝜕𝑓2𝜕𝑥⋮𝜕𝑓𝑚𝜕𝑥]
Gradient
(𝑛×1)
𝑓:ℝ𝑛→ℝ
Multiple Input
One Output
Scalar Function
First
Order
∇𝑓(𝐱)=[𝜕𝑓𝜕𝑥1𝜕𝑓𝜕𝑥2⋮𝜕𝑓𝜕𝑥𝑛]
Jacobian
(𝑚×𝑛)
𝑓:ℝ𝑛→ℝ𝑚
Multiple Input
Multiple Output
Vector Function
First
Order
𝐽𝑓(𝐱)=[∇𝑔1(𝑥)𝑇∇𝑔2(𝑥)𝑇⋮∇𝑔𝑚(𝑥)𝑇]=[𝜕𝑓1𝜕𝑥1…𝜕𝑓1𝜕𝑥𝑛⋮⋱⋮𝜕𝑓𝑚𝜕𝑥1…𝜕𝑓𝑚𝜕𝑥𝑛]
Hessian
(𝑛×𝑛)
𝑓:ℝ𝑛→ℝ
Multiple Input
One Output
Scalar Function
Second
Order
∇2𝑓(𝐱)=𝐻𝑓(𝐱)=[𝜕2𝑓𝜕𝑥12…𝜕2𝑓𝜕𝑥1𝜕𝑥𝑛⋮⋱⋮𝜕2𝑓𝜕𝑥𝑛𝜕𝑥1…𝜕2𝑓𝜕𝑥𝑛2]
LaplacianTrace of the Hessian
(sum of diagonal entries)
tr(𝐻𝑓(𝐱))=∑𝑖=1𝑛𝜕2𝑓𝜕𝑥𝑖2(𝑥)𝐻𝑓(𝐱)=[𝜕2𝑓𝜕𝑥12…𝜕2𝑓𝜕𝑥1𝜕𝑥𝑛⋮⋱⋮𝜕2𝑓𝜕𝑥𝑛𝜕𝑥1…𝜕2𝑓𝜕𝑥𝑛2]
Gradient1st derivative𝑛×1
Hessian2nd derivative𝑛×𝑛
3rd Order Tensor3rd derivative𝑛×𝑛×𝑛
⋮
𝑘-th Order Tensor𝑘th derivative𝑛×𝑛×…×𝑛(𝑘times)