Treating expressions of the form $\vec x \cdot \nabla \vec y$: what is the order of operations? This comes up in the context of a homework assignment. We're given the Euler equations for invisicid fluid flow. The variables at play:

*

*$p=p(x,y,z,t)$ is pressure

*$\rho = \rho(x,y,z,t)$ is mass density

*$\vec v = \vec v(x,y,z,t)$ is velocity of the fluid

*$\vec f$ is external force per volume

Then we're given that the Euler equations are:
$$\frac{\partial \rho}{\partial t} + \nabla \cdot (\rho \vec v) = 0 \qquad \frac{\partial \rho \vec v}{\partial t} + \vec v \cdot \nabla (\rho \vec v) = \vec f - \nabla p$$
for continuity and momentum, respectively.

My concerns lie with the order of operations dot products and the $\nabla$ operator, and in turn the consistency of the dimensions of these equations. (Which might sound a bit silly, but my physics knowledge isn't the best.)
More explicitly, consider the expression $\vec x \cdot \nabla \vec y$ as in the question title. Which order of operations would be correct: finding $\nabla \vec y$ and then taking the dot product, or taking the adjunction $\vec x \cdot \nabla$ and multiplying that by $\vec y$? Or, symbolically, which does the title mean:
$$\vec x \cdot \Big( \nabla \vec y \Big) \qquad \text{or} \qquad \Big( \vec x \cdot \nabla \Big) \vec y$$
The reason this is a concern lies with the momentum equation given earlier. $\partial_t (\rho \vec v)$ should be a vector, and the right-hand side is the difference of vectors. However, my intuition suggests that of the two above conventions, we should be using the left one, which would render $\vec v \cdot \nabla (\rho \vec v)$ a scalar, which doesn't make sense.
So I was wondering if it happens to instead be $(\vec v \cdot \nabla) (\rho \vec v)$, which, to my understanding, would indeed be a vector. Or is there something else I'm missing?
 A: They're all the same.
$$\vec a \cdot \nabla \vec b \equiv (\vec a \cdot \nabla) \vec b \equiv \vec a \cdot (\nabla \vec b)$$
In cartesian coordinates, the $\nabla$ operator is defined as:
$$
\nabla = \left( \begin{array}{ccc}\frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \end{array}\right)
$$
When this operates on a vector $\vec b = \left(\begin{array}{ccc}b_x & b_y & b_z\end{array}\right)^T$, we get a tensor of the form:
$$
\nabla \vec b = \left[ 
\begin{array}{ccc}
\frac{\partial b_x}{\partial x} & \frac{\partial b_x}{\partial y} & \frac{\partial b_x}{\partial z}  \\
\frac{\partial b_y}{\partial x} & \frac{\partial b_y}{\partial y} & \frac{\partial b_y}{\partial z}  \\
\frac{\partial b_z}{\partial x} & \frac{\partial b_z}{\partial y} & \frac{\partial b_z}{\partial z}  \\
\end{array}
\right]
$$
And when we take the dot product of this tensor with the vector $\vec a$, the result is a vector:
\begin{align}
\vec a \cdot ( \nabla \vec b )
&= \left( 
\begin{array}{c} 
a_x \frac{\partial b_x}{\partial x} + a_y \frac{\partial b_x}{\partial y} + a_z \frac{\partial b_x}{\partial z} \\
a_x \frac{\partial b_y}{\partial x} + a_y \frac{\partial b_y}{\partial y} + a_z \frac{\partial b_y}{\partial z} \\
a_x \frac{\partial b_z}{\partial x} + a_y \frac{\partial b_z}{\partial y} + a_z \frac{\partial b_z}{\partial z} \\
\end{array} 
\right) \tag 1
\end{align}
Now because $\vec a$ and $\nabla$ are both vectors, $\vec a \cdot \nabla$ is a scalar operation given by
$$
\vec a \cdot \nabla = a_x \frac{\partial}{\partial x} + a_y \frac{\partial}{\partial y} + a_z \frac{\partial}{\partial z}
$$
And when this scalar operation is applied to the vector $\vec b$, we get a vector:
\begin{align}
(\vec a \cdot \nabla) \vec b &= \left( a_x \frac{\partial}{\partial x} + a_y \frac{\partial}{\partial y} + a_z \frac{\partial}{\partial z} \right) \cdot \left(
\begin{array}{c}
b_x \\ b_y \\ b_z
\end{array} 
 \right) \\
&= \left( 
\begin{array}{c} 
a_x \frac{\partial b_x}{\partial x} + a_y \frac{\partial b_x}{\partial y} + a_z \frac{\partial b_x}{\partial z} \\
a_x \frac{\partial b_y}{\partial x} + a_y \frac{\partial b_y}{\partial y} + a_z \frac{\partial b_y}{\partial z} \\
a_x \frac{\partial b_z}{\partial x} + a_y \frac{\partial b_z}{\partial y} + a_z \frac{\partial b_z}{\partial z} \\
\end{array} 
\right) \tag 2
\end{align}
Hey, look at that! $(1) = (2)$
