# Why is the dot product of a vector with itself not a linear function? [closed]

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

• Can you tell me what is $f(2\mathbf{x})$? More specifically, with $\mathbf{x}$ a non-zero vector. May 27 at 9:02
• because it is linear in both components seperately, so if you try to manipulate both sides at the same time (which you are doing by throwing in x in both) you get something that behaves more like a sqare. May 27 at 9:04
• Question looks like: $x\cdot y$ is linear function of both $x$ and $y$, so why $x\cdot x$ is not linear function of $x$. May 27 at 10:10
• Expanding on the comment by @IvanKaznacheyeu (which at a glance might still appear to be referring to dot product!): Take the ordinary multiplication $xy$. For a given $y$ (not varying with $x$), $f(x)=xy$ is linear in $x$, and vice versa. ($f(x,y)$ is bilinear.) But $f(x,x)$ is not linear in $x$, because the second argument is varying with $x$. May 27 at 18:19

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 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 \, .$$

• "K is just a set and not assumed to be equipped with a vector space structure" - K is field (and hence defines a K-vector space) isn't it? May 27 at 12:53
• @Filippo: It is true that we can consider $K$ to be a vector space over $K$. What I mean is: none of the axioms that define an inner product "view" $K$ as a vector space. (They do view $K$ as field, however—that is a good point.)
– Joe
May 27 at 14:26

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.

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)$$

• "But for..." - Well, a function can satisfy both properties at the same time :) May 27 at 16:43
• @Filippo: True, if $a \in \{-1, 0, 1\}$.
– Dan
May 27 at 16:44
• I meant that a function $f$ can satisfy $$\forall x:\forall a: f(ax)=af(x)=a^2f(x)$$I.e. the fact that$$\forall x:\forall a:f(ax)=a^2f(x)$$does not exclude the possibility that $f$ is linear. May 27 at 16:56