http://alex.smola.org/teaching/cmu2013-10-701x/slides/Intro_...
It would have been a piece of cake in college, but I have not used that math in a long time :-/