Calculation of the squared Euclidean norm Just a simple question. I'm reading an article and come across an equation that I cannot replicate as done in the original.
\begin{align}
&\|\mathbf{x} - \mathbf{\alpha} \|^2 - \|\mathbf{x} - \mathbf{\beta}\|^2\\
&= \|\mathbf{x}\| \|\mathbf{x}\| - 2 \|\mathbf{\mathbf{\alpha}}\| \|\mathbf{x}\| + \|\mathbf{\alpha}\| \|\mathbf{\mathbf{\alpha}}\|  - \|\mathbf{x}\| \|\mathbf{x}\| +2 \|\mathbf{\beta}\| \|\mathbf{x}\| - \|\mathbf{\beta}\| \|\mathbf{\beta}\|\\
&= \mathbf{\alpha}^T \mathbf{\alpha} - \beta^T \beta + 2(\sqrt{\mathbf{\beta}\cdot\mathbf{\beta}}-\sqrt{\mathbf{\alpha}\cdot\mathbf{\alpha}})\|\mathbf{x}\|\\
&= \mathbf{\alpha}^T \mathbf{\alpha} - \beta^T \beta + 2(\sqrt{\mathbf{\beta}\cdot\mathbf{\beta}}-\sqrt{\mathbf{\alpha}\cdot\mathbf{\alpha}})(\sqrt{\mathbf{x}\cdot\mathbf{x}}),
\end{align}
where I used the fact that $$\|a\|\|a\| = \sqrt{a\cdot a}\sqrt{a\cdot a} = \sqrt{a^T a}\sqrt{a^T a} = a^Ta.$$
However, the article gives $$2(\beta-\alpha)^T \mathbf{x} + \alpha^T \alpha - \beta^T\beta $$

Your transition from the first line to the second is incorrect.  We should have
$$
\|x - \alpha\|^2 - \|x - \beta\|^2 = \\
(x - \alpha)^T(x - \alpha) - (x - \beta)^T(x - \beta) = \\
\|x\|^2 + \|\alpha\|^2 - \|x\|^2 - \|\beta\|^2 - x^T\alpha - \alpha^Tx + x^T\beta + \beta^Tx =\\
\|\alpha\|^2 - \|\beta\|^2 - 2\alpha^Tx + 2 \beta^Tx =\\
\alpha^T\alpha - \beta^T\beta + 2(\beta - \alpha)^Tx
$$
which is the desired result.
