Can I prove Buckingham's $\pi$ theorem like this?
This is the version of the theorem I need to prove: Consider a model with variables $x_1,...,x_n$, with $k$ fundamental dimensions involved, then $n-k$ dimensionless products of $x_1,...,x_n$ can be defined.
My attempt to prove:
Let $L_1,...,L_k$ are the fundamental dimensions, assume we can use them as a basis of the units of variables (the units are understood as vectors).
Say the unit of each $x_i$ is $L_1^{m_{i,1}}...L_k^{m_{i,k}}$, express the unit as vector $(m_{i,1},...,m_{i,k})$. We can check they have vector space structure.
Then finding $(r_1,...,r_n)$ such that $x_1^{r_1}...x_1^{r_n}$ is dimensionless is the same as solving the equation
$$r_1(m_{1,1},...,m_{1,k})+...+r_n(m_{n,1},...,m_{n,k})=(0,...,0)$$
Re-express:
$$\begin{bmatrix} m_{1,1} & ... & m_{n,1}\\ \vdots & & \vdots \\ m_{1,k}& ... & m_{n,k} \end{bmatrix}\begin{bmatrix} r_1\\ \vdots \\ r_n \end{bmatrix}=\textbf{0}$$
Then the problem becomes finding the dimension of the kernel of the $k \times n$ matrix. Since there are $k$ fundamental dimensions involved, the matrix has full rank, so the result follows from the rank-nullity theorem.
This mostly follow from wikipedia's proof, but there was logarithm and some abstract algebra theorems, and I try to find a simpler proof.