TITLE: Graphs of maps between manifolds as cycles and intersection theory
QUESTION [6 upvotes]: I'm guessing that the answer to this question is well-known, but I'm struggling to find anything to help me.
Let $X,Y$ be compact manifolds of dimension $n,m$ respectively. Let $f:X \to Y$ be a smooth map. Then one can consider the graph $\Delta_f$ of $f$ as a cycle in $X \times Y$. 
Firstly what is "known" about $\Delta_f$ considered as a homology class? (I appreciate that this is a little vague). There might need to be some extra conditions placed of $f$, as clearly if for example $f$ maps everything to a point then there is nothing to be said.
Secondly (and related to the first question), suppose that $n=m$, and $f$ is an immersion. Then the self intersection $\Delta_f^2$of $\Delta_f$ with itself is well-defined. Is there a simple expression for this in terms of the basic properties of $f$?

REPLY [2 votes]: We have a short exact sequence:
$$
0\to T_{\Delta_f} \to T_{X\times Y}|_{\Delta_f}
\to N_{\Delta_f/Y} \to 0
$$
We also have that $T_{X\times Y}\simeq p_X^*T_X\oplus p_Y^*T_Y$ (where $p_X$ and $p_Y$ are the projections) and if $\Gamma_f: X\to X\times Y$ is the induced embedding, then $T_{\Delta_f}\simeq \Gamma_f^*T_X$. 
This implies that then
$$
{\rm deg}\ N_{\Delta_f/Y}={\rm deg}\ (p_Y^*T_Y)|_{\Delta_f}
$$
and hence (in the case $m=n$)
$$
\Delta_f^2={\rm deg} \left((p_Y^*T_Y)|_{\Delta_f}\right) = {\rm deg} \left(f^*T_Y\right) = {\rm deg} (f^*c_1(Y))= {\rm deg}\ f\cdot {\rm deg}\ c_1(Y).
$$
By the way, I would not say that "if for example f maps everything to a point then there is nothing to be said". Granted, it is simple, but one can still say that, and also that $\Delta_f^2=0$.