double integral over an arbitrary triangle Assume we have an arbitrary triangle ABC in x-y plane and we want to integrate a function $f(x,y)$ over surface of this triangle as shown in fig. 1:

We can define another coordination system [x' y'] like this:
$$\begin{bmatrix}x\\y\\1\\\end{bmatrix}=
\begin{bmatrix}C_{11}&C_{12}&C_{13}\\C_{21}&C_{22}&C_{23}\\0&0&1\\\end{bmatrix}*
\begin{bmatrix}x'\\y'\\1\\\end{bmatrix} => \begin{bmatrix}x'\\y'\\1\\\end{bmatrix}=
\begin{bmatrix}C_{11}&C_{12}&C_{13}\\C_{21}&C_{22}&C_{23}\\0&0&1\\\end{bmatrix}^{-1}*
\begin{bmatrix}x\\y\\1\\\end{bmatrix}$$
In a way that : $$x'_{A'}=0,y'_{A'}=0,x'_{B'}=1,y'_{B'}=0,x'_{C'}=0,y'_{C'}=1,$$
And it will looks like this:

Now i want to define the $$\int _S f(x,y).dS$$ in form of $$\int _{S'} g(x',y').dS'$$
or define g(x',y') in a way that $$\int _S f(x,y).dS=\int _{S'} g(x',y').dS'$$
What exactly i need to know is that what is relation between g(x',y') and other parameters like f(x,y) etc.
Integrating g(x',y') over S' surface is as easy as: $$\int _0^1 \int _0^{1-x'} g(x',y') dy'.dx' $$ and i'm doint this to simplify double integration over triangle easy.
UPDATE:
For example if coordinations of A, B and C are known, and f(x,y)=5x+2yx then what is relation of g(x',y') with known parameters? Is it guaranteed that it have strict relation with known parameters in this specific case?
 A: No inversion of matrices is necessary here.
Denote the vertices of $S$ by ${\bf a}$, ${\bf b}$, ${\bf c}$. Then the map
$${\bf g}:\quad (u,v)\mapsto {\bf a}+u({\bf b}-{\bf a})+ v({\bf c}-{\bf a})\ ,$$
which in coordinates appears as
$${\bf g}:\quad (u,v)\mapsto\left\{\eqalign{x(u,v)&=a_1+u(b_1-a_1)+v(c_1-a_1) \cr y(u,v)&=a_2+u(b_2-a_2)+v(c_2-a_2)\ ,\cr}\right.\tag{1}$$
obviously maps $S'$ bijectively onto $S$. Therefore the  transformation formula for multiple integrals steps into action, and we obtain
$$\int_S f(x,y)\>{\rm d}(x,y)=\int_{S'}f\bigl(x(u,v),y(u,v)\bigr)\>\bigl|J_{\bf g}(u,v)\bigr|\ {\rm d}(u,v)\ .$$
In the case at hand the Jacobian determinant is a constant: From $(1)$ we obtain
$$J_{\bf g}(u,v)=\det\left[\matrix{x_u&x_v\cr y_u&y_v\cr}\right]=(b_1-a_1)(c_2-a_2)-(c_1-a_1)(b_2-a_2)\ .$$
Therefore we can write
$$\int_S f(x,y)\>{\rm d}(x,y)=\bigl|J_{\bf g}\bigr|\>\int_0^1\>\int_0^{1-u}\tilde f(u,v)\ dv\ du\ ,$$
where $\tilde f$ denotes the pullback of $f$ to $S'$:
$$\tilde f(u,v):=f\bigl(x(u,v),y(u,v)\bigr)\ .$$
Don't forget taking the absolute value of $J_{\bf g}\>$!
A: In a change of variables $(x,y) \to (x',y') = (f_1 (x,y) , \, f_2 (x,y) )$, your integral will transform with the variables so that 
$$
\int_S f(x,y) \, dA 
= \int_{S'} \xi(x',y') \cdot \left| \,
\begin{vmatrix} 
\frac{\partial x'}{\partial x} & \frac{\partial x'}{\partial y} \\
\frac{\partial y'}{\partial x} & \frac{\partial y'}{\partial y} \\
\end{vmatrix}
\, 
\right| \, dA'
$$
(where $\xi (x' , y') = f(x,y)$).
A: You can understand this by working out the coordinates explicitly. Label the vertices as $(x_1,y_1)$, $(x_2,y_2)$, $(x_3,y_3)$. The formulae for the three sides of the triangle are
$$y-y_3=\frac{y_1-y_3}{x_1-x_3}(x-x_3),$$
$$y-y_2=\frac{y_3-y_2}{x_3-x_2}(x-x_2),$$
$$y-y_1=\frac{y_2-y_1}{x_2-x_1}(x-x_1).$$
Then we choose $t$ as a variable which equals 0 at $(x_1,y_1)$ and $(x_3,y_3)$ and one at $(x_2,y_2)$.

*

*Since it's zero at $(x_1,y_1)$, it takes the form $t=\lambda(x-x_1)+\mu(y-y_1)$ for some $\lambda,\mu\in \mathbb{R}$.

*Since it's also zero at $(x_3,y_3)$, it takes the form $t=\lambda((y_3-y_1)(x-x_1)-(x_3-x_1)(y-y_1))$.

*Finally, since it's equal to one at $(x_2,y_2)$, it must be $t=\frac{(y_3-y_1)(x-x_1)-(x_3-x_1)(y-y_1)}{(y_3-y_1)(x_2-x_1)-(x_3-x_1)(y_2-y_1)}$.

*But we can simplify it further, using the formula $A=\frac{1}{2} |(y_3-y_1)(x_2-x_1)-(x_3-x_1)(y_2-y_1)|$, where $A$ is the area of the triangle (which comes from the cross product). So we really get $$t=\pm \frac{1}{2A}((y_3-y_1)(x-x_1)-(x_3-x_1)(y-y_1)).$$ We get the positive option if the vertices are labeled in anticlockwise order.

We can similarly define $s$ to be 0 at $(x_1,y_1)$ and $(x_2,y_2)$ and 1 at $(x_3,y_3)$, as $$s=\mp \frac{1}{2A} ((y_2-y_1)(x-x_1)-(x_2-x_1)(y-y_1))$$ (swap $(x_2,y_2)$ and $(x_3,y_3)$ and reverse the order of the vertices).
Finally, you might need expressions for $x$ and $y$ in terms of $s$ and $t$. But $s$ and $t$ represent "how much" each vertex should contribute to the coordinates of a point. That is, we get $x=t x_2+s x_3 + (1-t-s) x_1$, and $y=t y_2+s y_3 + (1-t-s) y_1$. Then you get $$g(t,s):=f(x,y)=f(t x_2+s x_3 + (1-t-s) x_1,t y_2+s y_3 + (1-t-s) y_1),$$ and your integral becomes
\begin{align*}\iint_T f(x,y) \, dx \, dy 
&= \int_0^1 \int_0^{1-t} g(t,s) \, \left|\det\left(\begin{array}{cc}\frac{y_3-y_1}{2A} & \frac{x_3-x_1}{2A} \\ -\frac{y_2-y_1}{2A} & -\frac{x_2-x_1}{2A} \end{array}\right)\right|^{-1} \, ds \, dt \\
&= \int_0^1 \int_0^{1-t} g(t,s) \, \frac{4A^2}{|(x_2-x_1)(y_3-y_1)-(x_3-x_1)(y_2-y_1)|} \, ds \, dt \\
&= \int_0^1 \int_0^{1-t} g(t,s) \, 2A \, ds \, dt.
\end{align*}
This makes sense, since the final answer depends linearly on the area. The factor of $2$ comes from the fact that you're integrating $(t,s)$ over a region with area $\frac{1}{2}$.
