Let the vector $\ell = \begin{pmatrix} \ell_1 \\ \ell_2 \\ \vdots \\ \ell_p \end{pmatrix}$, and the goal is to find a matrix which returns $\psi = \dfrac{\ell_1+\ell_2+\cdots+\ell_q}{\ell_1+\ell_2+\cdots+\ell_p}$, where $q \leq p.$
Is there any matrix $M$ such that $\ell M = \psi$?