  We present a matrix method for obtaining new classes of exact solutions for
Einstein's equations representing static perfect fluid spheres. By means of a
matrix transformation, we reduce Einstein's equations to two independent
Riccati type differential equations for which three classes of solutions are
obtained. One class of the solutions corresponding to the linear barotropic
type fluid with an equation of state $p=\gamma \rho $ is discussed in detail.
