Explanation Of Cauchy's Integral Theorem When we integrate in terms of  real variables over a closed loop  then we get a positive area enclosed by that loop( in 2D). I don't understand why integration of a complex analytic function comes out to be zero. 
Please explain this to me.
Pardon me if you find this question silly.
 A: A complex analytic function satisfies the Cauchy–Riemann equations and so  both integrands in Green's theorem are zero.
See the details in Wikipedia. 
See also Is there any connection between Green's Theorem and the Cauchy-Riemann equations?.
A: I think that's a rather deep question. I myself have not studied in depth the proof of Cauchy's Integral Theorem and so can't provide a very thorough answer, but perhaps we can get some intuitive insight if you've studied any vector calculus.$\newcommand{\del}{\nabla}$
In vector calculus there is a similar theorem which states that if a vector field is the gradient of some scalar field (i.e. $\vec F = \del f$ for some $f$), then the vector line integral about any curve $C$ equals the difference in the values of the endpoints of the potential function $f$:
\begin{align}
\int_C \vec F(\vec r) \cdot d \vec r = f(\vec r(b)) - f(\vec r(a))
\end{align}
Hence if the curve $C$ is closed, then $\vec r(a) = \vec r(b)$ and we get
$$ \int_C \vec F(\vec r) \cdot d \vec r = 0 $$
which you can intuitively think of as being a march around a hill. If you start at some elevation and you keep track of your upward and downward movement (that is, you keep track of $\vec F(\vec r) \cdot d \vec r$), you'll find that if your march takes you to your original starting location, then you're upward movement exactly matches your downward movement, and hence your net change in elevation is zero.
You can imagine something similar is happening with integrals in the complex plane. Holomorphic functions are like vector fields that are a gradient of a scalar field, and indicate that "moving around" (that is, integrating) the function is like moving around a hill: if you return to where you start, you won't have changed elevation.
A: Let $\gamma=\partial \Omega$ be a loop bounding the domain $\Omega$ in the plane. Then according to Green's theorem
$${\rm area}(\Omega)=\int_\gamma x\>dy=-\int_\gamma y\>dx={1\over2}\int_\gamma(x\,dy-y\,dx)\ .\tag{1}$$
These are special formulas, and do not contain an arbitrary $f$.
If the same $\Omega$ is considered as a domain in ${\mathbb C}$ and $f=u+iv$ is an analytic function in the neighborhood of $\Omega$ then Cauchy's theorem says that $$\int_\gamma f(z)\>dz=\int_\gamma (u+iv)\>(dx+i\,dy)=0\ .$$
Separating real and imaginary parts here one obtains the two real equations
$$\int_\gamma(u\>dx-v\>dy)=0,\qquad\int_\gamma (u\>dy+v\>dx)=0\ .$$
For the special analytic function $f(z):=z=x+iy$ this gives
$$\int_\gamma(x\>dx-y\>dy)=0,\qquad\int_\gamma (x\>dy+y\>dx)=0\ .\tag{2}$$
Both these integrals are completely different from the area integrals $(1)$. The vanishing of the first is pretty obvious since ${1\over2}d(x^2-y^2)$ is integrated over a loop. It is a consequence of  Green's formula $(1)$ that also the second of the integrals $(2)$ has to vanish.
