Stuck on a dot product proof I've been stuck on this for hours and would really appreciate some help!
Question: Suppose $\phi:\mathbb{R}^n\rightarrow\mathbb{R}^n$ is a function that preserves dot products. In other words, for all $u,v \in \mathbb{R}^n$, we have $(u*v)=(\phi(u)*\phi(v))$. Using only basic properties of dot product (such as the distributive law) and the definition of length:


*

*Prove that for all $u,v \in \mathbb{R}^n$, we have $|u+v|=|\phi(u)+\phi(v)|$.

*Prove that for all $u,v,w \in \mathbb{R}^n$, we have $|u+v-w|=|\phi(u)+\phi(v)-\phi(w)|$.


I can do these proofs in more complicated ways, but not with such simple assumptions! I'm not allowed to use the fact that $\phi$ is a linear operator, for example.
 A: All you need to do is to apply the definition of length, use linearity of dot product, and apply $\phi$ preserving dot product:
$|u + v|^2 = (u + v) \cdot (u + v) = u \cdot u + 2u \cdot v + v \cdot v = \phi(u) \cdot \phi(u) + 2\phi(u) \cdot \phi(v) + \phi(v) \cdot \phi(v) = (\phi(u) + \phi(v)) \cdot (\phi(u) + \phi(v)) = |\phi(u) + \phi(v)|^2$.
$|u + v - w|^2 = (u + v - w) \cdot (u + v - w) = u \cdot u + v \cdot v + w \cdot w + 2u \cdot v - 2u \cdot w - 2v \cdot w = \phi(u) \cdot \phi(u) + \phi(v) \cdot \phi(v) + \phi(w) \cdot \phi(w) + 2\phi(u) \cdot \phi(v) - 2\phi(u) \cdot \phi(w) - 2\phi(v) \cdot \phi(w) = (\phi(u) + \phi(v) - \phi(w)) \cdot (\phi(u) + \phi(v) - \phi(w)) = |\phi(u) + \phi(v) - \phi(w)|^2$.
When you see a question, think about how to make use of all the condition that it gives you, and that all it needs is some proper logic derivation to solve the question.
A: It is easier to show that $|u+v|^2=|\phi(u)+\phi(v)|^2$. Observe that  $$|u+v|^2=(u+v$*u+v)=(u*u)+2(u*v)+(v*v)$$
$$=(\phi(u)*\phi(u))+2(\phi(u)*\phi(v))+(\phi(v)*\phi(v))=$$ $$(\phi(u)+\phi(v)*\phi(u)+\phi(v))=|\phi(u)+\phi(v)|^2$$
The other one is similar..
A: Should be straightforward expansion of the definition:
$$\begin{align}|u+v|&=\sqrt{(u+v)*(u+v)}\\&=\sqrt{u*u+v*u+u*v+v*v}\\&
=\sqrt{\phi(u)*\phi(u)+\phi(v)*\phi(u)+\phi(u)*\phi(v)+\phi(v)*\phi(v)}\\&
= \sqrt{(\phi(u)+\phi(v))*(\phi(u)+\phi(v))}\\&=|\phi(u)+\phi(v)|\end{align}$$
Similarly, for $|u+v-w|=\sqrt{(u+v-w)*(u+v-w)}$ we obtain a sum/difference of products of two vectors $\in\{u,v,w\}$ so that replacing these with $\phi(u),\phi(v),\phi(w)$ does not change the value and equals $\sqrt{(\phi(u)+\phi(v)-\phi(w))*(\phi(u)+\phi(v)-\phi(w))}=|\phi(u)+\phi(v)-\phi(w)|$.
The same method allows us to conclude more generally that $\left|\sum_{i=1}^n a_iu_i\right|= \left|\sum_{i=1}^n a_i\phi(u_i)\right|$ for any real coefficients $a_i$.
A: Sorry, my first solution was wrong. Here's a proper proof of 1.
$|\phi(u)+\phi(v)|^2 = (\phi(u)+\phi(v)) * (\phi(u)+\phi(v)) = \phi(u)*\phi(u) + 2\phi(u)*\phi(v) + \phi(v)*\phi(v) = u*u + 2u*v+v*v = (u+v)*(u+v) = |u+v|^2$
Thus $|\phi(u)+\phi(v)| = |u+v|,$ by the injectivity of the function $x \in [0,\infty) \mapsto x^2.$
