I have a function $$f(X)=||AX-B||_F$$
I need to find $df(X)$. As I understand the function equals to $$\sqrt{Tr[(AX-B)^T(AX-B)]}$$
What are the steps to obtain $df(X)$?
$$||AX-B||_F^{-1}Tr((AX-B)AdX)$$
I have a function $$f(X)=||AX-B||_F$$
I need to find $df(X)$. As I understand the function equals to $$\sqrt{Tr[(AX-B)^T(AX-B)]}$$
What are the steps to obtain $df(X)$?
$$||AX-B||_F^{-1}Tr((AX-B)AdX)$$
Copyright © 2021 JogjaFile Inc.
I would tackle this using the chain rule, that is, write $f = \| \cdot \|_F \circ g$, where $g(X) := A X - B$ is a smooth function. Now, $d g(X)$ is simple and $d \| \cdot \|_F(Y) = \frac{1}{\| Y \|_F} Y$ for $Y \in \mathbb R^{n \times n} \setminus \{ 0 \}$. Hence $$d f(X) = \frac{1}{\| A X - B \|_F} A^{T} (A X - B).$$
Another option is to differentiate $f^2 = \| A X - B \|_F^2$, which is easier; $d(f^2)(X) = 2 A^{T}(A X - B)$ and the use the chain rule to differentiate $f = \sqrt{\ } \circ f^2$.