# Question about positive definite matrices and negative definite matrices

Let $C\in Mn$ symmetric matrices which have k positive diagonal entries, and n-k negative diagonal entries, where is $k\in \{1,2...,n-1\}$. Try to figure when that matrices positive definition, when is negative definition, and when is not definite. Explain the answer.

If matrices positive definite, the pivots must be positive, here first pivot is $a11$ so it must be positive,so we have $k\geq1$ but i know that diagonal entries must be positive if you want positive definite matrices, because if you have $ei^{T}Aei=0\cdot a11\cdot0+....1\cdot aii\cdot 1$ and your diagonal entries are not positive than matrices do not positive definite for every eigenvector,but here we can only have n-1 positive diagonal entries and i still have one negative diagonal entries, and how it can be positive definite?