Let $\mathbf{X} \in \mathbb{R}^{k \times k}$ be a square stochastic matrix (i.e $\mathbf{1}\mathbf{X} = \mathbf{1}$), are there any useful identities that can possibly be used to simplify the expression $\frac{\partial \mathbf{X}^n}{\partial X_{ij}}$, where $n \in \mathbb{Z}^+$ raises $\mathbf{X}$ to the $n$-th power and $X_{ij}$ is the element corresponding to the index $i,j$ in matrix $\mathbf{X}$.
During my search on StackExchange, I have come across greg's answer, stating that $$\frac{\partial F}{\partial\mathbf{X}_{ij}} = \sum_{k=1}^\infty \alpha_k(\sum_{l=1}^k\mathbf{X}^{k-l}\mathbf{E}_{ij}\mathbf{X}^{l-1})$$ where $$F(\mathbf{X}) = \sum_{k=0}^\infty \alpha_k \mathbf{X}^k$$ and $$\mathbf{E}_{ij} = e_ie_j^T$$
where $e_i$ is a cartesian basis vector and $\mathbf{E}_{ij}$ is the single-entry matrix.
Would anyone please tell me how this identity is derived or the name of this identity/theorem? Thank you so much!