This book features a unified derivation of the mathematical theory of the three classical types of invariant random matrix ensembles - orthogonal, unitary, and symplectic. The authors follow the approach of Tracy and Widom, but the exposition here contains a substantial amount of additional material, in particular, facts from functional analysis and the theory of Pfaffians. The main result in the book is a proof of universality for orthogonal and symplectic ensembles corresponding to generalized Gaussian type weights following the authors' prior work. New, quantitative error estimates are derived. The book is based in part on a graduate course given by the first author at the Courant Institute in fall 2005. Subsequently, the second author gave a modified version of this course at the University of Rochester in spring 2007. Anyone with some background in complex analysis, probability theory, and linear algebra and an interest in the mathematical foundations of random matrix theory will benefit from studying this valuable reference.