Given a normalized measure mu supported on [-1,1], a measure sigma supported on the unit circle can be defined by using the so-called Szego transformation. This also establishes a well known relation between the corresponding Stieltjes and Carathéodory functions. In this contribution, we obtain a generalization to the matrix case of this relation for matrix measures mu and sigma, and such generalization is used to obtain necessary conditions such that some spectral perturbations applied to mu are preserved under the matrix Szego transformation.