Professional Documents
Culture Documents
1 Introduction
This is a collection of di erentiation rules for matrices and vectors. Uppercase letters are matrices,
lowercase are vectors.
tr(A) I
xT AT MAx 2MAxxT
kAAT ; I k22 4(AAT ; I )A
Ax Some horrible tensor . . .
5 Those horrible tensors in full
OK, we want to di erentiate Ax. What do we mean? Well each of the 3 components of x has a
matrix of derivatives:
@xi
@apq
And that's our answer. The question is how to do anything with it. Well, rst let's write out Ax
in longhand: X
Ax]i = aij xj
j
And using the summation convention1 we can drop the sigma. Now we have a table translating
common matrix operations to the summation form.
Operation Summation Form
a = x y ai = xk yk
y = Ax yi = Aik xk
C = AB Cij = Aik Bkj
tr(A) Akk
AT AT ]ij = Aji
Note that we often need to bring in a new index to \do" the summation for us. Also, if we want
to have say uT v + aT b, we must use a di erent index for each half: up vp + aq bq for example.
@ bT Ax, which is given above as bxT . First we write
Now let's look at a specic problem: Find @A
the expression in the summation convention:
bT Ax = b (Ax)
= b Aij xj ]3i=1
= bi Aij xj
Now we've got two summation signs on the outside, we can just bring in the derivative operator
and apply normal rules to
@ @Aij
@A (bi Aij xj ) = bi @A xj
pq pq
@A is zero unless i = p and j = q . This is written using the Kronecker delta
Finally we note that @A ij
as:
pq
@Aij
@A = ip jqpq
1 Any repeated subscript is summed over.
Which goes back into the original problem to give
@bT Ax @
@A pq = @Apq (bi Aij xj )
= bi ip jq xj
= bp xq
= bxT ]pq