1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Second derivative test

  1. Nov 17, 2011 #1
    1. The problem statement, all variables and given/known data
    [tex]
    \begin{pmatrix}
    -2 & 0 & 0\\
    0 & -2 & 0\\
    0 & 0 & -2
    \end{pmatrix}
    [/tex]

    If I evaluate with eigenvalues, I get:
    [tex]
    det\begin{pmatrix}
    -2-\lambda & 0 & 0\\
    0 & -2-\lambda & 0\\
    0 & 0 & -2-\lambda
    \end{pmatrix}=0
    [/tex]

    [tex](-2-\lambda{)}((-2-\lambda{)}(-2-\lambda{)})=0[/tex]
    and thus
    [tex]\lambda{=}-2[/tex]
    So there exists a local maximum according to this. However, when I evaluate with a different method offered in my textbook, I get a different result, which is confusing me as this method has always worked before.

    [tex]det(-2)=-2<0, det\begin{pmatrix}
    -2 & 0\\
    0 & -2
    \end{pmatrix}=4>0, det\begin{pmatrix}
    -2 & 0 & 0\\
    0 & -2 & 0\\
    0 & 0 & -2
    \end{pmatrix}=-8<0[/tex]
    By this method it is a saddle point. Not entirely sure what is going on here.
     
  2. jcsd
  3. Nov 17, 2011 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    If the matrix above is the Hessian H, then: a stationary point is a strict local max if H is negative-definite, is strict local max if H is positive definite, and is a saddle point otherwise. Furthermore, *a matrix with a negative diagonal element cannot be positive-definite*, so look at K = -H and check whether it is positive-definite (because if -H is positive definite, then H is negative-definite). Obviously, K is positive-definite (by inspection, no tests needed), so your point is a strict local max.

    I find some textbooks treatments to be both confusing and unnecessarily complex. The simplest way is just to always check for positive-definiteness, by changing the sign if necessary (as I did above). The positive-definiteness tests are just a little bit less confusing and are less prone to making errors.

    RGV
     
  4. Nov 17, 2011 #3

    I like Serena

    User Avatar
    Homework Helper

    Hi sandy.bridge! :smile:

    Your method with sub determinants works for eigenvalues greater than zero.
    Note that is the test for the matrix to be positive-definite.

    However, for negative-definite, which is what you are testing, the sub determinants have to alternate between negative an positive (as they do in your case).
     
  5. Nov 17, 2011 #4
    Thanks to both of you. Does it matter in which order they alternate? (For example, can it go +, -, +, and -, +, -?) Not sure why the textbook failed to clarify this. I really like using the sub determinant method as occasionally solving the cubic eigenvalues can be quite time consuming by hand, and time is everything on an exam.
     
  6. Nov 17, 2011 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Actually, the very best way is to use Cholesky factorization, as it involves simple calculations that can be done manually (using no more than a simple hand calculator), and does not need eigenvalues, determinants, or anything else like that. It takes a few minutes to learn, however. Testing matrices up to about 10x10 is quite doable by hand with this method! In actual optimization codes for computer applications, that (or a variant of it) is used for such tests; eigenvalue or determinant methods are rarely used, as they involve many, many times as much work.

    RGV
     
  7. Nov 17, 2011 #6
    I will look into that. However, I don't think I will have time to learn a new concept regarding this before my midterm this weekend. Thus far we have only encountered 3x3 matrices.
     
  8. Nov 18, 2011 #7

    I like Serena

    User Avatar
    Homework Helper

    I must be - + -.
    Odd sizes must be negative, even sizes must be positive.
     
  9. Nov 18, 2011 #8
    And if for example it is -, +, -, it would be considered indefinite (saddle point)?
     
  10. Nov 18, 2011 #9

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    If the Hessian H is _diagonal_, with diagonal elements d1,d2,...,dn, then the associated quadratic form Q(h) = h^T H h has the simple form Q = d1*h1^2 + d2*h2^2 + ... + dn*hn^2. When we test for positive-definiteness, negative-definiteness or indefiniteness, we are asking whether Q(h) > 0 for all nonzero vectors h (that is the *definition* of a positive-definite matrix H) or whether Q(h) < 0 for all nonzero vectors h (= definition of negative-definite) or whether we can have Q(h1) > 0 for some vector h1 and Q(h2) < 0 for some other vector h2 (which is what _indefinite_ means). So, for a diagonal matrix there is no need to test anything: if all di > 0 it is pos.-def., if all di < 0 it is neg.-def. and if the di have mixed signs it is indef.

    What is the meaning of all this (i.e., what is the intuition underlying it)? The
    quadratic form Q(h) is just the second-order term in the Taylor expansion of f(x01+h1, x02+h2,...,x0n+hn) about the stationary point (x01,x02,...,x0n). Q(h) > 0 for all nonzero h means that for any nearby point y, we have f(y) > f(x0), so x0 is a strict local min; Q < 0 means the opposite, so x0 is a local max; and Q indefinite means that x0 is neither a max nor a min, because we can have f(y1) > f(x0) > f(y2) for two nearby points y1 and y2.

    RGV
     
  11. Nov 18, 2011 #10

    I like Serena

    User Avatar
    Homework Helper

    - + - is negative-definite (maximum)
    + + + is positive-definite (minimum)
    anything else that is non-zero is a saddle point
    if anything is zero it is inconclusive
     
    Last edited: Nov 18, 2011
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Second derivative test
  1. Second Derivative Test (Replies: 4)

Loading...