Why is the dot product of a vector with itself not a linear function? If an inner product is linear by definition, i.e., $\langle\mathbf{v+w},\mathbf{u}\rangle=\langle\mathbf{v},\mathbf{u}\rangle+\langle\mathbf{w},\mathbf{u}\rangle
$ and $\langle a\mathbf{v},\mathbf{w}\rangle=a\langle\mathbf{v},\mathbf{w}\rangle$, and the dot product is an inner product, then why is $f(\mathbf{x})=\mathbf{x}\cdot\mathbf{x
}$ not a linear function?
Thanks
 A: 
If an inner product is linear by definition ...

No, an inner product $\langle ,\cdot,\rangle$ of a (real) vector space $V$, is bilinear, not linear. It is linear in each component.
Moreover, the domain of an inner product on $V$ is $V\times V$, while that of a linear map on $V$ is $V$. These two objects have completely different domains.
A: A linear map is a function between two vector spaces that preserves vector addition and scalar multiplication. Given a vector space $V$ over $K$ (where $K$ equals $\mathbb R$ or $\mathbb C$), an inner product on $V$ is a function $V\times V\to K$ that satisfies certain axioms: conjugate symmetry, linearity in the first argument, and positive-definiteness. These axioms only "view" $V\times V$ as a set, and $K$ as a field; neither $V\times V$ nor $K$ are assumed to be equipped with a vector space structure. Therefore, it doesn't really make sense to assert that the inner product is linear.
What we can say is that the inner product is linear in the first argument, i.e. $\langle\mathbf{v+w},\mathbf{u}\rangle=\langle\mathbf{v},\mathbf{u}\rangle+\langle\mathbf{w},\mathbf{u}\rangle$ for all $\mathbf{u},\mathbf{v},\mathbf{w}\in V$, but this is not the same thing. And, as you have discovered in your question, this does not give the inner product the same properties as linear maps.
Finally, the function $f:\mathbb R^n\to\mathbb R$ given by $f(\mathbf x)=\mathbf x\cdot\mathbf x$ is not the same as the dot product$\langle.,.\rangle:\mathbb R^n\times\mathbb R^n\to\mathbb R$ given by $\langle\mathbf{x},\mathbf{y}\rangle=\mathbf x\cdot\mathbf y$. If we equip $\mathbb R^n$ and $\mathbb R$ with the usual vector space structure, then we see that $f$ is not linear, e.g. $$8=f(2,2)=f(2(1,1))\neq2f(1,1)=2\cdot 2 \, .$$
A: Yes, the function
\begin{align}
A_v:V&\to F\\
w&\mapsto\langle w,v\rangle
\end{align}
is linear for all $v\in V$. This does not imply that
\begin{align}
B:V&\to F\\
w&\mapsto\langle w,w\rangle
\end{align}
is linear since there is no $v\in V$ s.t. $B=A_v$, so there is no contradiction.
A: The definition of a linear function requires $f(ax) = af(x)$.
But for $f(ax) = x \cdot x$, $f(ax) = (ax) \cdot (ax) = a^2f(x)$
