When does $({\bf x}^\mathrm{T}{\bf y})(A{\bf z})=({\bf x}^\mathrm{T}A{\bf y}){\bf z}$? Under what conditions is $({\bf x}^\mathrm{T}{\bf y})(A{\bf z})=({\bf x}^\mathrm{T}A{\bf y}){\bf z}$? I tried to see if there was any way to determine the conditions through index notation, but that just leaves me at $x_iy_iA_{jk}z_k$ with nowhere to proceed. Any help is greatly appreciated, thanks! For now I treat $A$ as a matrix and the remaining as vectors, with appropriate dimensions that allow for the products to be taken.
 A: (Assuming $A$ is $n\times n$ and $\bf x,y,z$ are $n\times 1$ for some natural $n$.)
Note that if we instead write
$$
(A{\bf z})({\bf x}^\mathrm{T}{\bf y})={\bf z}({\bf x}^\mathrm{T}A{\bf y})
$$
then all multiplications involved are actually standard matrix multiplications. And dropping the parentheses (which are no longer needed) we see that it is not actually $A$ and $\bf y$ that commute, but $A$ and ${\bf zx}^T$.
More generally, some elementary manipulations of the above equation tells us that we have equality iff $\bf y$ is in the kernel of the commutator
$$
[A,{\bf zx}^T]=A{\bf z x}^T-{\bf zx}^TA
$$
A: Setting $c_1 = x^T y$ and $c_2 = x^T Ay$, your equation becomes $c_1 Az = c_2 z$. Assuming that $c_1 \neq 0$, this means $Az = (c_2 / c_1)z$ and $c_2 / c_1$ is an eigenvalue. If $c_1 = 0$, then you get $c_2 z = 0$, so either $c_2 = 0$ or $z = 0$. Are these the kinds of conditions you are looking for?
A: This condition can never be true:
Let $x,y,z$ be $n$- dimensional vectors.
For $(x^Ty)(Az)$ to be defined, $A$ would need to be an $1 \times n$ matrix.
For $(x^T A y)z$ to be defined, then $A$ would need to be an $n \times n$ matrix.
So, for the same $A$ you can't have that $(x^Ty)(Az) = (x^T A y)z$, because if one is defined, then the other is not
