The author proposes a new method by which one can solve for the two-dimensional irrotational fully cavitating flow past a cylinder of arbitrary cross section. Unlike the available solutions, it is in the form of two expansions each valid in part of the complex potential plane w = Φ + iΨ. The a priori unknown coefficients in the two expansions are linked by infinitely many linear algebraic equations. By inverting the associated matrix and utilizing the boundary condition, that represent the geometry of the wet surface, the coefficients in the expansions are evaluated and the solution is completed. Cases in which the wet surface is circular, the pressure along the free streamlines is constant, and the entire flow pattern is symmetric with respect to flow direction at infinity are considered in detail. Also, the well-known solution for the flow past a flat plate is compared to that obtained by the method of matrix inversion. Judging from these results, the convergence of the series appears to be very rapid. The author finally discusses the applicability of the method to cases in which the obstacle has a sharp leading edge, the pressure in the cavity is not uniform, or the flow pattern is not symmetric.