# How to prove the derivative of $a^{T} A^{-1} b$ with respect to $A$

So I can find from the matrix cookbook here:

$$\frac{\partial a^TX^{-1}b}{\partial X} = -X^{-T}ab^TX^{-T}$$

To prove it, I have tried expanding:

$$a^TX^{-1}b = \sum\limits_{i,j}^{n,n}a_i(X^{-1})_{ij}b_j$$

I can also find from cookbook where:

$$\frac{\partial (X^{-1})_{ij}}{\partial X_{ij}} = -(X^{-1})_{ij}(X^{-1})_{ij}$$

However, what I cannot figure out is that where did that transpose come from?

Any idea and help are appreciated!

• – user550103 Dec 6 '18 at 6:30
• Thank you very much for the referring. It is really helpful. – Wei Dec 6 '18 at 23:19