Fundamentals of Matrix-Analytic Methods