9
$\begingroup$

Hope it is a right place to ask how to solve the equation on $\mathbf x$: $$ \mathbf x^T \mathbf A\mathbf x + \mathbf x^T \mathbf b + c = 0. $$ where:
$\mathbf x$ is an $n\times 1$ column vector
$\mathbf A$ is an $n\times n$ matrix
$\mathbf b$ is an $n\times 1$ vector
$c$ is a scalar
Thanks

  • 2
    Welcome to MSE! The set of solutions of your equation forms a quadratic hypersurface. The procedure of finding it is not too difficult, but it takes a little bit of space, so I'm not going to try to describe it to you. May be somebody else will? [The principal axis theorem](http://en.wikipedia.org/wiki/Principal_axis_theorem) plays a key role (it has an $n$-dimensional analogue). Hopefully you have seen images of spheres, ellipsoids, parabaloids, cones, hyperboloids, parabolic hyperboloids (=saddle surface) et cetera in the case $n=3$. Something very similar will happen here.2011-07-20
  • 1
    If $A$ happens to be symmetric, then the solution of your equation is equivalent to finding all points on a quadric in $\mathbb{R}^n$.2011-07-20
  • 2
    @Shaun: Does the equation not stay the same, if we replace $A$ with $(A+A^T)/2$? So we can always assume that $A$ is symmetric?2011-07-20
  • 2
    I cleaned up the math notation, and a notice says that my edits await "peer review".2011-07-20
  • 3
    @Michael: They've been reviewed in the meantime. You can edit with reputation $\ge2000$. BTW, are you the Michael Hardy from Wikipedia? If so, I'm glad you found your way here :-) (I'm also joriki from Wikipedia.)2011-07-20
  • 2
    Yes---I'm the same person.2011-07-21

1 Answers 1

6

Hint 1: We can assume ${\bf A}$ is symmetric. If it's not, we can replace it by ${\bf B}=({\bf A}+{\bf A}^T)/2$, because ${\bf x}^T {\bf A}{\bf x} = {\bf x}^T {\bf B}{\bf x}$ (check it). (That's why quadratic equations are usually expressed using symmetric matrices; we don't lose generality).

Hint 2: This is the generalization of the (scalar) quadratic $$ax^2 + b x + c = 0$$ Do you know how to solve it (completing the square)? If so, try to generalize the procedure. If not, learn it.

Hint 3: Consider the special case ${\bf x}^T {\bf x} = v$. If $v$ is positive, the solutions lie on a sphere. Now, if ${\bf x^T A x} = v$ , if we can write ${\bf A} = {\bf P \Lambda P^T }$ (we can if A is symmetric), we make a change of variable ${\bf z} = {\bf P^T x}$ (a rotation of axis) and we get the equation of a (hyper)ellipse, if $ v$ is positive and ${\bf \Lambda }$ is diagonal with positive entries.

  • 0
    The matrix A is symmetric (it's covariance).2011-07-21
  • 1
    @Serg: Do you know how to diagonalize that symmetric matrix? You need to do that step (and the related change of coordinate systems) before you can start completing the squares. If you don't, look up some linear algebra books for help.2011-07-21
  • 0
    So, the best hint was to diagonalize matrix A.
    Now I get it by denoting A = V'*D*V, z = V*x.
    Thanks!
    2011-07-22
  • 0
    Not sure why you're making $v$ bold when it's a scalar...2011-07-22
  • 0
    @anon: my bad, fixed2011-07-22
  • 2
    I am wondering if you can make this answer more explicit rather than just giving the hints. I have a similar problem that I feel may be solvable this way, but I am no linear algebra expert and it would be nice to see the full solution for this.2018-08-22