# Differentiating an inner product w.r.t matrices

Let $$M_n(\mathbb{R})$$ denotes the space of all $$n \times n$$ matrices identified with the Euclidean space $$\mathbb{R^{n^2}}$$. Fix a column vector $$x \neq 0$$. Define $$f:M_n(\mathbb{R}) \rightarrow\mathbb{R}$$ by $$$$f(A)= \langle A^2x,x\rangle$$$$ I am trying to prove $$f$$ is differentiable.

It looks like you have to find the derivative w.r.t the matrix $$A$$. How do I do that? Any help is appreciated.

• Just to add another way to think about it. You can show that $f(A)$ is a polynomial in $a_{ij}$. So all $\frac{\partial f}{\partial a_{ij}}$ exist and are continuous, hence, the function has a total derivative by this theorem ( calculus.subwiki.org/wiki/… ) – user25959 Dec 7 '18 at 2:12

For bilinear continuous functions $$B,$$ we have the product rule $$B'(x,y) \cdot (h, k) = B(x,k) + B(h,y).$$
Consider now the bilinear continuous function $$\theta(u, v) = (u \mid v)$$ (standard inner product in $$\mathbf{R}^2$$), the bilinear function $$\varphi(A_1, A_2) = A_1A_2$$ (matrix product), the function $$\psi(N) = (Nx, x),$$ whose derivative is $$\psi'(N) \cdot H = (Hx, 0)$$ and the function $$\tau(A) = (A, A),$$ which is linear, hence $$\tau'(A) = \tau.$$ The chain rule gives the derivative of $$f = \theta \circ \psi \circ \varphi \circ \tau$$ (that is, $$f$$ is differentiable).