How to generate vectors that satisfy a certain quadratic form?

44 Views Asked by At

Is there some way to come up with a formula that gives me vectors $\mathbf{x}$ that satisfy

$$\mathbf{x \cdot M \cdot x}=c$$

For a given real square symmetric non-singular matrix $\mathbf{M}$ and scalar $c$?

If $c$ were zero then I guess I would be asking for a way to generate vectors in the null space of $\mathbf{M}$.

1

There are 1 best solutions below

0
On BEST ANSWER

In this answer I assume $M$ is symmetric in order for it to define a quadratic form via $\mathbf{x}^TM\mathbf{x}$.


By the Spectral Theorem, we may write $M=PDP^T$ where $P$ is an orthogonal matrix of eigenvectors of $M$ and $D$ is a diagonal matrix of corresponding eigenvalues. Then:

$$\mathbf{x}^TM\mathbf{x}={\left(P^T\mathbf{x}\right)}^T D\left(P^T\mathbf{x}\right)$$

We can hence solve the problem in two steps:

  • First, we solve $\mathbf{y}^TD\mathbf{y}=c$
  • Then we solve $P^T\mathbf{x}=\mathbf{y}$

Notice that since $P$ is orthogonal, $\mathbf{x}=P\mathbf{y}$, so provided we know how to diagonalize $M$, the problem really boils down to the first bullet.


Suppose $M$ is $n\times n$ and let $\lambda_1,\dots,\lambda_n$ be its eigenvalues. Notice that since $M$ is nonsingular, no $\lambda_i$ can equal $0$. Let $\mathbf{y}=(y_1,\dots,y_n)$. Then

$$\mathbf{y}^TD\mathbf{y}=\lambda_1{y_1}^2+\dots+\lambda_n{y_n}^2$$

Hence, some immediate observations are:

  • If the $\lambda_i$ are all the same sign and $c=0$, then $\mathbf{y}=0$ is the only solution.
  • If the $\lambda_i$ are all the same sign and $c\neq 0$ is the opposite sign, then there is no solution.

Now, suppose that $c$ and the $\lambda_i$ are all the same sign, positive without loss of generality. We can rewrite the equation as

$$\sum_{i=1}^n\frac{{y_i}^2}{{\left(\frac{\sqrt{c}}{\sqrt{\lambda_i}}\right)}^2}=1,$$

which defines an ellipsoid in $n$-dimensional space. This is the set of solutions for this case.

Finally, we can use the idea above to tackle the case when the $\lambda_i$ are not all the same sign, and we will get that the solution set is either a hyperboloid $(c\neq 0)$ or a cone $(c=0)$.