In the book of Hesthaven and Warburton on discontinual Galerkin methods the authors give motivation to the differentiation matrix (page 52), referred to as $D_r(i,j)=\frac{dl_j}{dr}|_{r_i}$ where $l_i(r) = \prod_{j=1 \\ j\neq i} \frac{r - \xi_j}{\xi_i - \xi_j}$ a base-vector of the Lagrangian polynomial base.
They say that the following equation motivates this definition:
$$u_h(r)=\sum_{n=1}^{N_p}\hat{u}\tilde{P}_{n-1}(r)=\sum_{n=1}^{N_p}u(r_i)l_i(r)$$
where the first sum is a linear combination of the orthonormal Legendre-polynomial basis and (I suspect) the second sum gives the same polynomial with respect to the Lagrange basis. They say that in the equation above $D_r$ is the operator that transforms point values, $u(r_i)$, to derivatives at these same points (e.g. $u_h'=D_ru_h$). Sadly, I do not see the connection there.
What follows are some manipulation of which I do not grasp the disappearance of the sum in the integral $$(MD_r)_{ij}= \sum_{n=1}^{N_p} M_{in}D_r(n,j)= \sum_{n=1}^{N_p}\int_{-1}^1l_i(r)l_n(r)\frac{dl_j}{dr}|_{r_n}dr \\= \int_{-1}^1l_i(r)\sum_{n=1}^{N_p}l_j(r)\frac{dl_j}{dr}|_{r_n}l_n(r)dr=\int_{-1}^1 l_i(r)\frac{dl_j(r)}{dr}dr=S_{ij}$$
So the use of $\sum_{n=1}^{N_p}l_j(r)\frac{dl_j}{dr}|_{r_n} l_n(r) = \frac{dl_j(r)}{dr}$ is not clear to me.