This might be a simple and even stupid question. Why does the following equation hold true? \begin{align} \|a+b\|^2 = \|a\|^2 + \|b\|^2 + 2\langle a,b \rangle \end{align} where the norm can be induced naturally by the inner product.
From the triangle inequality we have \begin{align} \|a+b\| \le \|a\| + \|b\| \end{align} Then we take square at both sides \begin{align} \|a+b\|^2 \le \|a\|^2 + \|b\|^2 + 2\|a\|\|b\| = \|a\|^2 + \|b\|^2 + 2 \sqrt{\langle a,a \rangle \langle b,b \rangle} \end{align} It seems close to the proof but I am not able to continue. Can you please show me the equation at first for Euclidean space and then for all inner product spaces?
Note that
\begin{align} \|a+b\|^2 = \langle a+b, a+b\rangle = \|a\|^2+\|b\|^2+2\langle a,b\rangle \end{align}
Note that we require $\langle a, b \rangle = \langle b, a \rangle$ for this to hold.
Remark:
From your working, you are very close to a proof of Cauchy-Schwarz inequality.