$(\mathbf{u}^T\mathbf{v})\mathbf{v} = \mathbf{u}^T(\mathbf{v}\mathbf{v})$ doesn't hold for $\mathbf{u}, \mathbf{v}\in\mathbb{R}^n$ - why? Suppose I have vectors $\mathbf{u}$ and $\mathbf{v}$ in $\mathbb{R}^n$. It is well defined to write $5\mathbf{v}$ or $c\mathbf{v}$ for scalar $c$. Since the inner product of $\mathbf{u}$ and $\mathbf{v}$ is just a scalar:
$$
\mathbf{u}^T\mathbf{v}\in\mathbb{R}
$$
I can write $(\mathbf{u}^T\mathbf{v})\mathbf{v}$ which is also well defined. Then, since matrix multiplication is associative:
$$
(\mathbf{u}^T\mathbf{v})\mathbf{v} = \mathbf{u}^T\mathbf{v}\mathbf{v} = \mathbf{u}^T(\mathbf{v}\mathbf{v})
$$
Which is obviously not defined for a column vector $\mathbf{v}$.


*

*What went wrong?

*What notation should I use to indicate the vector $(\mathbf{u}^T\mathbf{v})\mathbf{v}$? Writing it like that looks like the brackets are arbitrary and therefore looks wrong to me.

 A: The key fact here is that you are confusing the two types of multiplications. The first is the multiplication of a matrix by a scalar which I will denote using $\cdot$. The second is matrix-matrix multiplication which I will denote as $\times$.
Your equation is
$$(\mathbf{u}^\mathrm{T}\times \mathbf{v}) \cdot \mathbf{v}$$
There is no reason to expect the two operations to be associative with each other.
A: As already clarified there are two different operations involved, so associativity cannot be applied.  However you can rewrite multiplication of a scalar by a (column) vector as matrix multiplication of a (column) vector and
a 1x1 matrix containing the scalar, with the same result: $a \mathbf{v} = \mathbf{v} \mathbf{a}$.  Now associativity can be enforced to obtain
$$\mathbf{v} (\mathbf{u}^T\mathbf{v}) = (\mathbf{v} \mathbf{u}^T) \mathbf{v}$$
which is legitimate (and correct) and is interpreted as a matrix
(tensor product between $\mathbf{v}$ and $\mathbf{u}$) times a vector.
A: The expression $\mathbf{v}\mathbf{v}$ is meanless. If you write
$\mathbf{u}^T\mathbf{v}\mathbf{v}^T$ then it will OK.
A: You can apply associativity for a single operation at a time, while your expression
$$(\mathbf{u}^T\mathbf{v})\mathbf{v}$$
involves two operation, i.e. inner product of vectors, giving as a result a real number, and the multiplication of a vector by a scalar of the real field, giving result in the vector space 
A: The product $\mathbf{u}^T\mathbf{v}$ in your expression is considered a scalar. As others have pointed out, a correct application matrix multiplication associativity is
$$\mathbf{v}(\mathbf{u}^T\mathbf{v})=(\mathbf{v}\mathbf{u}^T)\mathbf{v},$$
but, as a matter of fact, you can also write
$$\mathbf{v}(\mathbf{u}^T\mathbf{v})=(\mathbf{u}^T\mathbf{v})\mathbf{v},$$
which can be misleading if not interpreted correctly: on the left we have a standard matrix product, on the right a scalar times a vector.
Indeed, at the left you have the product of an $n\times1$ matrix by a $1\times1$ matrix, which is equivalent to multiplying each entry in the column $\mathbf{v}$ by the unique entry of $\mathbf{u}^T\mathbf{v}$; this is just the same as doing the multiplication by that entry considered as a scalar.
An example: suppose you have the $QR$ decomposition of a matrix $A$: $A=QR$ where $Q$ has orthonormal entries. We use the standard inner product on $\mathbb{R}^n$. Write $Q=[\mathbf{q}_1\;\mathbf{q}_2\;\dots\;\mathbf{q}_r]$. Then we know that the orthogonal projection of $\mathbf{v}$ on the column space $U$ of $A$ (or of $Q$, they are the same) is
$$
P_U(\mathbf{v})=\sum_{i=1}^r (\mathbf{q}_i^T\mathbf{v})\mathbf{q}_i
=\sum_{i=1}^r \mathbf{q}_i(\mathbf{q}_i^T\mathbf{v})
=\sum_{i=1}^r (\mathbf{q}_i\mathbf{q}_i^T)\mathbf{v}
=\biggl(\sum_{i=1}^r \mathbf{q}_i\mathbf{q}_i^T\biggr)\mathbf{v}
$$
which shows that the matrix associated to the orthogonal projection $P_U$ is just
$$
\sum_{i=1}^r \mathbf{q}_i\mathbf{q}_i^T=QQ^T.
$$
A: What went wrong is that you ought to write a different symbol for scalar multiplication of a real number by a matrix, versus multiplication of matrices.  $(u^T v)v$ is being parsed as a scalar multiplication of $v$ by the scalar $(u^T v)$
