deriving chi-square stat for contingency table

#1
Howdy!

I'm attempting to derive the chi-square stat for a 2x2 contingency table, like:
a | b
------
c | d

The chi-square formula given is : (a+b+c+d)(ad- bc)^2 / ( (a+b)(a+c)(b+d)(c+d) )

I can derive all but the (ad-bc)^2 part of the formula. Any links or tips about how this formula is derived? It seems like it should be fairly simple, but it had elluded me so far.