Some generalizations in matrix differentiation with applications in multivariate analysis.