Ranks of Solutions of the Linear Matrix Equation AX + YB = C

For a consistent complex matrix equation AX+YB=C, we solve the following two problems:(1)the maximal and minimal ranks of a pair of solutions X and Y to AX+YB=C, and (2)the maximal and minimal ranks of four real matrices X"0, X"1, Y"0, and Y"1 in a pair of solutions X=X"0+iX"1 and Y=Y"0+iY"1 to AX+YB=C. We also give a necessary and sufficient condition for matrix equations A"iX"i+Y"iB"i=C (i=1, 2) to have common solutions.