Finding $B$ that minimizes the frobenius norm $|A-B|_F$ for symmetric $B$

307 Views Asked by At

Find the matrix $B$ that minimizes

$$ |A-B|_F$$

for $A$ and $B$ $n\times n$ matrices, $B$ symmetric

What I did:

$$f(b_{11}, b_{21}, \cdots, b_{n1}) = |A-B|_F^2 = \sum_i^n\sum_j^n (a_{ij}-b_{ij})^2$$

so we have a function that has the 'lower diagonal triangle' of $B$ as its variables, since the upper diagonal is automatically determined because $B$ is symmetric.

$$\frac{\partial f}{\partial b_{ij}} = -2(a_{ij}-b_{ij}) = 0 \implies b_{ij} = a_{ij}$$

so the solution is a matrix $B$ where the lower diagonal is identical to $A$ and the upper diagonal is determined by the lower one.

Is it this simple?

Recall that the second derivatives are all $+2$ so a point where $\nabla f = 0$ would indeed be a minimum

2

There are 2 best solutions below

0
On BEST ANSWER

Given $i \ne j$, we want to minimize

$$(b_{ij}-a_{ij})^2 + (b_{ij}-a_{ji})^2$$

Differentiate wrt $b_{ij}$,

$$2(b_{ij}-a_{ij})+2(b_{ij}-a_{ij})=0$$

Hence $$b_{ij}=\frac{a_{ij}+a_{ji}}{2}$$

That is $$B=\frac12 (A+A^T)$$

0
On

You computed the partial derivative incorrectly. There are two terms in $|A-B|_F^2$ that depend on $b_{ij}$, namely $(a_{ij} - b_{ij})^2$ and $(a_{ji} - b_{ij})^2$. Since $A$ is not necessarily symmetric, $a_{ij}$ may not be equal to $a_{ji}$.