We introduce the notion of (z,k)-equivalence of matrices over quadratic rings. The established standard form of matrices with respect to the (z,k)-equivalence is used to describe the structure of solutions of the matrix equation AX + YB = C over Euclidean quadratic rings. We prove the existence of solutions with minimum Euclidean norm and show that the analyzed equation has finitely many solutions of this kind over Euclidean imaginary quadratic rings.