How does this $||x-x'||$ expand to the equation below?
$\|x-x'\|^2 = (x^T)x + (x')^T x' - 2x^T x'$
Using the fact that the inner product is a bilinear symmetric form we get
$$||x-x'||^2=\langle x-x',x-x'\rangle=\langle x,x\rangle-\langle x,x'\rangle-\langle x',x\rangle+\langle x',x'\rangle\\=\langle x,x\rangle-2\langle x,x'\rangle+\langle x',x'\rangle$$
Once you know that $\|u\|^2 = \langle u, u \rangle = u^tu $ is the inner product, it's pretty straightforward: apply the distributive law a few times, using $u = x - x'$.
Copyright © 2021 JogjaFile Inc.
Using the fact that the inner product is a bilinear symmetric form we get
$$||x-x'||^2=\langle x-x',x-x'\rangle=\langle x,x\rangle-\langle x,x'\rangle-\langle x',x\rangle+\langle x',x'\rangle\\=\langle x,x\rangle-2\langle x,x'\rangle+\langle x',x'\rangle$$