[Math] Proving Euclidian Norm squared is equivalent to transpose times matrix for x in R^n

linear algebramatricesnormed-spaces

Apologies if this has been answered already but I can't seem to find an answer that I think answers my question (or at least one I understand).

Anyways the question is,


    Prove ‖x‖22=xTx for all x in Rn

When I took a swing at it I got a scalar value for the Euclidian (or Frobenius?) norm and a matrix value (of dimension n x n) for x-transpose times x. I really have no clue what I'm doing but I know it can't be good if I have a scalar and matrix set to be equivalent to one another.

thanks

Best Answer

If we think of $x \in \mathbb{R}^d$ as a column vector, then $$x^tx = \sum_{j=1}^d x_j^2 = \lvert x \rvert^2.$$ Edit: It seems you may be a bit confused on matrix multiplication. Since $x^t$ is a $1 \times d$ matrix and $x$ is a $d \times 1$ matrix, $x^tx$ will be a $1\times 1$ matrix (ie, a scalar): $$x^tx = (x_1, \ldots, x_d) \begin{pmatrix} x_1 \\ \vdots \\ x_d \end{pmatrix} = \sum_{j=1}^d x_j^2.$$