How to solve an equation containing a matrix and its inverse using least-squares?

126 Views Asked by At

I've encountered a problem that needs to be solved by solving the following algebraic equation

$$\mathbf{Y}^\mathsf{T}\mathbf{Q}\mathbf{Y}=\mathbf{X}^\mathsf{T}\mathbf{Q}^\mathsf{-1}\mathbf{X}$$

where $Q$ is a $4 \times 4$ symmetric matrix to be solved. $X$ and $Y$ are both known $4 \times 1$ vectors. There are enough $X$ and $Y$ inputs so that I think a nonlinear least-squares solution must be existed. However, I can not figure it out by myself. Hope you could provide me with some clues.

3

There are 3 best solutions below

2
On BEST ANSWER

I think you can use $\operatorname{vec}$ operator for constructing a least squares problem. But I'm not sure it would produce a consistent answer.

$$\begin{align*} \operatorname{vec}(y^TQy) &= \operatorname{vec}(x^TQ^{-1}x) \\ (y^T \otimes y^T) \operatorname{vec}(Q) &= (x^T \otimes x^T) \operatorname{vec}(Q^{-1}) \end{align*}$$

So, you can write this as

$$ \begin{bmatrix}(y_1^T \otimes y_1^T) & -(x_1^T \otimes x_1^T) \\ \vdots & \vdots \\ (y_N^T \otimes y_N^T) & -(x_N^T \otimes x_N^T) \end{bmatrix} \begin{bmatrix} \operatorname{vec}(Q) \\ \operatorname{vec}(Q^{-1}) \end{bmatrix} = 0$$

for $N$ data you have. From this point the problem becomes finding the null space of the known matrix and selecting the set of vectors such that $Q Q^{-1} \approx I$.

0
On

a) I propose this (very elementary) method. I assume that all the matrices are real.

i) Randomly choose a real symmetric matrix $Q\in S_4$; put $Q[1,1]:=q,Q[1,2]:=r$.

ii) Calculate $p(q,r)=numer(Y^TQY-X^TQ^{-1}X)$ (the numerator of the quotient); it's a polynomial of degree $2$ wrt $q$. Then $d(r)=discrim(p,q)$ (the discriminant of $p$ wrt $q$) is a polynomial of degree $4$ wrt $r$.

You easily obtain a solution in $Q$ if there is $r_0$ s.t. $d(r_0)\geq 0$.

iii) I tested $30000$ random values of the couple $(X,Y)$. In each case, $d(0)>0$. Anyway, if your random $Q$ is not convenient, then choose another $Q$!

If you have a problem with some $(X,Y)$, then write me. Now, it's up to you to work.

EDIT. b) $\textbf{Proposition}$. If for every $i$, $Y_i\not= 0$, then there is at least a solution of $(*)$ $Y^TQY=X^TQ^{-1}X$.

$\textbf{Proof}$. We seek $Q$ in the form $Q=diag(q_i)$ where $q_i\not= 0$.

$(*)$ can be rewritten $\sum_i(q_iY_i^2-\dfrac{1}{q_i}X_i^2)=0$. We choose $q_i=X_i/Y_i$.

$\textbf{Remark}$. After reflexion, I think that there are solutions in any cases. For example, if $Y=0,X=[1,0,\cdots,0]^T$, then a solution is

$Q=\begin{pmatrix}1&1&1&1\\1&2&1&1\\1&1&3&1\\1&1&1&3/5\end{pmatrix}$.

0
On

Presumably the underlying field is real. There are infinitely many solutions but I think the easiest ones are the followings:

  1. If both $X$ and $Y$ are nonzero, set $Q=\frac{\|X\|}{\|Y\|}I$.
  2. If $X=Y=0$, set $Q=I$.
  3. If $X=0\ne Y$, extend $y=\frac{Y}{\|Y\|}$ to an orthonormal basis $\{y,u,v,w\}$ of $\mathbb R^4$. A solution is given by $Q=Q^{-1}=yu^T+uy^T+vv^T+ww^T$.
  4. If $X\ne0=Y$, extend $x=\frac{X}{\|X\|}$ to an orthonormal basis $\{x,u,v,w\}$ of $\mathbb R^4$. A solution is given by $Q=Q^{-1}=xu^T+ux^T+vv^T+ww^T$.