Let $Q,Q_1,...,Q_n$ be $n+1$ physical quantities associated with some physical dimensions. Assume, the physical equation
$$Q = f(Q_1,...,Q_n) $$
is true. While discussing methods of dimensional analysis, my professor noted, that all physical equations of the above form can be written as
$$Q = \tilde{f}(Q_1,...,Q_n) Q_1^{p_1}...Q_n^{p_n}$$
for some real exponents $p_1,...,p_n$.
Is this true? Why should this be the case? So far, I have a very hard time, wrapping my mind around dimensional analysis.