Trying to understand the proof for the theorem
$$ \text{For any} \overrightarrow{u}, \overrightarrow{v} \in \mathbb{R}^n, \\ |\overrightarrow{u}+\overrightarrow{v}| \leq |\overrightarrow{u}| + |\overrightarrow{v}| \\ \text{with equality if and only if one of the vectors is a nonnegative scalar multiple of the other one.} $$
I came across one step in the proof that I don't understand. Namely the author of the book for linear algebra that I'm reading right now factors the inequality
$$ 0 \leq |\overrightarrow{u}|^2|\overrightarrow{v}|^2 - 2(|\overrightarrow{v}|\overrightarrow{u}) \bullet (|\overrightarrow{u}|\overrightarrow{v}) + |\overrightarrow{u}|^2|\overrightarrow{v}|^2 $$
like so
$$ 0 \leq (|\overrightarrow{u}|\overrightarrow{v} - |\overrightarrow{v}|\overrightarrow{u}) \bullet (|\overrightarrow{u}|\overrightarrow{v} - |\overrightarrow{v}|\overrightarrow{u}) $$
I do not understand this factorization step and would be glad if someone could help me. Thank you!
Book / location of the proof in the book: Linear Algebra by Jim Hefferon (fourth edition) / page 44
Welcome to Maths SX!
You can use this notation for the dot product:
$\enspace\vec u\cdot \vec u=(\vec u)^2\enspace(=|\vec u|^2)$ , and it happens that, by the basic properties of the dot product, the binomial formula is also valid for the dot product, i.e.: $$(a\vec u+b\vec v)^2=a^2 (\vec u)^2+2ab\, \vec u\cdot\vec v+b^2(\vec v)^2$$