Where is $\|a\| = \sqrt{\langle a|a\rangle}$ coming from? I know it is the norm of a vector $a$ which generalizes the length (that is what inner products bring from geometric vectors to the rest of vectors) of a vector $a$ in three-dimensional space. What I do not know is why the formula is like that. 
Thank you
 A: It comes from Pythagoras' theorem: 
In $\mathbf R^2$ (resp.  $\mathbf R^3$), the usual inner product of vector $u=(x,y)$ and $u'(x',y')$ (resp. $(x,y,z)$ and $(x',y',z')$ is given by
$$\langle u, u'\rangle=xx'+yy',\qquad\langle u, u'\rangle=xx'+yy'+zz'$$
So we see the length of vector $u$, which is $\sqrt{x^2+y^2}$ (resp. $\sqrt{x^2+y^2+z^2)}$ by Pythagoras, can be written as
$$\lVert u\rVert=\sqrt{\langle u,u\rangle}.$$
For other vector spaces on $\mathbf R$, one thus naturally turns the above  property of the Euclidean inner product into a definition of the norm associated with an inner product, i.e. a definite positive bilinear form $\langle \,\cdot\,,\,\cdot\,\rangle$ on a vector space $V$.
Similarly, on $\mathbf C^2$, the norm of a vector $(z, u)$ is given by the formula $\lVert(z,u)\rVert = z \bar z+u\bar u$, so for complex vector spaces, one defines the norm associated to a definite positive hermitian form by the same formula.
A: It comes form the fact that, given two vectors $a$ and $b$, $\langle a|b\rangle=\|a\|\cdot\|b\|\cdot\cos\theta$, where $\theta$ is the angle between them. Therefore, if $b=a$, then $\theta=0$ and you get $\langle a|a\rangle=\|a\|^2$.
A: The definition of the inner product you get taught in school is the geometric definition of the Euclidian inner product on the Euclidian vector space $ℝ^d$, $d=2,3$. 
$$\langle u,v\rangle = |u||v|\cos(ϑ)$$
with $|u|$ being the magnitude or length of the vector, 
and $ϑ$ the angle between the two vectors. That being accepted as "truth" it follows:
$$\langle u,u\rangle=|u|²\cos(0) = |u|^2.\qquad\qquad (\star)$$
That way of introducing the dot product is fine, because it graphic. And one has an intuitive idea what magnitude and angle means.  You can draw a picture with two vectors and everyone will be able to understand. Additionally that is how math was created using geometrical arguments (think about the old Greeks). Still, I feel uneasy when I am confronted with these kind of definitions. But, it is also possible to define the dot product in a different way, that was introduced later in time:
$$\langle u,v\rangle = \sum_{i=1}^nu_iv_i. $$
This is called the algebraic definition of the dot product. One can show that these definitions are in fact equivalent.
To show the property $(\star)$ for the algebraic definition directly is a bit more complicated. But the interesting part about the dot product is, that it is a special case of a more general object called inner product. Of course that will be more abstract, but you will understand better why $(\star)$ holds. 

Definition (Inner product):
Let $F$ denote either the real numbers $ℝ$ or the complex numbers $ℂ$, and let $V$ be a vector space on $F$. Then the mapping $(\cdot,\cdot):V×V→F$ is called inner product if it holds:


*

*Linearity: $(αx_1+βx_2,y) = α(x_1,y)+β(x_2,y),\text{ for } α,β∈F$.

*Symmetry: $(x,y)=\overline{(y,x)}$.

*Definiteness: $(x,x)∈ℝ;\ (x,x)\geqslant0;\ (x,x)=0\ ⇒\ x=0$.


Definition (Norm): Let $V$ be again a vector space on $F$. Then a mapping $\|\cdot\|:V→ℝ$ is called norm (on $V$) if it holds: 


*

*Definiteness: $\|x\|\geqslant0;\ \|x\|=0\ ⇔\ x=0$.

*Homogeneity: $\|αx\|=|α|\|x\|,\ α∈F$.

*Triangle Inequality: $\|x+y\|\leqslant\|x\|+\|y\|$.



Now the cool thing about these two definitions is their connection: 
Theorem: An inner product $(\cdot,\cdot)$ of a vector space $V$ on $F$ induces a norm by $$\|x\|:=(x,x)^{\frac{1}{2}}.$$
Proof: We have to prove all three properties of the norm. Definiteness and homogeneity of the norm directly follows from the definiteness and linearity of the inner product. To show the triangle inequality it is:
\begin{align*}
\|x+y\|^2 &= (x+y,x+y) = (x,x)+(x,y)+(y,x)+(y,y) \\
&\leqslant\|x\|^2+2|(x,y)|+\|y\|^2 \leqslant¹\|x\|^2+2\|x\|\|y\|+\|y\|^2=(\|x\|+\|y\|)^2.
\end{align*}
We used the Cauchy-Schwarz-inequality:
$$|(x,y)|^2\leqslant(x,x)(y,y),$$
in $\leqslant¹$.

Now back to the question. These two definitions and the theorem gives us cool tools that can be applied on the dot product $\langle\cdot,\cdot\rangle$ on $ℝ^n$.
One can show that the dot product is in fact an inner product. Hence, using the theorem, the following expression
$$ \|u\|_2:=\sqrt{(u,u)}= \sqrt{\sum_{i=1}^nu_i^2}$$
is a norm on $ℝ^n$. 
