12

An ellipsoid centered at the origin is defined by the solutions $\mathbf{x}$ to the equation $\mathbf{x}^TM\mathbf{x} = 1$, where $M$ is a positive definite matrix. How can I see why $M$ needs to be positive definite, based on the equation of an ellipse $Ax^2 + Bxy + Cy^2 = 1$ where $B-4AC < 0$? It looks like the idea is to make $B-4AC < 0$ equate to the requirement that all eigenvalues of $M$ are positive for a $2 \times 2$ matrix, but I can't seem to make it work. Also, what other shapes can we represent with $\mathbf{x}^T M \mathbf{x} = 1$ when $M$ is not positive definite?

scip
  • 969
  • 1
    How about other conics? Parabolas, hyperbolas, double lines... – Jack D'Aurizio Aug 19 '15 at 16:38
  • Could you explain what requirements on A are needed to represent those conics? – scip Aug 19 '15 at 16:41
  • 1
    https://en.wikipedia.org/wiki/Conic_section#Discriminant_classification – Jack D'Aurizio Aug 19 '15 at 16:42
  • 4
    Well, first it would help to know that if $A=\begin{bmatrix} a & b \ b & c \end{bmatrix}$ (i.e. $A$ is $2 \times 2$ and symmetric) and $z=\begin{bmatrix} x \ y \end{bmatrix}$ then $z^T A z = ax^2+2bxy+cy^2$. So $a$ matches your $A$, $2b$ matches your $B$, and $c$ matches your $C$. Now $B^2-4AC=4b^2-4ac$ has the opposite sign of the determinant of $A$. So $B^2-4AC<0$ is equivalent to $\text{det}(A)>0$. Finally the determinant is the product of eigenvalues, so knowing its sign tells you things about the sign of the eigenvalues. Can you work from there? – Ian Aug 19 '15 at 16:51
  • 1
    Eh, I can be more explicit. The determinant is the product of the eigenvalues; the trace is the sum of the eigenvalues. Therefore if the determinant is zero, then you have one zero eigenvalue, and the other eigenvalue is the trace. If the determinant is negative, then you have one strictly positive eigenvalue and one strictly negative eigenvalue. If the determinant is positive, then both eigenvalues have the same sign, which is the same sign as the trace. So a symmetric $A$ is positive definite iff $a+c>0$ and $ac-b^2>0$. – Ian Aug 19 '15 at 17:03

2 Answers2

26

Consider the factorization of the matrix $A$ which is always possible since $A$ is a real symmetric matrix, and the : $A=P\Lambda P^{-1} =P\Lambda P^T$, where the matrix $P$ is orthogonal because $A$ is symmetric, and the diagonal matrix $\Lambda$ contains the eigenvalues of $A$. Then the ellipsoid can be rewritten as:

$$x^TP\Lambda P^Tx = (P^Tx)^T\Lambda(P^Tx) = y^T\Lambda y = 1$$

where, of course, $y$ is derived from the linear map $\varphi:\mathbb{R}^n \to \mathbb{R}^n$, defined as $y = \varphi(x) = P^Tx$. Now, $P$ represents a pure rotation (since it is orthogonal, it preserves the norm of a vector) so that this new expression describes an ellipsoid having its axes aligned with the canonical base axes $e_1, \dots, e_n$. Since the matrix is diagonal, the quadratic form gives:

$$y^T\Lambda y =\lambda_1y_1^2+\dots+\lambda_ny_n^2 = 1$$

Of course, you could recognise the canonical form of an ellipsoid:

$$\frac{y_1^2}{c_1^2} + \dots + \frac{y_n^2}{c_n^2}=1$$

where $c_i$ is the length of the $i$-th semiaxis. But, if the matrix is not positive definite, then the eigenvalues could assume also zero or even negative values.

In the first case, $c_i^2$ cannot exist since it should be obtained as $\frac{1}{\lambda_i}$, but dividing by zero is not allowed. In a suggestive way of thinking, it is like the ellipsoid were infinitely extended along that direction $e_i$, then it cannot be an ellipsoid.

In the second case, the $c_i$ become complex numbers, because they are the root of a negative number, and if all are negative, the ellipsoid is said 'imaginary' for trivial reasons.

Vexx23
  • 984
0

I really like Vexx23's answer. It provides a sound mathematical understanding. Although, I want to offer a more intuitive way of seeing that positive definiteness is necessary, that is less mathematically sound, but may help your brain accept the criteria.

  1. Let's accept that all level curves $\mathbb{L}(c) \triangleq \{x ~\Big|~ x^\top M x = c\}$ form ellipsoids centered at $0$, when $M \succ 0$. (This is seen from Vexx23's answer)

  2. Let's also assume that there is at least one positive eigenvalue.

  3. Now what we wish to convince ourselves about, is that if $M$ is not pos.def., then the level sets are definitely not ellipsoids.

If we imagine several ellipsoids center at the origin, bigger and bigger for larger and larger level-values, like the layers of an onion, then we realize that the function value must strictly increase as we evaluate points further and further away from the origin in a given direction. That is, a vector $\boldsymbol{x} = \boldsymbol{e}\epsilon$ extending outwards from the origin in a given direction; $\boldsymbol{e}$, must strictly increase the function value in that direction. Mathematically, we can write: $$f_{\boldsymbol{e}}(\epsilon) \triangleq (\boldsymbol{e}\epsilon)^\top M (\boldsymbol{e}\epsilon)$$ where $f$ must have strictly positive derivative. If this is not the case, then there is a point along the direction $\boldsymbol{e}$ where the level does not strictly increase, taking us to the next layer in the onion (the next ellipsoid out). This must be the case for any direction $\boldsymbol{e}$.

Now let's see what happens at the 'eigendirections', the directions that the eigenvectors point in (these are also the semi-axes of the ellipsoids). Consider the eigenvector $v_i,~||v_i||=1$ (a direction), which has an associated eigenvalue; $\lambda_i$. We then have $$f_{v_i}(\epsilon) = (\boldsymbol{v_i}\epsilon)^\top M (\boldsymbol{v_i}\epsilon) = \lambda_i \epsilon^2 \underbrace{\boldsymbol{v_i}^\top \boldsymbol{v_i}}_{=1} = \lambda_i\epsilon^2$$ Therefore, if an eigenvalue is negative, then the value $x^\top M x$ does not increase when extending in this eigendirection. The level sets can therefore not form these nice onion layers. (Instead, you get hyperbola-layers. Try plotting in Wolfram alpha: Ellipsoids, Hyperbolas)

Furthermore, what if all eigen values are negative, making $M$ negative definite? Then the levels are all negative, but the same idea applies.