Your matricial equation is wrong, you can only multiply matrices like so: (mxn)(nxp); meaning that the first matrix has to have the number of columns equal to the number of lines of the second matrix (n), and the resultant matrix will be (mxp). And so:
ax+by=cx+dy → (1x2).(2x2)=(1x2).(2x2)=(1x2)
The x and y in the 1 by 2 matrices and a,b,c, and d in the 2 by 2 diagonal matrix. If you compute it, you'll have the following:
(ax,by)=(cx,dy) → ax=cx \wedge by=dy
From those equations you conclude that a=c and that b=d.