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

Now, given
$\displaystyle \widehat{\phi}_j(\xi_i, \eta_i) = \begin{cases} 1 & i=j \\ 0 & i\ne j\end{cases}$ for $\displaystyle j = 1, 2, 3$ is a reference function defined on a reference triangle $\displaystyle \widehat{e}$ with vertices $\displaystyle (\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
$\displaystyle \int\!\!\!\int_e\! \nabla \phi_j \nabla \phi_i \, dA $,
but using a transformation, so that I can calculate
$\displaystyle \int\!\!\!\int_{\widehat{e}}\! \nabla \widehat{\phi}_j \nabla \widehat{\phi}_i \, dA $
instead.

Now, I can use a transformation
$\displaystyle \widehat{\phi} \stackrel{T}{\rightarrow} \phi$
where $\displaystyle T$ is given by
$\displaystyle
\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}
$.

From my understanding, I should be able to do something like the following
$\displaystyle \int\!\!\!\int_{\widehat{e}}\! f(\xi, \eta)\, dA = \int\!\!\!\int_{e}\! f(x, y) \left|J(T)\right|\, dA$,
where $\displaystyle J(T)$ is the Jacobian of the transformation $\displaystyle 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.