The concept of an I-matrix in the full 2 × 2 matrix ring M2(R/I), where R is an arbitrary UFD and I is a nonzero ideal in R, is introduced. We obtain a concrete description of the centralizer of an I-matrix [Formula: see text] in M2(R/I) as the sum of two subrings 𝒮1 and 𝒮2 of M2(R/I), where 𝒮1 is the image (under the natural epimorphism from M2(R) to M2(R/I)) of the centralizer in M2(R) of a pre-image of [Formula: see text], and the entries in 𝒮2 are intersections of certain annihilators of elements arising from the entries of [Formula: see text]. It turns out that if R is a PID, then every matrix in M2(R/I) is an I-matrix. However, this is not the case if R is a UFD in general. Moreover, for every factor ring R/I with zero divisors and every n ≥ 3, there is a matrix for which the mentioned concrete description is not valid.