The generators of the Poincare group $P(1;3)$ are supposed to obey the following commutation relation to be verified:
$$\left[ M^{\mu\nu}, P^{\rho} \right] = i \left(g^{\nu\rho} P^{\mu} - g^{\mu\rho} P^{\nu} \right)$$
where $M^{\mu\nu}$ are the 6 generators of the Lorentz group and $P^\mu$ are the 4 generators of the four-dimensional translation group $T(4)$.
For $\mu = 3, \nu=1, \rho=0$ the LHS becomes: $ [M^{31},P^{0}] = M^{31}P^{0} - P^{0}M^{31}$.
Here $M^{31} = J^2 = -J_2= \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & -i \\ 0 & 0 & 0 & 0 \\ 0 & i & 0 & 0 \end{pmatrix}$ and $ P^0 = P_0 = -i \begin{pmatrix} 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{pmatrix}$.
My question is that how can I multiply $M^{31}$ and $P^0$ when they are $4\times4$ and $5\times 5$ matrices respectively?