To calculate transport coefficients for a plasma in a magnetic field in a linear approximation it is necessary to invert matrices of fairly high dimensions. In this paper we present a novel method of inverting matrices involved in such problems. The method requires a solution of an inhomogeneous matrix integral equation in the Neumann series and a resummation of the series obtained. It involves inversions of lower order matrices, which can be achieved easily. We then apply the method to calculate viscosities of a two-component plasma subject to a homogeneous magnetic field. The structure of the viscosity matrix (tensor) calculated thereby is shown to be the same as that of a neutral system with an axial symmetry; namely, it can be decomposed into a scalar, a 2 × 2 matrix, and a 3 × 3 matrix. The method developed here can be applied to calculate other transport coefficients of the two-component plasma. Keywords: mathematical method, viscosity, plasmas, transport coefficients, kinetic theory.