Derivative of linear map? Given $f: \mathbb{R}^{n\times n}\to \mathbb{R}^{n\times n}$, $f(X)=X^TX$, how do I know that $df(A)H=A^TH+H^TA$ for $A\in O(n,\mathbb{R})$ and $H\in \mathbb{R}^{n\times n}$ where $O(n,\mathbb{R})$ is the orthogonal group.
 A: $$
f(X+\epsilon H) = (X+\epsilon H)^T(X+\epsilon H) = \underbrace{X^T X}_{f(X)} + \underbrace{(X^TH+H^T X)}_{f'(X)\cdot H}\epsilon + \mathcal O(\epsilon^2)
$$
A: Recall that a function $\phi : \mathbb R^m \to \mathbb R^k$ is differentiable at $x$ if there exists a linear map $L : \mathbb R^m \to \mathbb R^k$ such that
$$\lim_{h \to 0} \frac{\lVert \phi(x+h) - \phi(x) - L(h)\rVert}{\lVert h \rVert} = 0 .$$
In that case $L$ is uniquely determined and is written as $d\phi(x)$.
Given $X$, the map $L_X(H) = X^TH + H^TX$ is linear and we have
$$f(X + H) - f(X) - L_X(H) = X^TX + X^TH + H^TX + H^TH - X^TX - (X^TH + H^TX) = H^TH .$$
Thus
$$\frac{\lVert f(X + H) - f(X) - L_X(H) \rVert}{\lVert H \rVert} = \frac{\lVert H^TH \rVert}{\lVert H \rVert}$$
Since all norms on finite-dimensional Euclidean spaces are equivalent, we may assume that $\lVert - \rVert$ is a submultiplicative matrix norm (for square matrices) which means that $\lVert A B \rVert \le \lVert A \rVert \lvert B \rVert$. See for example Proof of matrix norm property: submultiplicativity. Hence
$$ \frac{\lVert H^TH \rVert}{\lVert H \rVert} \le \lVert H^T \rVert$$
which goes to $0$ as $H \to 0$. This shows that $df(X) = L_X$.
