Integrating product of linear functions over a triangle Given a triangle with vertices $N=\{A,B,C\}$, where the triangle is defined to be the convex hull of those vertices, the nodal basis function is defined to be $$\phi_P(x) = \begin{cases} 1, x = P \\ 0, x \in N \setminus \{P\} \end{cases}$$
where $P \in \{A,B,C\}$
Followed by linear interpolation between these values, so that $\phi_P \in \mathcal{P}_1$.
So the nodal basis functions look like this:
So they are just linear functions over the triangle. I now have to calculate $$\int_T \phi_i \phi_j dx, i \neq j, i,j\in \{1,2,3\}$$.
With $\phi_i = a_ix + b_iy + c, (x,y)\in T$
Can someone please tell me how to integrate such a term?

For the triangle $T_*$ with vertices $A_0=(0,0)$, $A_1=(1,0)$, $A_2=(0,1)$ one has $\phi_1(x,y)=x$ and $\phi_2(x,y)=y$. This implies
$$\int_{T_*}\phi_1(x,y)\phi_2(x,y)\>{\rm d}(x,y)=\int_0^1\int_0^{1-x} x y\>dy\>dx=\ldots={1\over24}\ .$$
From "general principles" (see achille hui's comment) it then follows that for an arbitrary triangle $T$ you have
$$\int_T\phi_i\phi_j\>{\rm d}(x,y)={1\over12}{\rm area}(T)\qquad(i\ne j)\ .$$
