How can we prove that "We know that for any vector x, $x^Tx=||x||^2$. Thus , ..... "
The way I am thinking that while $x^T$ is the transpose of x, then we cross product with itself using $x^T$, which results in a symmetric matrix, R. So R is a square matrix. How can we jump from a square matrix to $||x||^2, $ where ||x|| supposed to mean the normal of x, then we square it with 2?
Let $x=\begin{bmatrix}x_1\\...\\x_n\end{bmatrix}$ and therefore $x^T = \begin{bmatrix}x_1 & ... &x_n\end{bmatrix}$.
If you evaluate $x\cdot x^T$ you multiply the rows of x (just one entry) with the columns of $x^T$ with also just one entry. This gives you the matrix. This is also called a dyadic product.
If you evaluate $x^T\cdot x$ you multiply the one single row of $x^T$ with the single column of $x$ to give you just a single number. And by some kind of definition, this equals the squared length of the vector in a euclidian sense.
So: Just write $x$ and x^T$ as matrices and use the usual way of multiplying them.