A function represented at the quadrature points can be considered as a sum: if fi,j is the (i,j)th physical value of the function then the interpolating polynomial is:

Here hai is the ith interpolating polynomial for the quadrature chosen in the `a' direction. Thus, we can evaluate the derivative of this interpolating polynomial in each of the (a,b) directions.

We can now evaluate the (i,j)th quadrature value of the derivative as a matrix vector product:

Repeating the above we can evaluate the `b' derivative (and the `c' derivative in three-dimensions). To calculate the x,y or z derivatives we simply apply the chain rule. In implementation we store the geometric factors for all the elements. This is more memory efficient for straight-sided triangles and tetrahedra since the geometric factors are a set of constants (except for (1-b) and (1-b)(1-c)2 factors).