On the matching polynomials of graphs