User ratings and tags are becoming largely available on Internet. While people usually exploit user ratings for developing recommender systems, the use of tag information in recommender systems remains under-explored. In particular, it is not clear how to use both user ratings and user tags in a complementary way to maximize the performances of recommender systems. To this end, we propose a novel collaborative filtering model based on probabilistic matrix factorization to predict users' interests to items by simultaneously utilizing both tag and rating information. Specifically, we first perform low-rank approximation for three matrices at the same time to learn the low-dimensional latent features of users, items and tags. Then, we predict one user's preference to an item as the product of the user and item latent features. Finally, experimental results on real-world data show that the proposed model can significantly outperform benchmark methods.