Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

"Determine if the following quadratic form is positive definite, negative definite or undefinite
$Q:R^3\to R, Q(u)=x_1^2+4x_1x_2-2x_2^2+2x_1x_3-2x_3^2$"

$$Q=\begin{bmatrix} 1&2&1 \\\ 2&-2&0 \\\ 1&0&-2 \end{bmatrix}$$

  1. I tried to compute the diagonal matrix but the eigenvalues are not integers, thus it's a bit hard to calculate by hand. UPDATE: Seemingly, I've done something wrong previously.
  2. I tried to group them to form squares, however there is nothing that guarantees is either positive or negative. Plugging in numbers results in both positive and negative results.
  3. What else to try?
share|cite|improve this question
Diagonalization in the sense of "congruence" -- i.e., passing from $Q$ to $P^T Q P$ for invertible $P$ -- can always be done within the ground field (I assume the characteristic is not $2$!), so you needn't worry about irrational numbers. The algorithm is straightforward: every time you do an elementary row operation, you follow it with the "same" elementary column operation. – Pete L. Clark Jan 19 '12 at 17:30
@PeteL.Clark is there any paper about this? so I can read more about it – Andrew Jan 19 '12 at 17:33
$@$Andrew: this is really a topic for textbooks rather than papers: you can consult Chapter 1 of any number of texts on quadratic forms (I recommend Lam's book and Cassels' book in particular). I do have a treatment of this material in $\S$ 5 of my own lectures notes: However I discuss the algorithm rather sketchily and give no examples, so I think other sources would serve you better. – Pete L. Clark Jan 19 '12 at 17:44
up vote 2 down vote accepted

Notice that if you add two times the identity matrix to $Q$ then the bottom-right $2\times 2$-submatrix will be $0$.

This shows that $-2$ is an eigenvalue--a corresponding eingenvector is $[0,1,-2]$.

Now use polynomial division to divide the characteristic polynomial by $(\lambda+2)$.

The zeros of the resulting quadratic polynomial are the two remaining eigenvalues.

share|cite|improve this answer
I didn't hear of this trick, working with a submatrix. Can you explain it a bit? I was doing it the long way(I think), by computing $det(A-\lambda I_n)=0$ – Andrew Jan 19 '12 at 16:41
It simply meant that the entries with index $(2,2)$, $(2,3)$, $(3,2)$, $(3,3)$ vanish in $Q+2\mathrm{Id}$. It's not trick--just an observation allowing to guess one of the eigenvalues. – Rasmus Jan 19 '12 at 17:03
So the rule says? If you can find a submatrix(at least 2x2?) that can be transformed to 0's by adding/subtracting something times the identity matrix, that something is a (possible?) eigenvalue? – Andrew Jan 19 '12 at 17:13
Well, suppose you have a matrix of the form $$Q=\begin{bmatrix} a&b&c \\\ d&0&0 \\\ e&0&0 \end{bmatrix}$$ such that $b\neq 0$ or $c\neq 0$. Can you guess a non-zero vector in the kernel? – Rasmus Jan 19 '12 at 17:16
$d=e=0$ and $x_2[\frac{-b}{a} \ b \ 0]^T+x_3[\frac{-c}{a} \ 0 \ c]^T$, is this what you asked me? – Andrew Jan 19 '12 at 17:27

The first vector of the canonical basis being positive and the second negative, the form is indefinite.

EDIT A. More careful phrasing:

The restriction of $Q$ to the first coordinate axis being positive definite, and its restriction to the second coordinate axis being negative definite, $Q$ is indefinite.

EDIT B. If the matrix of a quadratic form on $\mathbb R^n$ has a positive ($ > 0$) diagonal entry and a negative ($ < 0$) diagonal entry, then it is indefinite.

share|cite|improve this answer
The canonical basis is exactly like $Q$? – Andrew Jan 19 '12 at 16:51
Dear @Andrew: I edited the answer. Is it clearer now? – Pierre-Yves Gaillard Jan 19 '12 at 16:58
Dear @Andrew: Do you agree that any quadratic form whose matrix has a positive diagonal entry and a negative diagonal entry is indefinite? – Pierre-Yves Gaillard Jan 20 '12 at 1:25
Yes, I agree with what you said. – Andrew Jan 20 '12 at 8:03

The principal determinant method is easy to apply, the eigenvalue method is more tedious

share|cite|improve this answer
and there is another way to solve the problem , Theorem / Let A be a symmetric matrix of order m. Then A is positive definite iff its naturally ordered principal minors are all positive. – maher Feb 19 '12 at 18:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.