Say we have an $n \times n$ matrix $M$ and a vector $v \in \Bbb{R}^n$.
If we must have $v^T M v = v^T.v$ for all vectors $v$, this must necessarily mean $M=I$. Its obvious that $M=I$ will work, but how to prove its the only matrix that will work?
My attempt:
$M$ must be full rank, because otherwise, there is a non-trivial $v$ that will satisfy $Mv = 0$. Since $v^Tv > 0$ but $v^T M v = 0$, we get a contradiction.
Next, let's think about the eigen values of $M$. If $M$ has a single eigen value that is not $1$, we'll similarly get a contradiction. So, all its eigen values must be $1$. And the identity is the only matrix that satisfies this.
The issue with this is that not all matrices will be diagonalizable and also does having all eigen values equal $1$ necessarily imply the identity?