The Matrix Cookbook

Learn / The Matrix Cookbook

02 - Derivatives

Advanced formula selection, assumption checking, and exact application for Derivatives, book pages 8-16.

Learning path

0%

0 of 3 sections marked complete · about 25 minutes

Learning objectives

What you will be able to explain

  • Differential rulebook
  • Determinant gradients
  • Differentiate through an inverse
  • Eigenvalue differentials
  • Vector and matrix form gradients
  • Evaluate a quadratic gradient component

Section 01

Differential rulebook to Differentiate through an inverse

01

Differential rulebook

The inverse differential carries a minus sign; product rules extend to Hadamard and Kronecker products.

Guided checkpoint

Treat AA as constant.

Source: Sec. 2, eqs. 32-45, p. 8

02

Determinant gradients

These formulas distinguish determinant, log-determinant, and composite square forms.

Guided checkpoint

Match expression to its gradient with respect to XX.

Source: Secs. 2.1.2-2.1.4, eqs. 49,52,57,58, pp. 9-10

03

Differentiate through an inverse

Apply dX1=X1(dX)X1dX^{-1}=-X^{-1}(dX)X^{-1} and rearrange to gradient form.

Guided checkpoint

What is partial(aTX1b)/partialXpartial(a^TX^{-1}b)/partial X?

Source: Sec. 2.2, eq. 61, p. 10

Section 02

Eigenvalue differentials to Evaluate a quadratic gradient component

01

Eigenvalue differentials

Trace and determinant connect eigenvalue sums/products to their gradients.

Guided checkpoint

Let real symmetric AA have distinct normalized eigenvectors viv_i.

Source: Sec. 2.3, eqs. 65-68, p. 10

02

Vector and matrix form gradients

Quadratic gradients symmetrize the coefficient unless symmetry is already assumed.

Guided checkpoint

Match the scalar expression to its gradient.

Source: Secs. 2.4-2.5, eqs. 69-72 and trace forms, pp. 10-13

03

Evaluate a quadratic gradient component

(A+AT)x=[[4,1],[1,6]][1,2]T=[6,13]T(A+A^T)x=[[4,1],[1,6]][1,2]^T=[6,13]^T.

Guided checkpoint

For A=[[2,1],[0,3]]A=[[2,1],[0,3]] and x=[1,2]Tx=[1,2]^T, compute the first component of nablax(xTAx)nabla_x(x^TAx).

Source: Sec. 2.4.2, p. 11

Section 03

Trace derivative audit to Structured-variable correction

01

Trace derivative audit

Cyclicity permits rotations, not arbitrary permutations; the gradient convention requires careful transposition.

Guided checkpoint

Assume constants have compatible dimensions.

Source: Sec. 2.5, pp. 12-14

02

Norm derivatives

Norm derivatives require attention to zero and nonsmooth points.

Guided checkpoint

Check the domain-sensitive claims.

Source: Secs. 2.6-2.7, p. 14

03

Structured-variable correction

Structured differentiation projects or combines derivatives according to linked parameters.

Guided checkpoint

Why can an unstructured gradient be wrong for symmetric or patterned XX?

Source: Sec. 2 introduction and Sec. 2.8, pp. 8,14-16

Knowledge check

Turn understanding into recall.

The quiz now follows the same concepts in scored form. You can return to this lesson from the quiz whenever a gap appears.