2

I have the quadratic form

$$g = x_1^2+6x_2^2+8x_4^2-4x_1x_2-6x_1x_3-x_2x_3$$

whose corresponding matrix is

$$\begin{bmatrix} 1 & -2 & -3 & 0 \\ -2 & 3 & -\frac{1}{2} & 0 \\ -3 & -\frac{1}{2} & 0 & 0 \\ 0 & 0 & 0 & 4\end{bmatrix}$$

I have to either determine in two ways if the form is positive definite or determine in two ways for which values of $\lambda$ the form is positive definite.

The way to determine if the form is positive definite is to compute determinants for each matrices that are formed from the upper right corner. So the first would simply be $\det|1|=1$, the second would be

$$\det\begin{vmatrix}1 & -2 \\ -2 & 3\end{vmatrix}=-1$$

Then

$$\det\begin{vmatrix} 1 & -2 & -3 \\ -2 & 3 & -\frac{1}{2} \\ -3 & -\frac{1}{2} & 0 \end{vmatrix}=-3\begin{vmatrix} -2 & -3 \\ 3 & -\frac{1}{2} \end{vmatrix} + \frac{1}{2}\begin{vmatrix} 1 & -3 \\ -2 & -\frac{1}{2}\end{vmatrix}=-30-\frac{13}{4}= -\frac{133}{4}$$

So from there I already see that not all determinats that are formed from upper right corner is positive, should I still compute all the rest?

Second way is to make it in row echelon form:

$$A = \begin{pmatrix}1 & -2 & -3 & 0 \\ 0 & -1 & -\frac{13}{2} & 0 \\ 0 & 0 & -\frac{133}{4} & 0 \\ 0 & 0 & 0 & 4 \end{pmatrix}$$ So, again it's visible that not all pivots are positive therefore the matrix is not positive definite, am I right?

I just want to make sure, that I did everything correctly, and also to ask about the second option how to determine the definiteness of the matrix, it's said that it depends on $\lambda$, but where that $\lambda$ should be, is it the same to ask to compute the eigenvalues and then determine whether they are positive? I only know one way to do that, and that is to compute $\det(A-\lambda I)=0$, how to do it in a different way?

user
  • 1,412
  • 3
    The row-echelon form thing you did isn't really valid. For example could just multiply the rows with negative pivots by $-1$ and get another valid row-echelon form with all positive pivots, which would probably change your conclusion. – Minus One-Twelfth Jun 01 '19 at 12:53
  • In the first case, you need not compute all the determinant. From there where you find one determinant is not positive, you can conclude that the matrix is not positive definite. – nmasanta Jun 01 '19 at 12:56
  • 1
    The diagonal of the matrix is wrong. – Rodrigo de Azevedo Jun 01 '19 at 12:57
  • I honestly can't speak about a general quick and easy method that scales up, but computing eigenvalues directly may not be so bad in this particular problem. – Mnifldz Jun 01 '19 at 12:57
  • The coefficient of $x_3^2$ in $g$ is a tip-off. The correct calculation of $\det\pmatrix{1&-2\-2&3}=3-4=-1$ is another. – kimchi lover Jun 01 '19 at 13:01
  • Since $\lambda$ appears in neither the quadratic form nor the matrix, you’ll need to provide more context for this question for anyone besides you to make any sense of how it might enter into the problem that you’ve been set. – amd Jun 01 '19 at 23:29
  • @Mnifldz The eigenvalues are rather unpleasant. There’s one obvious one, but things get bad quickly after that. – amd Jun 01 '19 at 23:30
  • Rewrite the quadratic form as a linear combination of squared terms. There are several ways to do this, such as successively completing squares. Equivalently, diagonalize the matrix (after you’ve corrected it). Remember that you don’t have to use eigenvalues and eigenvectors to do this. – amd Jun 01 '19 at 23:33
  • I don't know what techniques your exercise expects, but in numerical computing a standard way to check if a matrix is positive definite is to attempt to compute a Cholesky decomposition. –  Jun 02 '19 at 10:05
  • @Rahul After computing a Cholesky decomposition I got $\left[\begin{matrix} 1 \ -2 & \sqrt{-1} \ -3 & -\frac{13}{6} & \sqrt{-\frac{11}{36}} \end{matrix}\right]$ So, is it true, that because there are negatives under the root it is not positive definite? Or there is other way to tell? – user Jun 03 '19 at 20:43
  • @amd I tried to complete the square, but was quite unsuccessful and diagonalization was undoable because the the values were quite unorthodox ( I checked at online calculator). – user Jun 03 '19 at 21:50
  • There are other ways to diagonalize the matrix aside from computing eigenvalues and eigenvectors. For instance, you can simultaneously apply elementary row and column operations to the matrix. Something like what you attempted, but for each row operation you perform, you must also apply the same column operation. – amd Jun 03 '19 at 22:29
  • Yes, the moment you try to take the square root of a negative number, you know that the Cholesky decomposition has failed so the matrix is not positive definite. –  Jun 04 '19 at 02:48

1 Answers1

4

You’ll have better luck getting the correct answer if you construct the matrix correctly. For some reason, you’ve divided all of the coefficients, including the entries along the diagonal, by $2$ when collecting the matrix elements from the quadratic form. The correct matrix is $$Q=\begin{bmatrix}1&-2&-3&0\\-2&6&-\frac12&0\\-3&-\frac12&0&0\\0&0&0&8\end{bmatrix}.$$ Applying Sylvester’s criterion, we have $$q_{11}=2 \\ \begin{vmatrix}1&-2\\-2&6\end{vmatrix} = 2 \\ \begin{vmatrix}1&-2&-3\\-2&6&-\frac12\\-3&-\frac12&0\end{vmatrix} = -\frac{241}4$$ at which point there’s no need to compute $\det Q$ (although in this case it’s a trivial computation given the previous determinant). Similarly, you could’ve stopped after computing the $2\times2$ determinant in your original calculations since you already had a negative value at that point, albeit for the wrong matrix.

You can use elementary matrix operations to determine the signature of the quadratic form, but you have to apply the same column operations as you do row operations. Elementary row operations by themselves obviously don’t preserve eigenvalues or even their signs: every invertible matrix is row-equivalent to the identity matrix. Applying this process to $Q$ above yields $$\begin{bmatrix}1&0&0&0\\0&2&0&0\\0&0&-\frac{241}8&0\\0&0&0&8\end{bmatrix},$$ so $Q$ is not positive-definite. (If you first augment $Q$ with an appropriately-sized identity matrix, this process will also give you the diagonalizing basis; see this question for details.)

You could, of course, attempt an orthogonal diagonalization by computing eigenvalues and eigenvectors for the matrix, but after finding the eigenvector $(0,0,0,1)^T$ with eigenvalue $8$ by inspection, it all turns rather ugly. However, you only need to know the signs of the eigenvalues, which can be determined without computing them explicitly. The characteristic polynomial of $Q$ is $(\lambda-8)\left(\lambda^3-7\lambda^2-\frac{29}4\lambda+\frac{241}4\right)$, and Descartes’ rule of signs tells us that the cubic factor has two positive roots and one negative root.

Finally, there’s the tried-and-true method of successively completing squares: $$\begin{align} x_1^2 +6x_2^2+8x_4^2-4x_1x_2-6x_1x_3-x_2x_3 &= (x_1-2x_2-3x_3)^2\color{red}{-4x_2^2-9x_3^2-12x_2x_3}+6x_2^2-x_2x_3+8x_4^2 \\ &= (x_1-2x_2-3x_3)^2+2x_2^2-13x_2x_3-9x_3^2+8x_4^2 \\ &= (x_1-2x_2-3x_3)^2+2\left(x_2-\frac{13}4x_3\right)^2\color{red}{-\frac{169}8x_3^2}-9x_3^2+8x_4^2\end{align}.$$ You can stop at this point since it’s obvious that the coefficient of $x_3^2$ is negative.

amd
  • 53,693