Suppose $A$ and $B$ are known matrices, and we are to find matrix $X$ that minimizes the following function,
$$\frac{1}{2}||X||^2+\frac{1}{2}||X^TAX-B||^2$$
Taking the relevant derivative w.r.t $X$ gives us, $$ X +(X^TAX-B)(A+A^T)X$$
I couldn't reduce the derivative further as $A$ is not necessarily a square matrix; so, $(A+A^T)$ would be invalid. I am using the formula in slide 17, Matrix Calculus to differentiate $X^TAX$ to $(A+A^T)X$
Is there a way to circumvent this issue?
Thank you.
By the AGM inequality, $\frac{1}{2}(||X||^2 + ||X^TAX - B||^2) \geq ||X||||X^TAX - B||$ with equality if $||X|| = ||X^TAX - B||$. So the minimum occurs when $X = X^TAX - B$.