title: How to correctly derivate quadratic cost function
body: <p>Given the quadratic cost function <code>f(a) = 1/2 (a-y)^2</code>, I know that the derivative of the function with respect to <code>a</code> is <code>a - y</code>.
  But I have no clue how to get there...
  Can you provide me a link where this is explained easily?</p>