# How to change the order of the three vectors that are dot product

Two vectors: $$u$$ (a unit vector) and $$x$$ (a regular non-unit vector), the angle between them is $$\theta$$

I want to know the derivation process of changing $$(x\cdot u)u$$ to ***x (intuitively, I want to move $$x$$ to the far right side, and the ***is any proper form that makes it work).

One of the appealing reasons to do that is that I can use *** as an operation on vector x.

But here, does anyone could help me out for how to derive it from $$(x\cdot u)u$$u to ***x ?

Note that $$u(u\cdot x)$$ is not what we want, there should be no parenthesis.

• $u \cdot u \cdot x$ does not make sense for general vectors. A single dot product will give you a scalar. A scalar dotted with another vector may not be well-defined.
– D.B.
Commented Jun 5, 2019 at 19:20
• I edit the post, such that it won't confuse you. From my point of view, a scalar dot a vector is simply stretching the length of the vector along its original direction. Commented Jun 5, 2019 at 19:24
• Could you define $(x.u)$. Is it equivalent to $x^T u$?
– Duns
Commented Jun 5, 2019 at 19:32
• @Dunkel Hi, I think you are right. Commented Jun 5, 2019 at 19:43
• Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax. Commented Jun 5, 2019 at 19:54

If we define $$(x \cdot u) = x^T u$$, then $$(x \cdot u) u = (x^T u) u = k u$$. However, note that $$k = x^T u$$ is a scalar. Equivalently, $$k = u^T x$$.

$$(x \cdot u) u = k u$$.

Since $$k$$ is an scalar we can exchange the positions of $$k$$ and $$u$$. Then, $$(x \cdot u) u = u k = u (u^T x)$$

Finally

$$(x \cdot u) u = P x$$ where $$P = u u^T$$ is a matrix.

• Thank you so much. It's the key insight that you use ${ u }^{ T }x$ to replace $x\cdot u$, because this gives us the chance to get rid off the parenthesis without worrying about against any rules like the situation we have for $u(u\cdot x)$ Commented Jun 5, 2019 at 20:20
• Can you explain to me why we can say that $u(u^T x) = Px$ where $P=u u^T$? Is it correct to multiply $u$ with $u^T$ first even though the parenthesis indicates that we should multiply $u^T$ with $x$ first? Commented Oct 7, 2020 at 16:57

This is impossible. $$(x \cdot u)u$$ is a scalar multiple of $$u$$, and you can't write it as a multiple of $$x$$ unless $$x$$ is a multiple of $$u$$.

For instance, let $$u=i$$ and $$x=i+j$$. Then $$(x \cdot u)u = i$$, and you can't write $$i$$ as a multiple of $$i+j$$.

Also, scalar multiplication by a vector is not a one-to-one operation, so “canceling” a dot product or multiplying by an inverse to a vector is undefined.

• Then *** should be in a form of matrix that will be given by any info available from u or x, right? When "canceling", if only scalar is left in the equation, then it is what it is. I don't see anything wrong with it. What is left such that we could say it makes sense? Commented Jun 5, 2019 at 19:34
• @Jason: If $\alpha x = \beta x$ for scalars $\alpha$ and $\beta$ and a vector $x$, then yes, $\alpha = \beta$. But if $u \cdot x = v \cdot x$, you can't conclude that $u=v$. I wasn't sure which of those equations you were thinking of when you said “multiply by the inverse of $x$.” Commented Jun 5, 2019 at 19:49
• I see what confuses you. I change the language in the question description such that I won't have inverse. What I want essentially is just *** that could be regarded as an operation on vector x. To be able to do that, it requires x to be on the far right side. Commented Jun 5, 2019 at 20:07
• Oh, now I finally understand your question. If that is what you want, then Dunkel's answer is the right one. Commented Jun 5, 2019 at 20:39
• @Mathew Leingang I was changing the language as you guys come up with new confusion, such that the question is bit more clear now lol Commented Jun 5, 2019 at 20:48

Using Einstein notation: \begin{align} ((x \cdot u)u)_i &=x_ju_ju_i\\ &=u_iu_jx_j\\ &=P_{ij}x_j\\ &=(Px)_i \end{align} So we have that $$(x \cdot u)u = Px$$ If we define the $$P$$ matrix as $$P_{ij}=u_iu_j$$. Note that because $$u$$ is an unit vector, $$P$$ will be the projection matrix to $$u$$.

• Does $u_i u_j$ mean $uu^T$? Commented Jun 5, 2019 at 20:24
• Yes, $a_i b_j$ is the $i,j$-th component of the $a b^T$ matrix. Commented Jun 5, 2019 at 20:25