Suppose I have square symmetric matrix $A$ (positive definite if necessary) whose diagonals are all $1$ and I want to solve for the off-diagonal elements of $A$ via an optimization:
$\min \frac{1}{2}\left \| A \right \|_F^2$
$s.t.$
$A b_1 = \lambda b_2 $
where $b_1$ and $b_2$ are known vectors, but $\lambda$ is an unknown.
Is there any easy closed-form solution to get $A_{i, j}$'s, aside from differentiating the Langragian with respect to each $A_{i, j}$?
For example, I found this on the internet: if $B = \left \| A \right \|_F$, then $dB = B^{-1} Tr \left(A' dA \right)$. But how do I apply this to solve my problem?
That follows is a solution for $n=3$. Let $A=\begin{pmatrix}1&p&q\\p&1&r\\q&r&1\end{pmatrix},b=[b_1,b_2,b_3]^T,c=[c_1,c_2,c_3]^T$; we assume that $c_1\not= 0$.
$trace(A^TA)=2p^2+2q^2+2r^2+3$. We seek $\inf(p^2+q^2+r^2)$ under the condition: $Ab$ and $c$ are parallel vectors, that is, the $2$ relations:
(1) $f_1=pb_1+b_2+rb_3-(b_1+pb_2+qb_3)c_2/c_1=0$
(2) $f_2=qb_1+rb_2+b_3-(b_1+pb_2+qb_3)c_3/c_1=0$.
We write the Lagrange conditions for the critical point $(p,q,r)$:
There are real $\lambda,\mu$ s.t. the $3$ partial derivatives of $trace(A^TA)/4+\lambda f_1+\mu f_2$ are zero:
(3) $p+\lambda (b_1-b_2c_2/c_1)-\mu b_2c_3/c_1=0$
(4) $q-\lambda b_3c_2/c_1+\mu(b_1-b_3c_3/c_1)=0$
(5) $r+\lambda b_3+\mu b_2=0$.
We obtain $5$ linear equations (1),...,(5) in $5$ unknowns $p,q,r,\lambda,\mu$. In the generic case, there is only one solution.