# Do $f_{xx}$ and $f_{yy}$ always have the same sign?

Since this test should remain accurate if we exchange the roles of xx and yy, one would suspect $f_{xx}$ and $f_{yy}$ always have the same sign. Is it true?

• I think the following should be clarified, since a lot of answers seemed not to get it: "considering the symmetry" means "since this test should remain accurate if we exchange the roles of $x$ and $y$...". – Omnomnomnom Aug 8 '16 at 14:44

It is true that whenever $D>0$, $f_{xx}$ and $f_{yy}$ will have the same sign. Otherwise, we would necessarily have $f_{xx}f_{yy} \leq 0$, which would mean that $D = f_{xx}f_{yy} - (f_{xy})^2 \leq 0$.

• How do you prove that? – qed Aug 8 '16 at 14:28
• @qed I would say that my "Otherwise..." constitutes a proof by contradiction. Is there a step there that needs clarification? – Omnomnomnom Aug 8 '16 at 14:30
• Ah, sorry, didn't see it that way. I thought it was just a second statement. Thanks! – qed Aug 8 '16 at 14:31
• @qed I guess it's technically both? And you're welcome. – Omnomnomnom Aug 8 '16 at 14:40

Consider $f(x,y)=x^2-y^2$. Then $f_{xx}(0,0)=2$ whereas $f_{yy}(0,0)=-2$

This is the graph of the function in the other answers. The second derivatives you ask about tell whether the curve that's the intersection of this surface with the planes perpendicular to the $x$ and $y$ axes are concave up or down. At the saddle point one is up and one is down.
• It's not clear how this relates to the signs of $f_{xx}$, $f_{yy}$ and $D$. Could you elaborate? – qed Aug 8 '16 at 14:38
Counterexample : if $f(x,y)=x^2-y^2$, $f_{xx}=2$ and $f_{yy}=-2$.