Continued Fractions and Matrices