Differentiating the Hamiltonian Operator, $\hat{H}$ Firstly let $\hat{H}$ denote the full energy of the electromagnetic wave. I'm trying to differentiate the Hamiltonian operator with respect to the components of momentum, i.e. $$\frac{d}{dp_x} \frac{d}{dp_y} \frac{d}{dp_z} \hat{H}$$ 
To do so, I need to write the Hamiltonian as the components of momentum. Using the Dirac equation, I  think it would be correct to say 
$$\hat{H}=\beta mc^2+c(\alpha_x p_x +\alpha_y p_y +\alpha_z p_z)$$
As
$$\left(\beta mc^2 + c(\alpha_1 p_1 + \alpha_2 p_2 + \alpha_3 p_3)\right) \psi (x,t) = i \hbar \frac{\partial\psi(x,t) }{\partial t}$$ and $$\hat{p}=p_x \mathbf e_x+p_y \mathbf e_y+p_z \mathbf e_z$$according to Wikipedia. 
I'm not familiar with what I think is matrix mechanics so I would like someone to explain the purpose of $\beta$ and $\alpha$ and how to differentiate the aforementioned equation, provided it is correct. 
 A: Yes, you can certainly differentiate the Hamiltonian with respect to the momentum (or more generally with respect to anything in the Hamiltonian). For Dirac Hamiltonian (assuming $c=1$):
$$H=p_i \alpha^i + m \beta,$$
we simply have
$$v_i\equiv\partial_{p_i} H=\alpha^i,$$
which is the velocity (current) operator of the fermion. In quantum field theory, $v_i$ is also the vertex operator that couples the fermion to the electromagnetic field $A_i$ as $A_i \psi^\dagger v_i \psi$. In this sense, your question is indeed related to electromagnetism, or more precisely, quantum electrodynamics (QED).
In condensed matter systems, electrons usually have much more complicated Hamiltonians than the Dirac Hamiltonian. For example, the effective Hamiltonian for bilayer graphene reads 
$$H=-\frac{1}{2m}\left(\begin{matrix}0&(p_1-ip_2)^2\\(p_1+ip_2)^2&0\end{matrix}\right).$$
In this case, the definition of $v_i\equiv\partial_{p_i}H$ becomes extremely useful in finding the correct vertex operator that couples the electron to the gauge field. It is not hard to find
$$v_1\equiv\partial_{p_1}H=-\frac{1}{m}\left(p_1\sigma^1+p_2\sigma^2\right),\quad v_2\equiv\partial_{p_2}H=-\frac{1}{m}\left(-p_2\sigma^1+p_1\sigma^2\right),$$
where $\sigma^1$, $\sigma^2$ are Pauli matrices. Then electromagnetic field will couple to the low-energy electron in the bilayer graphene via $A_i c^\dagger v_i c$. It is also meaningful to consider higher order derivatives of the Hamiltonian with respect to the momentum. For instance, the second order derivatives are defined as the inverse mass operators in solid state physics,
$$(M^{-1})_{ij}=\partial_{p_i}\partial_{p_j}H.$$
For the bilayer graphene, we can find $(M^{-1})_{11}=-(M^{-1})_{22}=-m^{-1}\sigma^1$ and $(M^{-1})_{12}=(M^{-1})_{21}=-m^{-1}\sigma^2$. The eigen values of the inverse mass operators actually determine the effective masses of the electron in the energy bands.
A: The momentum operators $\hat{p}_x,\hat{p}_y,\hat{p}_z$ are operators. They can be represented as infinite dimensional matrices acting on an infinite dimensional Hilbert space. The Hamiltonian $\hat{H}$ can also be represented as a infinite dimensional matrix. 
One can generalize the notion of a differentiation to differentiation by matrices: 
http://en.wikipedia.org/wiki/Matrix_calculus#Derivatives_with_matrices
However the momentum operators are constant matrices. You can't differentiate by a constant. 
Why you would even try to do this is another matter. Differentiating with operators is not a useful in any physics I'm familiar with because the complete set of commuting observables whose eigenstates span the Hilbert space are taken to be constant due to them usually being some generators of some Lie algebras.
