Write out your image function. Your image function will be a field in the form of f(x,y). In other words, your image will be a function of x and y, so make sure your image looks like this.
Calculate the partial derivative of the image with respect to x. You do this just as if you were computing a standard derivative. The only exception is that you must see y as a constant. That is, treat y as a number and not a variable. Your answer should be a function of both x and y unless one term disappeared while you were taking the derivative. For example, the partial derivative of 2xy with respect to x is 2y.
Calculate the partial derivative of the image with respect to y. You do this just like you did with x. Act as if you were computing a standard derivative, but look at x as a constant this time. Again, your answer should be a function of both x and y unless one term disappeared while you were taking the derivative. For example, the partial derivative of 2xy with respect to y is 2x.
Write the image gradient. The image gradient is written in a manner similar to how you would write coordinates in geometry. Write the partial derivative of the image with respect to x that you found, along with the partial derivative of the image with respect to y, in that order. Between these partial derivatives, place a comma, separating them. Do not forget to put the answer inside parentheses, just as you would do when writing coordinates.