Scalar product, undefined matrix multiplications and order of operations I am curious about the order of operations in linear algebra. Let $\mathbf{u},\mathbf{v} \in \mathbb{R}^{n}$ and $\mathbf{A},\mathbf{B}\in \mathbb{R}^{m \times m}$, with $m\neq n$ and $\mathbf{u} \cdot \mathbf{v} = \alpha \in \mathbb{R}$. 


*

*How do I motivate $(\mathbf{A}\mathbf{u} + \mathbf{B}\mathbf{u})\cdot \mathbf{v} = \alpha \mathbf{A} + \alpha\mathbf{B}$? By order of operations is the addition carried out first, but the matrix multiplications $\mathbf{A}\mathbf{u}$ and $\mathbf{B}\mathbf{u}$ are not defined. 

*A similar problem arises with $\mathbf{u}\cdot \mathbf{v}\, \mathbf{A} = \alpha\mathbf{A}$. Once again is not the product $\mathbf{v}\mathbf{A}$ defined, due to dimensions. Does the scalar product always have priority when it comes to order of operations?
Thanks for the help!
 A: (1) The meaning
$$
(Au+Bu)\cdot v = \alpha A + \alpha B
$$ 
is highly confusing, and is pretty much illegal anyway: The parentheses already indicate a certain order of execution of the multiplications - first $Au$ and $Bu$, then times $v$. But $Au$ and $Bu$ are not defined - FAIL
(2) Is trickier:
$$
u\cdot v A = (u\cdot v)A.
$$
Here, one should see that $vA$ is undefined, so the meaning of the expression must be 
$$
u\cdot v A = (u\cdot v)A.
$$
There are proofs, where one uses that $u\cdot v$ is a real number, thus commutes with any other object.
A: You could not calculate $Au+Bu$, because the dimensions do not agree, you would at least need $A,B\in\Bbb R^{m\times n}$, but then $Au+Bu\in\Bbb R^m$, so now we cannot take the inner product, so from the start you would need $A,B\in\Bbb R^{n\times n}$.
Now $(Au+Bu)\cdot v\ne (A+B)(u\cdot v)=\alpha(A+B)$
This because $(Au+Bu)$ is a vector, so $(Au+Bu)\cdot v$ is a scalar, not a matrix.
The reason $u\cdot vA=\alpha A$ is because the operation $vA$ does not hold (since the dimensions do not agree), so it is implicitly assumed that,
$u\cdot vA=(u\cdot v)A=\alpha A$
