The Matrix Cookbook is a resource for all manner of matrix manipulations.
Some students find Andrew Ng's notes from Stanford helpful (available at: http://cs229.stanford.edu/materials.html )
Note: the sample exam has been revised to fix a typo in the Naive Bayes question