1

I have an equation such as

$$ X^{T}AX + X^{T}B + C = 0 $$

where $X, A, B,$ and $C$ are members of $\mathbb{R}^{n\times n}$. I would like to solve for $X.$ Nothing can be said about the symmetry or invertibility of $A, B,$ or $C$. In fact, $A$ is definitely not invertible.

$X$ has elements $\in \{0, 1\}$ on the diagonal only, so $X = X^{T}$ and $X = X^{n}, \forall n \gt 0$ so if I can get the quadratic terms together, it becomes a linear equation.

I thought to complete the square to get it in the form $$ (X - H)^{T}A(X - H) + K = 0 $$

where $H = -(A + A^{T})^{-1}B$ and $K = C - H^{T}AH$ but this didn't work because $(A + A^{T})$ is not invertible.

Obviously for real numbers, one could use the quadratic formula but I'm not sure how to proceed for the matrix case. I checked other posts for a solution but could not find anything for this type of problem specifically. This post seemed relevant but not relevant enough for me to solve my problem.

EDIT: Added that factorization didn't work, $A$ is not invertible, and $X = X^{2}$

  • If $K$ and $A$ commute and $KA^{-1}$ is diagonalizable the solution $$X = H + \sqrt{-KA^{-1}}$$ works out. If those two conditions don't hold this would be much harder, and I'd suspect an analytic answer doesn't exist if the commutativity doesn't hold. – Ninad Munshi Sep 21 '20 at 19:34
  • K and A do in fact commute but $KA^{-1}$ isn't diagonalizable – Trevor Phillips Sep 22 '20 at 02:58
  • Then you're in good shape. Square root still exists for non diagonalizable matrices, just in a slightly altered form. – Ninad Munshi Sep 22 '20 at 12:21
  • Actually I made an invalid assumption in my original post (edited now), because $A + A^{T}$ is not invertible, so the factorization doesn't work. – Trevor Phillips Sep 22 '20 at 22:09

1 Answers1

1

If $X=X^2$ then

$$X^TAXX+X^TBX+CX = X^T(A+B)X+CX = 0$$

and

$$X^TX^T(A+B)X+X^TCX = X^T(A+B+C)X = 0$$

Can you proceed from here?


$\textbf{Edit:}$ What can also help is that $X$ can be written as

$$X = \sum_i c_i \cdot e_ie_i^T$$

where $e_i$ are the standard basis vectors for $\Bbb{R^n}$

Ninad Munshi
  • 37,891
  • Thank you! Good observation to rewrite as $X^{T}(A + B + C)X$. From this I believe that all vectors in the nullspace of $(A + B + C)$ will be solutions, when re-written as diagonal matrices. However when actually implementing it, none of the solutions (although valid) give an $X$ which I know works, so I wonder if there are more solutions since X appears twice? – Trevor Phillips Sep 23 '20 at 01:04
  • Ah I think I know: the "X which I know works" is probably the diagonal of a linear combination of some vectors in the nullspace. I guess then the tricky part is finding a linear combination that creates a vector with all members in {0, 1}. – Trevor Phillips Sep 23 '20 at 01:15
  • @TrevorPhillips there is a much more clever abstract solution. Namely, an operator such that $X^2 = X$ is called an idempotent operator, or more illuminatingly a projection operator. In other words the $X$ that will work is a projection on to the null space of $A+B+C$ or where the range of $A+B+C$ is in the null space of $X$ – Ninad Munshi Sep 23 '20 at 02:56