Suppose we want to calculate a velocity. We identify all the relevant dimensions on which the solution could depend and write out and solve the equation $$l/t= a^x \, b^y \, c^z$$ where $a$, $b$, and $c$ are those relevant dimensions, and $l$ stands for length and $t$ for time.
I am having trouble understanding why this works. My thought process has been as follows; We seem to be looking for some function from $\mathbb{R}^n \rightarrow \mathbb{R}$ where $n$ is the number of relevant units. I guess we can assume this function exists since for any set of values the relevant parameters take we should be able to predict the velocity. If the function has the form written above I would say that it has to be dimensionally consistent since if not the solution would be dependent on the definition of one or more units which is obviously not the case (does someone have a better explanation for this?). I don't understand why we can write this function in the form $a^x \, b^y \, c^z$. How do we know the function doesn't take a different form?