(In general, capital boldfaced letters are matrices while lowercase boldfaced letters are vectors.)
Given equation
$$\mathbf{Q'MQ u}=\mathbf{D(a)b} \tag{*}$$
Where $\mathbf{M}$ is a $n$-x-$n$ symmetric p.d. matrix, $\mathbf{Q}$ is a $n$-x-$d$ matrix (where often $d<n$) whose columns are linearly independent, the vectors $\mathbf{u}$, $\mathbf{a}$, $\mathbf{b}$ are $d$-x-$1$; and $\mathbf{D(a)}$ indicates a $d$-x-$d$ diagonal matrix whose diagonal elements are the elements of the vector $\mathbf{a}$.
Is the following valid?
Noting that the RHS of eq. $*$ can be rewritten:
$$\mathbf{D(a)b}=\mathbf{D(a)D(b)D(u)^{-1}u}$$
I substitute this in to eq. $*$:
$$\mathbf{Q'MQ u}=\mathbf{D(a)D(b)D(u)^{-1}u}$$
I have seen it said (Lebedev and Cloud, "Tensor Analysis," pg. 30) that if a given matrix $\mathbf{A}$ is a (second order) tensor, then
$$\mathbf{Ax}=\mathbf{Bx} \rightarrow \mathbf{A}=\mathbf{B}$$
So I guess my main question is: may I consider the matrix $\mathbf{Q'MQ}$ on the LHS of eq. $*$ a second order tensor, and thereby get away with the following conclusion:
$$\mathbf{Q'MQ}=\mathbf{D(a)D(b)D(u)^{-1}}$$
Which would then mean that the diagonal elements on the RHS $\left(a_{ii}b_{ii}/u_{ii} \right)$ must be eigenvalues of $\mathbf{M}$ and the columns of $\mathbf{Q}$ must be their corresponding eigenvectors. It would also mean $\mathbf{Q'Q}=\mathbf{I}$ since $\mathbf{M}$ is symmetric ($\mathbf{I}$ being a $d$-x-$d$ identity matrix).
For simplicity, go ahead and assume $d=n$ if you want.
If $\mathbf{Q}$ has linearly independent columns, then it follows that the matrix $\mathbf{Q}^T\mathbf{M}\mathbf{Q}$ is also symmetric positive definite, and is therefore invertible. Hence, $\mathbf{u} = (\mathbf{Q}^T\mathbf{M}\mathbf{Q})^{-1}\mathbf{D}(\mathbf{a})\mathbf{b}$.