Minimizing $\|X-X_0\|_F^2+\|X^{-1}-Y_0\|^2_F$ with respect to matrix $X$ Is there an explicit solution to the problem of minimizing $$\|X-X_0\|_F^2+\|X^{-1}-Y_0\|^2_F$$ with respect to matrix $X$, where $X_0$ and $Y_0$ are given, and all matrices are real  $n\times n$ and invertible?
If not, how to numerically compute a solution to this optimization problem?
 A: Define two new matrix variables
$$\eqalign{
 A &= X-X_0 \cr
 B &= X^{-1}-Y_0 \cr
}$$
Write the function in terms of the Frobenius (:) Inner Product and these new variables. Then finding the differential and gradient is easy.
$$\eqalign{
 f &= A:A + B:B \cr\cr
 df &= 2A:dA + 2B:dB \cr
    &= 2A:dX - 2B:X^{-1}\,dX\,X^{-1} \cr
    &= (2A - 2X^{-T}BX^{-T}\,):dX \cr\cr
\frac{\partial f}{\partial X} &= 2A - 2X^{-T}BX^{-T} \cr\cr
}$$
Setting the gradient equal to zero yields
$$\eqalign{
  A &= X^{-T}BX^{-T} \cr
  X-X_0 &= X^{-T}(X^{-1}-Y_0)X^{-T} \cr
  X^T(X-X_0)X^T &= X^{-1}-Y_0 \cr
}$$
Which suggests an iterative scheme like
$$\eqalign{
  X_+ &= \Big(Y_0 + X^T(X-X_0)X^T\Big)^{-1} \cr
}$$
A: Given $\mathrm X_0, \mathrm Y_0 \in \mathbb R^{n \times n}$,
$$\begin{array}{ll} \text{minimize} & \|\mathrm X - \mathrm X_0\|_F^2 + \|\mathrm Y - \mathrm Y_0\|_F^2\\ \text{subject to} & \mathrm Y = \mathrm X^{-1}\end{array}$$
Define the Lagrangian
$$\mathcal L (\mathrm X, \mathrm Y, \Lambda) := \frac 12 \|\mathrm X - \mathrm X_0\|_F^2 + \frac 12 \|\mathrm Y - \mathrm Y_0\|_F^2 - \langle \Lambda, \mathrm Y - \mathrm X^{-1} \rangle$$
Taking the partial derivatives and finding where they vanish, we obtain three matrix equations
$$\begin{array}{rl} \mathrm X - \mathrm X_0 &= \mathrm X^{-T} \Lambda \mathrm X^{-T}\\ \mathrm Y - \mathrm Y_0 &= \Lambda\\ \mathrm Y &= \mathrm X^{-1}\end{array}$$
Hence,
$$\mathrm X - \mathrm X_0 = \mathrm X^{-T} (\mathrm X^{-1} - \mathrm Y_0) \mathrm X^{-T}$$
Left- and right-multiplying both sides by $\mathrm X^T$,
$$\mathrm X^T (\mathrm X - \mathrm X_0) \mathrm X^T = \mathrm X^{-1} - \mathrm Y_0$$
Unfortunately, I do not know how to solve these nonlinear matrix equations.
A: Given $\mathrm X_0, \mathrm Y_0 \in \mathbb R^{n \times n}$,
$$\begin{array}{ll} \text{minimize} & \|\mathrm X - \mathrm X_0\|_F^2 + \|\mathrm Y - \mathrm Y_0\|_F^2\\ \text{subject to} & \mathrm Y \mathrm X = \mathrm I_n\\ & \mathrm X \mathrm Y = \mathrm I_n\end{array}$$
Define the Lagrangian
$$\mathcal L (\mathrm X, \mathrm Y, \Lambda_1, \Lambda_2) := \frac 12 \|\mathrm X - \mathrm X_0\|_F^2 + \frac 12 \|\mathrm Y - \mathrm Y_0\|_F^2 - \langle \Lambda_1, \mathrm Y \mathrm X - \mathrm I_n \rangle - \langle \Lambda_2, \mathrm X \mathrm Y - \mathrm I_n \rangle$$
Taking the partial derivatives and finding where they vanish, we obtain four matrix equations
$$\begin{array}{rl} \mathrm X - \mathrm X_0 &= \mathrm Y^T \Lambda_1 + \Lambda_2 \mathrm Y^T\\ \mathrm Y - \mathrm Y_0 &= \Lambda_1 \mathrm X^T + \mathrm X^T \Lambda_2\\ \mathrm Y \mathrm X &= \mathrm I_n\\ \mathrm X \mathrm Y &= \mathrm I_n\end{array}$$
Left-multiplying both sides of the 2nd matrix equation by $\mathrm Y^T$, we obtain
$$\Lambda_2 = \mathrm Y^T (\mathrm Y - \mathrm Y_0) - \mathrm Y^T \Lambda_1 \mathrm X^T$$
The 1st matrix equation can thus be written as
$$\mathrm X - \mathrm X_0 = \mathrm Y^T \Lambda_1 + \mathrm Y^T (\mathrm Y - \mathrm Y_0) \mathrm Y^T - \mathrm Y^T \Lambda_1 = \mathrm Y^T (\mathrm Y - \mathrm Y_0) \mathrm Y^T$$
If $\mathrm Y$ is both the left inverse and the right inverse of $\mathrm X$, then $\mathrm Y = \mathrm X^{-1}$. Hence,
$$\mathrm X - \mathrm X_0 = \mathrm X^{-T} (\mathrm X^{-1} - \mathrm Y_0) \mathrm X^{-T}$$
which is the matrix equation obtained in the other answers. Unfortunately, I still do not know what to do with this matrix equation.
