Why does $x^Tx=||x||^2$?

6.9k Views Asked by At

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?

2

There are 2 best solutions below

6
On BEST ANSWER

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.

2
On

By definition $\|x\|^2=\sum_{i=1}^n x_i^2$. On the other hand, if we treat $x$ as a $n\times 1$ matrix (and therefore $x^T$ is a $1\times n$ matrix) then we can use matrix multiplication to obtain a $1\times 1$ matrix whose only entry equals the dot product of $x$ with itself, i.e. $$ x^Tx=\sum_{i=1}^n x_i^2. $$