Sylvester's law of inertia 
Considering the bilinear form on $R$, $\phi$, defined by the matrix
  \begin{bmatrix}{-1}&{-1}&{-1}\\{-1}&{1}&{0}\\{-1}&{0}&{1}\end{bmatrix}
  Classify, according to the Sylvester's law of inertia this bilinear
  form and specify if it is a definite positive.

After reading in various books and sites about the Sylvester's law of inertia, I still don't understand why it is used and, more concretely in this problem, how to classify a bilinear form.
Thanks in advance for explaining the Syvester's law of inertia and how should approach this problem. 
 A: ##Small introduction##
Let $\mathbf{x},\mathbf{y}\in\mathbb{R}^n$ be a vectors and $\mathcal{F}: \mathbb{R}^n\times\mathbb{R}^n\to \mathbb{R}$ is bilinear form, i.e. map which is linear with bouth arguments. Because of linearity of map $\mathcal{F}$ it is possible to represent it using $n\times n$ matrix $F$ in a such way:
$$
\mathcal{F}(\mathbf{x},\mathbf{y}) = \mathbf{x}^{\top}F\mathbf{y}.
$$
The map $\mathcal{Q}: \mathbb{R}^n\to\mathbb{R}$ giving by formula $\mathcal{Q}(\mathbf{x}) = \mathcal{F}(\mathbf{x},\mathbf{x})$ is called quadratic form and this is what Silvester's law of inertia applied to. There are two ways to represent quadratic form:

*

*using matrix: $\mathcal{Q}(\mathbf{x}) = \mathbf{x}^{\top}A\mathbf{x}$;

*"as is": $$\mathcal{Q}(\mathbf{x}) = \sum_{i,j=1}^{n}a_i^jx_ix_j,$$ where $a_i^j$ is element of $i$-th row and $j$-th column of matrix $A$ and $x_i$ is $i$-th component of vecotr $\mathbb{x}$.

We may consider only symmentric matrices because if matrix $A$ is not symmetric we may substitude it with symmetric matrix $A'$ such that ${a'}_i^j = {a'}_j^i = (a_i^j + a_j^i)/2$.
##Law of inertia##
Quadratic form is defined positive if it is positive for all arguments. It's easy to determine if form $\mathcal{Q}$ positive defined or not if it is diagonal, i.e. if
$$
\mathcal{Q}(\mathbf{x}) = \sum_{i=1}^{n}a_i^ix_i^2.
$$
Indeed, it's obvious that $\mathcal{Q}$ is positive defined iff each number $a_i^i$ is positive. What should we do if form $\mathcal{Q}$ is not diagonal? If we consider form as a matrix the diagonal form will be represented with diagonal matrix. There is a standard procedure to convert arbitrary symmetric matrix $A$ to diagonal form $V^{-1}DV$, where $D$ is diagonal (there is a [theorem][1] that matrix has diagonal form in basis of its eigenvectors and if the matrix is symmetric that diagonal matrix is real). So if we take arbitrary symmetric matrix $A = V^{-1}DV$ and substitute this to the representation of $\mathcal{Q}(\mathbb{x})$ we will get $\mathcal{Q}(\mathbf{x}) = \mathbf{x}^{\top}V^{-1}DV\mathbf{x}$. We always may achive the matrix $V$ to be orthogonal, i.e. $V^{-1} = V^{\top}$, then
$$
\mathcal{Q}(\mathbf{x}) = \mathbf{x}^{\top}V^{\top}DV\mathbf{x} = (V\mathbf{x})^{\top}DV\mathbf{x} = \widetilde{\mathcal{Q}}(V\mathbb{x})
$$
where the $\widetilde{\mathcal{Q}}$ form is diagonal and it is easy to determine its positive definition. Actually we may use any matrix $V$ such that $V^{\top}DV = A$.
The qeustion is: will be form $\mathcal{Q}$ be definite psotive iff form $\widetilde{\mathcal{Q}}$ is definite positive? The answer is given by Silvester's law of inertia and it is positive. Moreover, count of negative, positive coefficients and zeros (so-called inertia indices) of diagonal form $\widetilde{\mathcal{Q}}$ does not depend on the way form $\mathcal{Q}$ was diagonalized.
##Example##
Now we convert the form giving by the matrix
$$
A = 
\begin{pmatrix}
-1 & -1 & -1 \\
-1 & 1 & 0 \\
-1 & 0 & 1
\end{pmatrix}
$$
from the question to the diagonal form by Lagrange method.
Consider $\mathbb{x} = (x,y,z)^{\top}$, then
$$
\begin{align}
\mathcal{Q}(\mathbb{x}) = -x^2 - 2xy + y^2 -2xz + z^2 = \\
-(x^2 + 2xy + 2xz) + y^2 + z^2 =\\
-\left((x+y+z)^2 - (y+z)^2\right) + y^2 + z^2 =\\
-(x+y+z)^2 + 2y^2 + 2yz + 2z^2 = \\
-(x+y+z)^2 + 2\left(\left(y + \frac{z}{2}\right)^2 - \frac{z^2}{2}\right) + 2z^2 = \\ -(x+y+z)^2 + 2\left(y + \frac{z}{2}\right)^2 + \frac{3}{2}z^2.
\end{align}
$$
If we replace arguments $x,y$ and $z$ with $x+y+z$, $y + z/2$ and $z$ then we will take the diagonal form with the same inertia indicies (according to Silvester's theorem). Replacing of arguments in the matrix form is substitution $\mathbf{x}$ with $V\mathbf{x}$, where
$$
V = 
\begin{pmatrix}
1 & 1 & 1 \\
0 & 1 & 1/2 \\
0 & 0 & 1
\end{pmatrix}.
$$
It's easy to see that $V^{\top}DV = A$, where $D = \mathrm{diag}(-1, 2, 3/2)$.
We now can see that there is one negative coefficient and two positive ones, so inertia indicies is $n_{-} = 1$ and $n_{+} = 2$ and this form does not definite positive.
[1]: https://en.wikipedia.org/wiki/Spectral_theorem
[2]: http://math.stackexchange.com/a/1817916/346332
A: With your matrix as $M,$ take
$$ P =
\left(
\begin{array}{rrr}
1 & -1 & -1/2 \\
0 & 1 & -1/2 \\
0 & 0 & 1
\end{array}
\right)
$$
we get
$$ P^T M P =
\left(
\begin{array}{rrr}
-1 & 0 & 0 \\
0 & 2 & 0 \\
0 & 0 & 3/2
\end{array}
\right)
$$
Notice that the matrix $V$ in the other answer is equal to $P^{-1}.$
see reference for linear algebra books that teach reverse Hermite method for symmetric matrices
as well as TREIL
A: The key point is that by Sylvester's law of inertia the signature of the scalar product does not depend on the choice of basis and the positive (negative) number in the signature corresponds to the maximal dimension of a vector subspace on which the scalar product is positive-definite (negative-definite).
From that we can easily conclude that the signature is $(2,1,0)$, indeed


*

*$\det M =-3 \implies \lambda_i \neq 0$ and the only possible signature are $(0,3,0)$ or $(2,1,0)$

*$e_2^TMe_2=1 \implies \exists \lambda_i>0$
