Let Q be a quadratic form on a real vector space V of dimension n. Prove that there is a basis e1,…,en with respect to which Q is given by the formula
Q(i=1∑nxiei)=x12+…+xp2−xp+12−…−xp+q2
Prove that the numbers p and q are uniquely determined by the form Q. By means of an example, show that the subspaces ⟨e1,…,ep⟩ and ⟨ep+1,…,ep+q⟩ need not be uniquely determined by Q.