Given another function
\phi_j(x_i, y_i) = \begin{cases} 1 & i=j \\ 0 & i\ne j\end{cases} for  j = 1, 2, 3
defined on a triangle e with vertices (x,y) = \{(x_1,y_1),(x_2,y_2),(x_3,y_3)\}.

Now, given
\widehat{\phi}_j(\xi_i, \eta_i) = \begin{cases} 1 & i=j \\ 0 & i\ne j\end{cases} for  j = 1, 2, 3 is a reference function defined on a reference triangle \widehat{e} with vertices (\xi,\eta) = \{(\xi_1,\eta_1),(\xi_2,\eta_2),(\xi_3,\eta_3)\} = \{(0,0),(1,0),(0,1)\}.

I want to evaluate the integral
\int\!\!\!\int_e\! \nabla \phi_j \nabla \phi_i \, dA ,
but using a transformation, so that I can calculate
\int\!\!\!\int_{\widehat{e}}\! \nabla \widehat{\phi}_j \nabla \widehat{\phi}_i \, dA

Now, I can use a transformation
\widehat{\phi} \stackrel{T}{\rightarrow} \phi
where T is given by
<br />
\begin{bmatrix} (x_2 - x_1) & (x_3 - x_1) \\ (y_2 - y_1) & (y_3 - y_1)\end{bmatrix} \begin{bmatrix}\xi \\ \eta \end{bmatrix} + \begin{bmatrix}x_1 \\ y_1\end{bmatrix} = \begin{bmatrix}x \\ y\end{bmatrix}<br />

From my understanding, I should be able to do something like the following
\int\!\!\!\int_{\widehat{e}}\! f(\xi, \eta)\, dA = \int\!\!\!\int_{e}\! f(x, y) \left|J(T)\right|\, dA,
where J(T) is the Jacobian of the transformation T. I am slightly confused by this because I don't see from where, exactly, it came.

I am unsure if the Gradients are in the same variable. My guess is that they aren't, so I will have to use a chain rule there. I am having difficulty with this transformation. I guess it is not clear to me if the Jacobian is on the transformation that I have shown. It seems as though it is wrong. Any help would be greatly appreciated.

NOTE: This is in application to Finite Elements, but I felt it belonged in Calculus, since that is where I am confused.